diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 41cc608..50675ab 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,6 +1,6 @@ { "main.css": "static/css/main.1f97f8c6.css", "main.css.map": "static/css/main.1f97f8c6.css.map", - "main.js": "static/js/main.21b11d96.js", - "main.js.map": "static/js/main.21b11d96.js.map" + "main.js": "static/js/main.b7eb699e.js", + "main.js.map": "static/js/main.b7eb699e.js.map" } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 5776f6f..ed4928d 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Vessel measuring tool
\ No newline at end of file +Vessel measuring tool
\ No newline at end of file diff --git a/build/static/js/main.21b11d96.js b/build/static/js/main.21b11d96.js deleted file mode 100644 index 37c367d..0000000 --- a/build/static/js/main.21b11d96.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/Vessel-Measuring-Tool/",t(t.s=33)}([function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){e.exports=n(50)()},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(52);n.d(t,"a",function(){return r.a});var i=n(55);n.d(t,"b",function(){return i.a});var o=n(56);n.d(t,"d",function(){return o.a});var a=n(7);n.d(t,"c",function(){return a.a}),n.d(t,"f",function(){return a.b});var s=n(5);n.d(t,"e",function(){return s.b})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return u});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},i=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return o(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},l=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},u=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l});var r=n(53),i=n(54),o=n(5),a=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?f.a.Children.only(e):null},t}(f.a.Component);v.propTypes={history:h.a.object.isRequired,children:h.a.node},v.contextTypes={router:h.a.object},v.childContextTypes={router:h.a.object.isRequired},t.a=v},function(e,t,n){"use strict";var r=n(25),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];var s=[],l=i()(e,s,t),u={re:l,keys:s};return a<1e4&&(r[e]=u,a++),u},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"===typeof t&&(t={path:t});var r=t,i=r.path,o=r.exact,a=void 0!==o&&o,l=r.strict,u=void 0!==l&&l,c=r.sensitive,f=void 0!==c&&c;if(null==i)return n;var p=s(i,{end:a,strict:u,sensitive:f}),h=p.re,d=p.keys,v=h.exec(e);if(!v)return null;var m=v[0],y=v.slice(1),g=e===m;return a&&!g?null:{path:i,url:"/"===i&&""===m?"/":m,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=y[n],e},{})}};t.a=l},function(e,t,n){var r=n(14),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(e){if(e.clientWidth&&e.clientHeight)return{width:e.clientWidth,height:e.clientHeight};if(e.getBoundingClientRect())return e.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(e,t){var n=null;if(!(n=r.isElement(t)?t:e.querySelector(t))){var i=Array.prototype.slice.call(e.childNodes||e.children).filter(function(e){return"defs"!==e.nodeName&&"#text"!==e.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(n=i[0])}if(!n){var o="viewport-"+(new Date).toISOString().replace(/\D/g,"");n=document.createElementNS(this.svgNS,"g"),n.setAttribute("id",o);var a=e.childNodes||e.children;if(a&&a.length>0)for(var s=a.length;s>0;s--)"defs"!==a[a.length-s].nodeName&&n.appendChild(a[a.length-s]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==e.parentNode){var t=e.getAttribute("style")||"";-1===t.toLowerCase().indexOf("overflow")&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:r.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;nt?(clearTimeout(s),s=null,l=c,o=e.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(u,f)),o}},createRequestAnimationFrame:function(e){var t=null;return"auto"!==e&&e<60&&e>1&&(t=Math.floor(1e3/e)),null===t?window.requestAnimationFrame||n(33):n(t)}}},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return y=e,g}}function o(e,t){try{return e(t)}catch(e){return y=e,g}}function a(e,t,n){try{e(t,n)}catch(e){return y=e,g}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&v(e,this)}function l(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),u(e,new d(t,n,a))})}function u(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){m(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?f(t.promise,e._18):p(t.promise,e._18));var r=o(n,e._18);r===g?p(t.promise,y):f(t.promise,r)})}function f(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===g)return p(e,y);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void h(e);if("function"===typeof n)return void v(n.bind(t),e)}e._83=1,e._18=t,h(e)}function p(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),h(e)}function h(e){if(1===e._75&&(u(e,e._38),e._38=null),2===e._75){for(var t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),l=n.n(s),u=n(1),c=n.n(u),f=n(2),p=n.n(f),h=n(4),d=Object.assign||function(e){for(var t=1;t outside a "),p()(void 0!==t,'You must specify the "to" property');var o=this.context.router.history,a="string"===typeof t?Object(h.c)(t,null,null,o.location):t,s=o.createHref(a);return l.a.createElement("a",d({},i,{onClick:this.handleClick,href:s,ref:n}))},t}(l.a.Component);m.propTypes={onClick:c.a.func,target:c.a.string,replace:c.a.bool,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired,innerRef:c.a.oneOfType([c.a.string,c.a.func])},m.defaultProps={replace:!1},m.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired,createHref:c.a.func.isRequired}).isRequired}).isRequired},t.a=m},function(e,t,n){"use strict";var r=n(24);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(2),u=n.n(l),c=n(0),f=n.n(c),p=n(1),h=n.n(p),d=n(12),v=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,c=(r||l.location).pathname;return Object(d.a)(c,{path:i,strict:o,exact:a,sensitive:s},l.match)},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),s()(!(this.props.component&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored"),s()(!(this.props.render&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,a=o.history,s=o.route,l=o.staticContext,u=this.props.location||s.location,c={match:e,location:u,history:a,staticContext:l};return r?e?f.a.createElement(r,c):null:i?e?i(c):null:"function"===typeof n?n(c):n&&!m(n)?f.a.Children.only(n):null},t}(f.a.Component);y.propTypes={computedMatch:h.a.object,path:h.a.string,exact:h.a.bool,strict:h.a.bool,sensitive:h.a.bool,component:h.a.func,render:h.a.func,children:h.a.oneOfType([h.a.func,h.a.node]),location:h.a.object},y.contextTypes={router:h.a.shape({history:h.a.object.isRequired,route:h.a.object.isRequired,staticContext:h.a.object})},y.childContextTypes={router:h.a.object.isRequired},t.a=y},function(e,t,n){function r(e,t){for(var n,r=[],i=0,o=0,a="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var c=n[0],f=n[1],p=n.index;if(a+=e.slice(o,p),o=p+c.length,f)a+=f[1];else{var h=e[o],d=n[2],v=n[3],m=n[4],y=n[5],b=n[6],w=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,k="+"===b||"*"===b,E="?"===b||"*"===b,_=n[2]||s,P=m||y;r.push({name:v||i++,prefix:d||"",delimiter:_,optional:E,repeat:k,partial:x,asterisk:!!w,pattern:P?u(P):w?".*":"[^"+l(_)+"]+?"})}}return o0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:s(e)(t,{pretty:!0})};t.a=l},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n5&&void 0!==arguments[5]&&arguments[5];r(this,e),this.cx=t[0],this.cy=t[1],this.fill="#2da7cf80",this.stroke="rgb(123, 207, 225)",this.selector=s,this.canvas=n,this.x=i,this.y=o,this.zoom=a,this.el=document.createElementNS("http://www.w3.org/2000/svg","circle"),this.select=this.select.bind(this),this.move=this.move.bind(this),this.stopEditing=this.stopEditing.bind(this),this.get_point=this.get_point.bind(this),this.old_cx=t[0],this.old_cy=t[1],this.base_size=10,this.base_stroke=5,this.size=this.base_size/a,this.strokeWidth=this.base_stroke/a}return i(e,[{key:"draw",value:function(){this.el.setAttribute("cx",this.cx),this.el.setAttribute("cy",this.cy),this.el.setAttribute("r",this.size),this.el.style.stroke=this.stroke,this.el.style.strokeWidth=this.strokeWidth,this.el.style.fill=this.fill}},{key:"setSize",value:function(e){this.size=this.base_size/e,this.strokeWidth=this.base_stroke/e,this.draw()}},{key:"edit",value:function(){this.el.addEventListener("click",this.select)}},{key:"clear",value:function(){window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing),this.fill="#2da7cf80",this.cx=this.old_cx,this.cy=this.old_cy,this.draw()}},{key:"stopEditing",value:function(){window.snapping_points.push([this.cx,this.cy]),this.old_cx=this.cx,this.old_cy=this.cy,this.fill="#2da7cf80",this.draw(),window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1||c<0||c>1)&&{x:e+u*(n-e),y:t+u*(r-t)}}function i(e,t){var n=s(e),r=2*(n.centroid[0]-window.r_axis)*Math.PI,i=r*n.area*Math.pow(t,3);return Math.abs(i)}function o(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function a(e,t,n){if(!e)return null;var r=[e.points[0].cx,e.points[0].cy],i=[e.points[1].cx,e.points[1].cy],a=o(r,i);return("inch"===n?2.54*t:t)/a/10}function s(e){var t=[];return e.forEach(function(e){t.push([e.cx,e.cy])}),{centroid:d.polygonCentroid(t),area:d.polygonArea(t)}}function l(e){var t=[],n=0;return e.forEach(function(r){ni.cy&&window.maxFill=1?("start-start"===n[0]?r=e.points.reverse().concat(t.points):"end-end"===n[0]?r=e.points.concat(t.points.reverse()):"start-end"===n[0]?r=t.points.concat(e.points):"end-start"===n[0]&&(r=e.points.concat(t.points)),n.length,r):void 0}n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return f}),n.d(t,"g",function(){return p}),n.d(t,"f",function(){return h}),n.d(t,"e",function(){return c});var d=n(80)},function(e,t,n){!function(){"use strict";function t(e,t,n,r,i){"undefined"===typeof i&&(i=.5);var o=p.projectionratio(i,e),a=1-o,s={x:o*t.x+a*r.x,y:o*t.y+a*r.y},l=p.abcratio(i,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s}}var r=Math.abs,i=Math.min,o=Math.max,a=Math.cos,s=Math.sin,l=Math.acos,u=Math.sqrt,c=Math.PI,f={x:0,y:0,z:0},p=n(32),h=n(110),d=function(e){var t=e&&e.forEach?e:[].slice.call(arguments),n=!1;if("object"===typeof t[0]){n=t.length;var i=[];t.forEach(function(e){["x","y","z"].forEach(function(t){"undefined"!==typeof e[t]&&i.push(e[t])})}),t=i}var o=!1,a=t.length;if(n){if(n>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var s=!o&&(9===a||12===a)||e&&e[0]&&"undefined"!==typeof e[0].z;this._3d=s;for(var l=[],u=0,c=s?3:2;u1e-4)return void(e._linear=!1);e._linear=!0}(this),this._t1=0,this._t2=1,this.update()},v=n(111);d.SVGtoBeziers=function(e){return v(d,e)},d.quadraticFromPoints=function(e,n,r,i){if("undefined"===typeof i&&(i=.5),0===i)return new d(n,n,r);if(1===i)return new d(e,n,n);var o=t(2,e,n,r,i);return new d(e,o.A,r)},d.cubicFromPoints=function(e,n,r,i,o){"undefined"===typeof i&&(i=.5);var a=t(3,e,n,r,i);"undefined"===typeof o&&(o=p.dist(n,a.C));var s=o*(1-i)/i,l=p.dist(e,r),u=(r.x-e.x)/l,c=(r.y-e.y)/l,f=o*u,h=o*c,v=s*u,m=s*c,y={x:n.x-f,y:n.y-h},g={x:n.x+v,y:n.y+m},b=a.A,w={x:b.x+(y.x-b.x)/(1-i),y:b.y+(y.y-b.y)/(1-i)},x={x:b.x+(g.x-b.x)/i,y:b.y+(g.y-b.y)/i},k={x:e.x+(w.x-e.x)/i,y:e.y+(w.y-e.y)/i},E={x:r.x+(x.x-r.x)/(1-i),y:r.y+(x.y-r.y)/(1-i)};return new d(e,k,E,r)};var m=function(){return p};d.getUtils=m,d.PolyBezier=h,d.prototype={getUtils:m,valueOf:function(){return this.toString()},toString:function(){return p.pointsToString(this.points)},toSVG:function(e){if(this._3d)return!1;for(var t=this.points,n=t[0].x,r=t[0].y,i=["M",n,r,2===this.order?"Q":"C"],o=1,a=t.length;o1;t--,n--){for(var r,i=[],o=0;o0},length:function(){return p.length(this.derivative.bind(this))},_lut:[],getLUT:function(e){if(e=e||100,this._lut.length===e)return this._lut;this._lut=[],e--;for(var t=0;t<=e;t++)this._lut.push(this.compute(t/e));return this._lut},on:function(e,t){t=t||5;for(var n,r=this.getLUT(),i=[],o=0,a=0;a1;){for(var p=0;p1;){for(r=[],a=0,s=n.length-1;a=0&&e<=1}),i=i.concat(r[n].sort(p.numberSort))}.bind(this)),i=i.sort(p.numberSort).filter(function(e,t){return i.indexOf(e)===t}),r.values=i,r},bbox:function(){var e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=p.getminmax(this,n,e[n])}.bind(this)),t},overlaps:function(e){var t=this.bbox(),n=e.bbox();return p.bboxoverlap(t,n)},offset:function(e,t){if("undefined"!==typeof t){var n=this.get(e),r=this.normal(e),i={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(i.z=n.z+r.z*t),i}if(this._linear){var o=this.normal(0),a=this.points.map(function(t){var n={x:t.x+e*o.x,y:t.y+e*o.y};return t.z&&r.z&&(n.z=t.z+e*o.z),n});return[new d(a)]}return this.reduce().map(function(t){return t.scale(e)})},simple:function(){if(3===this.order){var e=p.angle(this.points[0],this.points[3],this.points[1]),t=p.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}var n=this.normal(0),i=this.normal(1),o=n.x*i.x+n.y*i.y;return this._3d&&(o+=n.z*i.z),r(l(o))1,s.endcap.virtual=o0&&(i=i.concat(t))}),i},arcs:function(e){e=e||.5;var t=[];return this._iterate(e,t)},_error:function(e,t,n,i){var o=(i-n)/4,a=this.get(n+o),s=this.get(i-o),l=p.dist(e,t),u=p.dist(e,a),c=p.dist(e,s);return r(u-l)+r(c-l)},_iterate:function(e,t){var n,r=0,i=1;do{n=0,i=1;var o,l,u,c,f,h=this.get(r),d=!1,v=!1,m=i,y=1,g=0;do{v=d,c=u,m=(r+i)/2,g++,o=this.get(m),l=this.get(i),u=p.getccenter(h,o,l),u.interval={start:r,end:i};if(d=this._error(u,h,r,i)<=e,f=v&&!d,f||(y=i),d){if(i>=1){if(u.interval.end=y=1,c=u,i>1){var b={x:u.x+u.r*a(u.e),y:u.y+u.r*s(u.e)};u.e+=p.angle({x:u.x,y:u.y},b,this.get(1))}break}i+=(i-r)/2}else i=m}while(!f&&n++<100);if(n>=100)break;c=c||u,t.push(c),r=y}while(i<1);return t}},e.exports=d}()},function(e,t,n){!function(){"use strict";var t=Math.abs,r=Math.cos,i=Math.sin,o=Math.acos,a=Math.atan2,s=Math.sqrt,l=Math.pow,u=function(e){return e<0?-l(-e,1/3):l(e,1/3)},c=Math.PI,f=2*c,p=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,d=Number.MIN_SAFE_INTEGER||-9007199254740991,v={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){var n=t(e),r=n.x*n.x+n.y*n.y;return"undefined"!==typeof n.z&&(r+=n.z*n.z),s(r)},between:function(e,t,n){return t<=e&&e<=n||v.approximately(e,t)||v.approximately(e,n)},approximately:function(e,n,r){return t(e-n)<=(r||1e-6)},length:function(e){var t,n,r=0,i=v.Tvalues.length;for(t=0;to.x.min&&(t=o.x.min),n>o.y.min&&(n=o.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,o.push(a))}})}),o},makeshape:function(e,t,n){var r=t.points.length,i=e.points.length,o=v.makeline(t.points[r-1],e.points[0]),a=v.makeline(e.points[i-1],t.points[0]),s={startcap:o,forward:e,back:t,endcap:a,bbox:v.findbbox([o,e,t,a])},l=v;return s.intersections=function(e){return l.shapeintersections(s,s.bbox,e,e.bbox,n)},s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};var r,i,o=h,a=d;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(var s=0,l=n.length;sa&&(a=i[t]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(e,t){var n=t.p1.x,o=t.p1.y,s=-a(t.p2.y-o,t.p2.x-n),l=function(e){return{x:(e.x-n)*r(s)-(e.y-o)*i(s),y:(e.x-n)*i(s)+(e.y-o)*r(s)}};return e.map(l)},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};var n=e.length-1,i=v.align(e,t),a=function(e){return 0<=e&&e<=1};if(2===n){var l=i[0].y,c=i[1].y,p=i[2].y,h=l-2*c+p;if(0!==h){var d=-s(c*c-l*p),m=-l+c,y=-(d+m)/h;return[y,-(-d+m)/h].filter(a)}return c!==p&&0===h?[(2*c-p)/2*(c-p)].filter(a):[]}var g=i[0].y,b=i[1].y,w=i[2].y,x=i[3].y,h=3*b-g-3*w+x,l=3*g-6*b+3*w,c=-3*g+3*b,p=g;if(v.approximately(h,0)){if(v.approximately(l,0))return v.approximately(c,0)?[]:[-p/c].filter(a);var k=s(c*c-4*l*p),E=2*l;return[(k-c)/E,(-c-k)/E].filter(a)}l/=h,c/=h,p/=h;var _,y,P,C,T,i=(3*c-l*l)/3,S=i/3,k=(2*l*l*l-9*l*c+27*p)/27,A=k/2,M=A*A+S*S*S;if(M<0){var O=-i/3,R=O*O*O,z=s(R),L=-k/(2*z),N=L<-1?-1:L>1?1:L,I=o(N),j=u(z),D=2*j;return P=D*r(I/3)-l/3,C=D*r((I+f)/3)-l/3,T=D*r((I+2*f)/3)-l/3,[P,C,T].filter(a)}if(0===M)return _=A<0?u(-A):-u(A),P=2*_-l/3,C=-_-l/3,[P,C].filter(a);var B=s(M);return _=u(-A+B),y=u(A+B),[_-y-l/3].filter(a)},droots:function(e){if(3===e.length){var t=e[0],n=e[1],r=e[2],i=t-2*n+r;if(0!==i){var o=-s(n*n-t*r),a=-t+n;return[-(o+a)/i,-(-o+a)/i]}return n!==r&&0===i?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){var t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}},inflections:function(e){if(e.length<4)return[];var t=v.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,i=t[1].x*t[2].y,o=t[3].x*t[2].y,a=18*(-3*n+2*r+3*i-o),s=18*(3*n-r-3*i),l=18*(i-n);if(v.approximately(a,0)){if(!v.approximately(s,0)){var u=-l/s;if(0<=u&&u<=1)return[u]}return[]}var c=s*s-4*a*l,f=Math.sqrt(c),o=2*a;return v.approximately(o,0)?[]:[(f-s)/o,-(s+f)/o].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){var r,i,o,a,s,l=["x","y"],u=l.length;for(r=0;r=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){var r=e.bbox(),i=t.bbox(),o=1e5,a=n||.5;if(r.x.size+r.y.sizeA||A>M)&&(S+=f),S>M&&(o=M,M=S,S=o)):Mu){for(var t=0,n=a.length-l;t-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function v(e){var t=new i;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];m.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=h,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var i=new h(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new m(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&y.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(41),a=n.n(o),s=n(20),l=n(75),u=(n.n(l),n(76));a.a.render(i.a.createElement(s.a,null,i.a.createElement(u.a,null)),document.getElementById("root"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rD.length&&D.push(e)}function p(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:a=!0}}if(a)return n(i,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function B(e){e.eventPool=[],e.getPooled=j,e.release=D}function U(e,t){switch(e){case"keyup":return-1!==ki.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function F(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function J(e,t){switch(e){case"compositionend":return F(t);case"keypress":return 32!==t.which?null:(Ai=!0,Ti);case"textInput":return e=t.data,e===Ti&&Ai?null:e;default:return null}}function V(e,t){if(Mi)return"compositionend"===e||!Ei&&U(e,t)?(e=L(),yi._root=null,yi._startText=null,yi._fallbackText=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function pe(e){return e[1].toUpperCase()}function he(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(null!==i?0===i.type:!r&&(2Oo.length&&Oo.push(e)}}}function Ze(e){return Object.prototype.hasOwnProperty.call(e,Io)||(e[Io]=No++,Lo[e[Io]]={}),Lo[e[Io]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ye(e,t){var n=He(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=He(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Xe(e,t){if(Jo||null==Bo||Bo!==Br())return null;var n=Bo;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Fo&&Ur(Fo,n)?null:(Fo=n,e=I.getPooled(Do.select,Uo,e,t),e.type="select",e.target=Bo,A(e),e)}function Ge(e){var t="";return Nr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function $e(e,t){return e=jr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Qe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function it(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function ot(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ot(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function st(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||va.hasOwnProperty(i)&&va[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function ut(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function ct(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ze(e);t=Kr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function ht(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function dt(e,t,n,r){var i=ct(t,n);switch(t){case"iframe":case"object":Je("load",e);var o=n;break;case"video":case"audio":for(o=0;oCa||(e.current=Pa[Ca],Pa[Ca]=null,Ca--)}function Pt(e,t){Ca++,Pa[Ca]=e.current,e.current=t}function Ct(e){return St(e)?Aa:Ta.current}function Tt(e,t){var n=e.type.contextTypes;if(!n)return Jr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function St(e){return 2===e.tag&&null!=e.type.childContextTypes}function At(e){St(e)&&(_t(Sa,e),_t(Ta,e))}function Mt(e){_t(Sa,e),_t(Ta,e)}function Ot(e,t,n){Ta.current!==Jr&&r("168"),Pt(Ta,t,e),Pt(Sa,n,e)}function Rt(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ae(e)||"Unknown",o);return jr({},t,n)}function zt(e){if(!St(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Jr,Aa=Ta.current,Pt(Ta,t,e),Pt(Sa,Sa.current,e),!0}function Lt(e,t){var n=e.stateNode;if(n||r("169"),t){var i=Rt(e,Aa);n.__reactInternalMemoizedMergedChildContext=i,_t(Sa,e),_t(Ta,e),Pt(Ta,i,e)}else _t(Sa,e);Pt(Sa,t,e)}function Nt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function It(e,t,n){var r=e.alternate;return null===r?(r=new Nt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function jt(e,t,n){var i=e.type,o=e.key;if(e=e.props,"function"===typeof i)var a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case Vi:return Dt(e.children,t,n,o);case Yi:a=11,t|=3;break;case qi:a=11,t|=2;break;case Wi:return i=new Nt(15,e,o,4|t),i.type=Wi,i.expirationTime=n,i;case Xi:a=16,t|=2;break;default:e:{switch("object"===typeof i&&null!==i?i.$$typeof:null){case Zi:a=13;break e;case Hi:a=12;break e;case Ki:a=14;break e;default:r("130",null==i?i:typeof i,"")}a=void 0}}return t=new Nt(a,e,o,t),t.type=i,t.expirationTime=n,t}function Dt(e,t,n,r){return e=new Nt(10,e,r,t),e.expirationTime=n,e}function Bt(e,t,n){return e=new Nt(6,e,null,t),e.expirationTime=n,e}function Ut(e,t,n){return t=new Nt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ft(e,t,n){return t=new Nt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Jt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ma=Jt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Jt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function qt(e){"function"===typeof Ma&&Ma(e)}function Wt(e){"function"===typeof Oa&&Oa(e)}function Zt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Kt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Xt(e,t,n){var r=e.alternate;if(null===r){var i=e.updateQueue,o=null;null===i&&(i=e.updateQueue=Zt(e.memoizedState))}else i=e.updateQueue,o=r.updateQueue,null===i?null===o?(i=e.updateQueue=Zt(e.memoizedState),o=r.updateQueue=Zt(r.memoizedState)):i=e.updateQueue=Ht(o):null===o&&(o=r.updateQueue=Ht(i));null===o||i===o?Kt(i,t,n):null===i.lastUpdate||null===o.lastUpdate?(Kt(i,t,n),Kt(o,t,n)):(Kt(i,t,n),o.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Zt(e.memoizedState):$t(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function $t(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ht(t)),t}function Qt(e,t,n,r,i,o){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(o,r,i):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(i="function"===typeof e?e.call(o,r,i):e)||void 0===i)break;return jr({},r,i);case 2:Ra=!0}return r}function en(e,t,n,r,i){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>i)){t=$t(e,t);for(var o=t.baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c>i?(null===a&&(a=l,o=u),(0===s||s>c)&&(s=c)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var f=l.expirationTime;f>i?(null===c&&(c=l,null===a&&(o=u)),(0===s||s>f)&&(s=f)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=s,e.memoizedState=u}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:se(t)}}function on(e){var t=e.type._context;Pt(Na,t._changedBits,e),Pt(La,t._currentValue,e),Pt(za,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Na.current,n=La.current;_t(za,e),_t(La,e),_t(Na,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function sn(e){return e===Ia&&r("174"),e}function ln(e,t){Pt(Ba,t,e),Pt(Da,e,e),Pt(ja,Ia,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}_t(ja,e),Pt(ja,t,e)}function un(e){_t(ja,e),_t(Da,e),_t(Ba,e)}function cn(e){Da.current===e&&(_t(ja,e),_t(Da,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:jr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function pn(e,t,n,r,i,o){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(t,n)||!Ur(r,i))}function hn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function dn(e,t){var n=e.type,r=e.stateNode,i=e.pendingProps,o=Ct(e);r.props=i,r.state=e.memoizedState,r.refs=Jr,r.context=Tt(e,o),o=e.updateQueue,null!==o&&(en(e,o,i,r,t),r.state=e.memoizedState),o=e.type.getDerivedStateFromProps,"function"===typeof o&&(fn(e,o,i),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Ua.enqueueReplaceState(r,r.state,null),null!==(o=e.updateQueue)&&(en(e,o,i,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function vn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===Jr?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function mn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=It(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rv?(m=f,f=null):m=f.sibling;var y=h(r,f,s[v],l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),o=a(y,o,v),null===c?u=y:c.sibling=y,c=y,f=m}if(v===s.length)return n(r,f),u;if(null===f){for(;vm?(y=v,v=null):y=v.sibling;var b=h(o,v,g.value,u);if(null===b){v||(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=a(b,s,m),null===f?c=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),c;if(null===v){for(;!g.done;m++,g=l.next())null!==(g=p(o,g.value,u))&&(s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return c}for(v=i(o,v);!g.done;m++,g=l.next())null!==(g=d(v,o,m,g.value,u))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach(function(e){return t(o,e)}),c}return function(e,i,a,l){var u="object"===typeof a&&null!==a&&a.type===Vi&&null===a.key;u&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case Fi:e:{for(c=a.key,u=i;null!==u;){if(u.key===c){if(10===u.tag?a.type===Vi:u.type===a.type){n(e,u.sibling),i=o(u,a.type===Vi?a.props.children:a.props,l),i.ref=vn(e,u,a),i.return=e,e=i;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===Vi?(i=Dt(a.props.children,e.mode,l,a.key),i.return=e,e=i):(l=jt(a,e.mode,l),l.ref=vn(e,i,a),l.return=e,e=l)}return s(e);case Ji:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],l),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=Ut(a,e.mode,l),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,l),i.return=e,e=i):(n(e,i),i=Bt(a,e.mode,l),i.return=e,e=i),s(e);if(Fa(a))return v(e,i,a,l);if(oe(a))return m(e,i,a,l);if(c&&mn(e,a),"undefined"===typeof a&&!u)switch(e.tag){case 2:case 1:l=e.type,r("152",l.displayName||l.name||"Component")}return n(e,i)}}function gn(e,t){var n=new Nt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if(Za){var t=Wa;if(t){var n=t;if(!bn(e,t)){if(!(t=xt(n))||!bn(e,t))return e.effectTag|=2,Za=!1,void(qa=e);gn(qa,n)}qa=e,Wa=kt(t)}else e.effectTag|=2,Za=!1,qa=e}}function xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;qa=e}function kn(e){if(e!==qa)return!1;if(!Za)return xn(e),Za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Wa;t;)gn(e,t),t=xt(t);return xn(e),Wa=qa?xt(e.stateNode):null,!0}function En(){Wa=qa=null,Za=!1}function _n(e,t,n){Pn(e,t,n,t.expirationTime)}function Pn(e,t,n,r){t.child=null===e?Va(t,null,n,r):Ja(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Tn(e,t,n,r,i){Cn(e,t);var o=0!==(64&t.effectTag);if(!n&&!o)return r&&Lt(t,!1),On(e,t);n=t.stateNode,Bi.current=t;var a=o?null:n.render();return t.effectTag|=1,o&&(Pn(e,t,null,i),t.child=null),Pn(e,t,a,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Lt(t,!0),t.child}function Sn(e){var t=e.stateNode;t.pendingContext?Ot(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(e,t.context,!1),ln(e,t.containerInfo)}function An(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Mn(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(o===i)return t.stateNode=0,on(t),On(e,t);var s=i.value;if(t.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else{var l=o.value;if(l===s&&(0!==l||1/l===1/s)||l!==l&&s!==s){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else if(s="function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,s):1073741823,0===(s|=0)){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t)}else An(t,r,s,n)}return t.stateNode=s,on(t),_n(e,t,i.children),t.child}function On(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=It(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=It(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Rn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Sn(t);break;case 2:zt(t);break;case 4:ln(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=Ct(t);return a=Tt(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,o),o=zt(t),i.updater=Ua,t.stateNode=i,i._reactInternalFiber=t,dn(t,n),e=Tn(e,t,!0,o,n)):(t.tag=1,_n(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(i=Ct(t),i=Tt(t,i),o=o(n,i),t.effectTag|=1,_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 2:if(o=zt(t),null===e)if(null===t.stateNode){var s=t.pendingProps,l=t.type;i=Ct(t);var u=2===t.tag&&null!=t.type.contextTypes;a=u?Tt(t,i):Jr,s=new l(s,a),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=Ua,t.stateNode=s,s._reactInternalFiber=t,u&&(u=t.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=i,u.__reactInternalMemoizedMaskedChildContext=a),dn(t,n),i=!0}else{l=t.type,i=t.stateNode,u=t.memoizedProps,a=t.pendingProps,i.props=u;var c=i.context;s=Ct(t),s=Tt(t,s);var f=l.getDerivedStateFromProps;(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(u!==a||c!==s)&&hn(t,i,a,s),Ra=!1;var p=t.memoizedState;c=i.state=p;var h=t.updateQueue;null!==h&&(en(t,h,a,i,n),c=t.memoizedState),u!==a||p!==c||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),c=t.memoizedState),(u=Ra||pn(t,u,a,p,c,s))?(l||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.effectTag|=4)):("function"===typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,i=u):("function"===typeof i.componentDidMount&&(t.effectTag|=4),i=!1)}else l=t.type,i=t.stateNode,a=t.memoizedProps,u=t.pendingProps,i.props=a,c=i.context,s=Ct(t),s=Tt(t,s),f=l.getDerivedStateFromProps,(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(a!==u||c!==s)&&hn(t,i,u,s),Ra=!1,c=t.memoizedState,p=i.state=c,h=t.updateQueue,null!==h&&(en(t,h,u,i,n),p=t.memoizedState),a!==u||c!==p||Sa.current||Ra?("function"===typeof f&&(fn(t,f,u),p=t.memoizedState),(f=Ra||pn(t,a,u,c,p,s))?(l||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(u,p,s),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(u,p,s)),"function"===typeof i.componentDidUpdate&&(t.effectTag|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),i.props=u,i.state=p,i.context=s,i=f):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),i=!1);return Tn(e,t,i,o,n);case 3:return Sn(t),o=t.updateQueue,null!==o?(i=t.memoizedState,i=null!==i?i.element:null,en(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(En(),e=On(e,t)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Wa=kt(t.stateNode.containerInfo),qa=t,i=Za=!0),i?(t.effectTag|=2,t.child=Va(t,null,o,n)):(En(),_n(e,t,o)),e=t.child)):(En(),e=On(e,t)),e;case 5:return sn(Ba.current),o=sn(ja.current),i=at(o,t.type),o!==i&&(Pt(Da,t,t),Pt(ja,i,t)),null===e&&wn(t),o=t.type,u=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||u!==i||((u=1&t.mode&&!!i.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=i.children,wt(o,i)?u=null:a&&wt(o,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(_n(e,t,u),t.memoizedProps=i,e=t.child)):e=On(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ln(t,t.stateNode.containerInfo),o=t.pendingProps,Sa.current||t.memoizedProps!==o?(null===e?t.child=Ja(t,null,o,n):_n(e,t,o),t.memoizedProps=o,e=t.child):e=On(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,i=t.ref,Sa.current||t.memoizedProps!==n||i!==(null!==e?e.ref:null)?(o=o(n,i),_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=On(e,t):(_n(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Mn(e,t,n);case 12:e:if(i=t.type,a=t.pendingProps,u=t.memoizedProps,o=i._currentValue,s=i._changedBits,Sa.current||0!==s||u!==a){if(t.memoizedProps=a,l=a.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(s&l))An(t,i,s,n);else if(u===a){e=On(e,t);break e}n=a.children,n=n(o),t.effectTag|=1,_n(e,t,n),e=t.child}else e=On(e,t);return e;default:r("156")}}function zn(e){e.effectTag|=4}function Ln(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return At(t),null;case 3:un(t),Mt(t);var i=t.stateNode;return i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),Ha(t),null;case 5:cn(t),i=sn(Ba.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,s=t.stateNode,l=sn(ja.current);s=vt(s,o,a,n,i),Ya(e,t,s,o,a,n,i,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=sn(ja.current),kn(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[ii]=t,n[oi]=a,i=yt(n,o,a,e,i),t.updateQueue=i,null!==i&&zn(t);else{e=pt(o,n,i,e),e[ii]=t,e[oi]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}dt(e,o,n,i),bt(o,n)&&zn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;i=sn(Ba.current),sn(ja.current),kn(t)?(i=t.stateNode,n=t.memoizedProps,i[ii]=t,gt(i,n)&&zn(t)):(i=ht(n,i),i[ii]=t,t.stateNode=i)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return un(t),Ha(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Nn(e,t){var n=t.source;null===t.stack&&null!==n&&se(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function In(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Xn(e,t)}else t.current=null}function jn(e){switch("function"===typeof Wt&&Wt(e),e.tag){case 2:In(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Xn(e,t)}break;case 5:In(e);break;case 4:Un(e)}}function Dn(e){return 5===e.tag||3===e.tag||4===e.tag}function Bn(e){e:{for(var t=e.return;null!==t;){if(Dn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(st(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Dn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(i){var a=t,s=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(s,l):a.insertBefore(s,l)}else t.insertBefore(o.stateNode,n);else i?(a=t,s=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(s,a):a.appendChild(s)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Un(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,s=a;;)if(jn(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}o?(a=i,s=t.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):i.removeChild(t.stateNode)}else if(4===t.tag?i=t.stateNode.containerInfo:jn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Fn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[oi]=i,mt(n,a,o,e,i))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Jn(e,t,n){n=Yt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dr(r),Nn(e,t)},n}function Vn(e,t,n){n=Yt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cs?cs=new Set([this]):cs.add(this);var n=t.value,r=t.stack;Nn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qn(e,t,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Jn(e,r,o),void Gt(e,r,o);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cs||!cs.has(n)))return e.effectTag|=1024,r=Vn(e,t,o),void Gt(e,r,o)}e=e.return}while(null!==e)}function Wn(e){switch(e.tag){case 2:At(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return un(e),Mt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return un(e),null;case 13:return an(e),null;default:return null}}function Zn(){if(null!==ns)for(var e=ns.return;null!==e;){var t=e;switch(t.tag){case 2:At(t);break;case 3:un(t),Mt(t);break;case 5:cn(t);break;case 4:un(t);break;case 13:an(t)}e=e.return}rs=null,is=0,os=-1,as=!1,ns=null,us=!1}function Hn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Ln(t,e,is);var i=e;if(1073741823===is||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1gs)&&(gs=e),e}function Qn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ts&&0!==is&&tTs&&r("185")}e=e.return}}function er(){return $a=ka()-Xa,Ga=2+($a/10|0)}function tr(e){var t=es;es=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{es=t}}function nr(e,t,n,r,i){var o=es;es=1;try{return e(t,n,r,i)}finally{es=o}}function rr(e){if(0!==hs){if(e>hs)return;null!==ds&&_a(ds)}var t=ka()-Xa;hs=e,ds=Ea(ar,{timeout:10*(e-2)-t})}function ir(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ps?(fs=ps=e,e.nextScheduledRoot=e):(ps=ps.nextScheduledRoot=e,ps.nextScheduledRoot=fs);else{var n=e.remainingExpirationTime;(0===n||t=ys)&&(!bs||er()>=ys);)er(),fr(ms,ys,!bs),or();else for(;null!==ms&&0!==ys&&(0===e||e>=ys);)fr(ms,ys,!1),or();null!==ks&&(hs=0,ds=null),0!==ys&&rr(ys),ks=null,bs=!1,cr()}function ur(e,t){vs&&r("253"),ms=e,ys=t,fr(e,t,!1),sr(),cr()}function cr(){if(Ss=0,null!==Cs){var e=Cs;Cs=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Ye(_,C),x=Ye(_,b),w&&x&&(1!==P.rangeCount||P.anchorNode!==w.node||P.anchorOffset!==w.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),P.removeAllRanges(),C>b?(P.addRange(k),P.extend(x.node,x.offset)):(k.setEnd(x.node,x.offset),P.addRange(k))))),P=[];for(C=_;C=C.parentNode;)1===C.nodeType&&P.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_As)&&(bs=!0)}function dr(e){null===ms&&r("246"),ms.remainingExpirationTime=0,ws||(ws=!0,xs=e)}function vr(e){null===ms&&r("246"),ms.remainingExpirationTime=e}function mr(e,t){var n=Es;Es=!0;try{return e(t)}finally{(Es=n)||vs||sr()}}function yr(e,t){if(Es&&!_s){_s=!0;try{return e(t)}finally{_s=!1}}return e(t)}function gr(e,t){vs&&r("187");var n=Es;Es=!0;try{return nr(e,t)}finally{Es=n,sr()}}function br(e,t,n){if(Ps)return e(t,n);Es||vs||0===gs||(lr(gs,!1,null),gs=0);var r=Ps,i=Es;Es=Ps=!0;try{return e(t,n)}finally{Ps=r,(Es=i)||vs||sr()}}function wr(e){var t=Es;Es=!0;try{nr(e)}finally{(Es=t)||vs||lr(1,!1,null)}}function xr(e,t,n,i,o){var a=t.current;if(n){n=n._reactInternalFiber;var s;e:{for(2===ze(n)&&2===n.tag||r("170"),s=n;3!==s.tag;){if(St(s)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}(s=s.return)||r("171")}s=s.stateNode.context}n=St(n)?Rt(n,s):s}else n=Jr;return null===t.context?t.context=n:t.pendingContext=n,t=o,o=Yt(i),o.payload={element:e},t=void 0===t?null:t,null!==t&&(o.callback=t),Xt(a,o,i),Qn(a,i),i}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Ie(t),null===e?null:e.stateNode}function Er(e,t,n,r){var i=t.current;return i=$n(er(),i),xr(e,t,n,i,r)}function _r(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Pr(e){var t=e.findFiberByHostInstance;return Vt(jr({},e,{findHostInstanceByFiber:function(e){return e=Ie(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=_i),Ti=String.fromCharCode(32),Si={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ai=!1,Mi=!1,Oi={eventTypes:Si,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Ei)e:{switch(e){case"compositionstart":i=Si.compositionStart;break e;case"compositionend":i=Si.compositionEnd;break e;case"compositionupdate":i=Si.compositionUpdate;break e}i=void 0}else Mi?U(e,n)&&(i=Si.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Si.compositionStart);return i?(Ci&&(Mi||i!==Si.compositionStart?i===Si.compositionEnd&&Mi&&(o=L()):(yi._root=r,yi._startText=N(),Mi=!0)),i=wi.getPooled(i,t,n,r),o?i.data=o:null!==(o=F(n))&&(i.data=o),A(i),o=i):o=null,(e=Pi?J(e,n):V(e,n))?(t=xi.getPooled(Si.beforeInput,t,n,r),t.data=e,A(t)):t=null,null===o?t:null===t?o:[o,t]}},Ri=null,zi={injectFiberControlledHostComponent:function(e){Ri=e}},Li=null,Ni=null,Ii={injection:zi,enqueueStateRestore:W,needsStateRestore:Z,restoreStateIfNeeded:H},ji=!1,Di={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Bi=Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ui="function"===typeof Symbol&&Symbol.for,Fi=Ui?Symbol.for("react.element"):60103,Ji=Ui?Symbol.for("react.portal"):60106,Vi=Ui?Symbol.for("react.fragment"):60107,qi=Ui?Symbol.for("react.strict_mode"):60108,Wi=Ui?Symbol.for("react.profiler"):60114,Zi=Ui?Symbol.for("react.provider"):60109,Hi=Ui?Symbol.for("react.context"):60110,Yi=Ui?Symbol.for("react.async_mode"):60111,Ki=Ui?Symbol.for("react.forward_ref"):60112,Xi=Ui?Symbol.for("react.timeout"):60113,Gi="function"===typeof Symbol&&Symbol.iterator,$i=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qi=Object.prototype.hasOwnProperty,eo={},to={},no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){no[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){no[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){no[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){no[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){no[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){no[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ro=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),no.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var io={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},oo=null,ao=null,so=!1;Ir.canUseDOM&&(so=ee("input")&&(!document.documentMode||9=document.documentMode,Do={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Bo=null,Uo=null,Fo=null,Jo=!1,Vo={eventTypes:Do,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ze(o),i=Kr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Qo;null!==r;){var i=r.timeoutTime;-1!==i&&i<=t?n.push(r):-1!==i&&(-1===e||it&&(t=8),aa=t"+t+"",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),va={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ma=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});var ya=jr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ga=Dr.thatReturns(""),ba={createElement:pt,createTextNode:ht,setInitialProperties:dt,diffProperties:vt,updateProperties:mt,diffHydratedProperties:yt,diffHydratedText:gt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,forceRefresh:f.a.bool,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node}},function(e,t,n){"use strict";function r(){}var i=n(51);e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Browser history needs a DOM");var t=window.history,n=Object(c.g)(),r=!Object(c.h)(),o=e.forceRefresh,d=void 0!==o&&o,v=e.getUserConfirmation,m=void 0===v?c.c:v,y=e.keyLength,g=void 0===y?6:y,b=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",w=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname,u=o.search,c=o.hash,f=a+u+c;return i()(!b||Object(l.c)(f,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+f+'" to begin with "'+b+'".'),b&&(f=Object(l.e)(f,b)),Object(s.a)(f,r,n)},x=function(){return Math.random().toString(36).substr(2,g)},k=Object(u.a)(),E=function(e){p(J,e),J.length=t.length,k.notifyListeners(J.location,J.action)},_=function(e){Object(c.d)(e)||T(w(e.state))},P=function(){T(w(h()))},C=!1,T=function(e){if(C)C=!1,E();else{k.confirmTransitionTo(e,"POP",m,function(t){t?E({action:"POP",location:e}):S(e)})}},S=function(e){var t=J.location,n=M.indexOf(t.key);-1===n&&(n=0);var r=M.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(C=!0,L(i))},A=w(h()),M=[A.key],O=function(e){return b+Object(l.b)(e)},R=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"PUSH",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.pushState({key:a,state:s},null,r),d)window.location.href=r;else{var l=M.indexOf(J.location.key),u=M.slice(0,-1===l?0:l+1);u.push(o.key),M=u,E({action:"PUSH",location:o})}else i()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},z=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"REPLACE",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.replaceState({key:a,state:s},null,r),d)window.location.replace(r);else{var l=M.indexOf(J.location.key);-1!==l&&(M[l]=o.key),E({action:"REPLACE",location:o})}else i()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},L=function(e){t.go(e)},N=function(){return L(-1)},I=function(){return L(1)},j=0,D=function(e){j+=e,1===j?(Object(c.a)(window,"popstate",_),r&&Object(c.a)(window,"hashchange",P)):0===j&&(Object(c.e)(window,"popstate",_),r&&Object(c.e)(window,"hashchange",P))},B=!1,U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=k.setPrompt(e);return B||(D(1),B=!0),function(){return B&&(B=!1,D(-1)),t()}},F=function(e){var t=k.appendListener(e);return D(1),function(){D(-1),t()}},J={length:t.length,action:"POP",location:A,createHref:O,push:R,replace:z,go:L,goBack:N,goForward:I,block:U,listen:F};return J};t.a=d},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),l=a||s;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var u=void 0;if(o.length){var c=o[o.length-1];u="."===c||".."===c||""===c}else u=!1;for(var f=0,p=o.length;p>=0;p--){var h=o[p];"."===h?i(o,p):".."===h?(i(o,p),f++):f&&(i(o,p),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}t.a=o},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":i(e);if(n!==("undefined"===typeof t?"undefined":i(t)))return!1;if("object"===n){var o=e.valueOf(),a=t.valueOf();if(o!==e||a!==t)return r(o,a);var s=Object.keys(e),l=Object.keys(t);return s.length===l.length&&s.every(function(n){return r(e[n],t[n])})}return!1}var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=r},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Hash history needs a DOM");var t=window.history,n=Object(c.f)(),r=e.getUserConfirmation,o=void 0===r?c.c:r,m=e.hashType,y=void 0===m?"slash":m,g=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",b=p[y],w=b.encodePath,x=b.decodePath,k=function(){var e=x(h());return i()(!g||Object(l.c)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=Object(l.e)(e,g)),Object(s.a)(e)},E=Object(u.a)(),_=function(e){f(W,e),W.length=t.length,E.notifyListeners(W.location,W.action)},P=!1,C=null,T=function(){var e=h(),t=w(e);if(e!==t)v(t);else{var n=k(),r=W.location;if(!P&&Object(s.b)(r,n))return;if(C===Object(l.b)(n))return;C=null,S(n)}},S=function(e){if(P)P=!1,_();else{E.confirmTransitionTo(e,"POP",o,function(t){t?_({action:"POP",location:e}):A(e)})}},A=function(e){var t=W.location,n=z.lastIndexOf(Object(l.b)(t));-1===n&&(n=0);var r=z.lastIndexOf(Object(l.b)(e));-1===r&&(r=0);var i=n-r;i&&(P=!0,j(i))},M=h(),O=w(M);M!==O&&v(O);var R=k(),z=[Object(l.b)(R)],L=function(e){return"#"+w(g+Object(l.b)(e))},N=function(e,t){i()(void 0===t,"Hash history cannot push state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"PUSH",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);if(h()!==r){C=t,d(r);var o=z.lastIndexOf(Object(l.b)(W.location)),a=z.slice(0,-1===o?0:o+1);a.push(t),z=a,_({action:"PUSH",location:n})}else i()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),_()}})},I=function(e,t){i()(void 0===t,"Hash history cannot replace state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"REPLACE",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);h()!==r&&(C=t,v(r));var i=z.indexOf(Object(l.b)(W.location));-1!==i&&(z[i]=t),_({action:"REPLACE",location:n})}})},j=function(e){i()(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},D=function(){return j(-1)},B=function(){return j(1)},U=0,F=function(e){U+=e,1===U?Object(c.a)(window,"hashchange",T):0===U&&Object(c.e)(window,"hashchange",T)},J=!1,V=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return J||(F(1),J=!0),function(){return J&&(J=!1,F(-1)),t()}},q=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},W={length:t.length,action:"POP",location:R,createHref:L,push:N,replace:I,go:j,goBack:D,goForward:B,block:V,listen:q};return W};t.a=m},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(5),a=n(7),s=n(9),l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,f=e.initialIndex,p=void 0===f?0:f,h=e.keyLength,d=void 0===h?6:h,v=Object(s.a)(),m=function(e){u(A,e),A.length=A.entries.length,v.notifyListeners(A.location,A.action)},y=function(){return Math.random().toString(36).substr(2,d)},g=c(p,0,r.length-1),b=r.map(function(e){return"string"===typeof e?Object(a.a)(e,void 0,y()):Object(a.a)(e,void 0,e.key||y())}),w=o.b,x=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=A.index,n=t+1,i=A.entries.slice(0);i.length>n?i.splice(n,i.length-n,r):i.push(r),m({action:"PUSH",location:r,index:n,entries:i})}})},k=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(A.entries[A.index]=r,m({action:"REPLACE",location:r}))})},E=function(e){var n=c(A.index+e,0,A.entries.length-1),r=A.entries[n];v.confirmTransitionTo(r,"POP",t,function(e){e?m({action:"POP",location:r,index:n}):m()})},_=function(){return E(-1)},P=function(){return E(1)},C=function(e){var t=A.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return v.setPrompt(e)},S=function(e){return v.appendListener(e)},A={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:w,push:x,replace:k,go:E,goBack:_,goForward:P,canGo:C,block:T,listen:S};return A};t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(10),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,getUserConfirmation:f.a.func,hashType:f.a.oneOf(["hashbang","noslash","slash"]),children:f.a.node},t.a=d},function(e,t,n){"use strict";var r=n(59);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(11),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={initialEntries:f.a.array,initialIndex:f.a.number,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node},t.a=d},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(23),u=n(22),c=Object.assign||function(e){for(var t=1;t outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);p.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},p.defaultProps={when:!0},p.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired},t.a=p},function(e,t,n){"use strict";var r=n(65);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(4),v=n(26),m=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.c)(e.to),n=Object(d.c)(this.props.to);if(Object(d.f)(t,n))return void f()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"===typeof n?Object(v.a)(n,t.params):m({},n,{pathname:Object(v.a)(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";var r=n(67);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(3),l=n.n(s),u=n(2),c=n.n(u),f=n(0),p=n.n(f),h=n(1),d=n.n(h),v=n(4),m=n(11),y=Object.assign||function(e){for(var t=1;t",e)}},E=function(){},_=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),i=r(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:w(t,Object(v.c)(n)),push:this.handlePush,replace:this.handleReplace,go:k("go"),goBack:k("goBack"),goForward:k("goForward"),listen:this.handleListen,block:this.handleBlock};return p.a.createElement(m.a,y({},i,{history:o}))},t}(p.a.Component);_.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},_.defaultProps={basename:"",location:"/"},_.childContextTypes={router:d.a.object.isRequired},t.a=_},function(e,t,n){"use strict";var r=n(69);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(12),v=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){f()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),f()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return s.a.Children.forEach(t,function(t){if(null==r&&s.a.isValidElement(t)){var o=t.props,a=o.path,l=o.exact,u=o.strict,c=o.sensitive,f=o.from,p=a||f;i=t,r=Object(d.a)(n.pathname,{path:p,exact:l,strict:u,sensitive:c},e.match)}}),r?s.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(s.a.Component);v.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},v.propTypes={children:u.a.node,location:u.a.object},t.a=v},function(e,t,n){"use strict";var r=n(26);r.a},function(e,t,n){"use strict";var r=n(12);r.a},function(e,t,n){"use strict";var r=n(73);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(74),u=n.n(l),c=n(24),f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"other";this.globalStopEditingMode(),this.addCursorPoint();var t=this.state.polylines,n=new c.a({points:[],id:this.id,type:e,selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});t.push(n),this.id++,this.setState({polylines:t,active_polyline:n})}},{key:"selectLayer",value:function(e){var t=this;this.state.active_polyline&&this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"}),this.setState({active_polyline:this.getPolylineById(e)},function(){t.state.polylines.forEach(function(e){e.el.classList.remove("active")}),t.state.active_polyline.el.classList.toggle("active")})}},{key:"unselect_polyline",value:function(e){console.log(e.code),"Escape"!==e.code&&"KeyQ"!==e.code||(this.state.active_polyline&&(this.state.active_polyline.el.classList.remove("active"),this.state.active_polyline.stopEditing({code:"Escape"}),this.state.active_polyline.editing&&this.state.active_polyline.stopEditingPoints({code:"Escape"}),this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"})),this.setState({active_polyline:void 0}),Object(m.g)(this.state.polylines),this.checkProfile("int_prof"),this.checkProfile("out_prof"),this.new_point.added&&this.removeCursorPoint(),this.state.polylines.forEach(function(e){e.points.length<2&&(this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.id})}),this.canvas.removeChild(e.el))}.bind(this)))}},{key:"globalStopEditingMode",value:function(){this.state.polylines.forEach(function(e){e.el.classList.remove("active")}),this.state.active_polyline&&this.state.active_polyline.stopEditing({code:"Escape"})}},{key:"addNotification",value:function(e){this.setState({notification:{id:this.not_id,message:e}}),this.not_id++}},{key:"getPolylineById",value:function(e){return this.state.polylines.filter(function(t){return t.id===e})[0]}},{key:"addCursorPoint",value:function(){this.canvas.appendChild(this.new_point.el),this.new_point.added=!0,this.new_point.select()}},{key:"removeCursorPoint",value:function(){this.canvas.removeChild(this.new_point.el),this.new_point.added=!1}},{key:"updateToDo",value:function(e,t){var n=this.state.toDo;n[e]=t,this.setState({toDo:n})}},{key:"checkProfile",value:function(e){var t=this.state.polylines.filter(function(t){return t.type===e});if(0===t.length)this.updateToDo(e,!1),"int_prof"===e&&this.inner_poly&&(this.canvas.removeChild(this.inner_poly),this.inner_poly=null,this.setState({vessel_capacity:null})),this.vessel_poly&&(this.canvas.removeChild(this.vessel_poly),this.vessel_poly=null,this.setState({vessel_volume:null}));else if(1===t.length)this.updateToDo(e,!0);else{this.updateToDo(e,!1);var n="int_prof"===e?"internal profile":"outer profile";this.addNotification("There should be only one "+n)}}},{key:"joinIntExt",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type})[0],t=this.state.polylines.filter(function(e){return"out_prof"===e.type})[0];if(!e||!t)return void this.addNotification("To calculate vessel volume you need both internal and outer profiles");if(this.vesselVolume=Object(m.f)(e,t),!this.vesselVolume)return void this.addNotification("To calculate vessel volume internal and outer profiles have to share at least one vertex");this.vessel_poly&&this.canvas.removeChild(this.vessel_poly),this.vessel_poly=Object(m.d)(this.vesselVolume,"rgba(170, 170, 170, 0.6)");var n=Object(m.b)(this.vesselVolume,this.scale);this.setState({vessel_volume:n}),this.canvas.appendChild(this.vessel_poly)}},{key:"create_inner_polygon",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(0===e.length)return void this.addNotification("To calculate vessel capacity you need an internal profile");if(this.inner_poly&&this.canvas.removeChild(this.inner_poly),this.innerPolygon=Object(m.e)(e[0].points.slice()),this.inner_poly=Object(m.d)(this.innerPolygon,"rgba(210, 204, 78, 0.28)"),this.scale){var t=Object(m.b)(this.innerPolygon,this.scale);this.setState({vessel_capacity:t})}else this.addNotification("Can't measure, define scale first");this.canvas.appendChild(this.inner_poly)}},{key:"metricForm",value:function(e){var t=this;e.ref_unit?(this.updateToDo("ref_unit",!0),this.setState({metric_value:e.value,metric_unit:e.unit},function(){t.metric&&2===t.metric.points.length&&(t.scale=Object(m.a)(t.metric,t.state.metric_value,t.state.metric_unit),t.innerPolygon&&t.setState({vessel_capacity:Object(m.b)(t.innerPolygon,t.scale)}),t.vesselVolume&&t.setState({vessel_volume:Object(m.b)(t.vesselVolume,t.scale)}))})):(this.updateToDo("ref_unit",!1),this.scale=null)}},{key:"defineMaxFill",value:function(){this.maxFill&&(this.canvas.removeChild(this.maxFill.el),this.updateToDo("maxFill",!1)),this.maxFill=new c.a({points:[],id:"max_fill",type:"max_fill",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"})}},{key:"addMaxFill",value:function(e){this.maxFill.stroke="rgb(0, 255, 21)",this.maxFill.add_point(e),this.canvas.appendChild(this.maxFill.el),this.maxFill.draw(),this.maxFill.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.maxFill=this.maxFill.points[0].cy,this.updateToDo("maxFill",!0)}},{key:"defineMetric",value:function(){this.unselect_polyline({code:"Escape"}),this.metric&&(this.canvas.removeChild(this.metric.el),this.updateToDo("metric",!1)),this.metric=new c.a({points:[],id:"metric",type:"metric",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMetric),this.metric.stopEditing({code:"Escape"})}},{key:"addMetric",value:function(e){0===this.metric.points.length?this.metric.add_point(e):1===this.metric.points.length&&(this.metric.add_point(e),this.metric.stroke="red",this.metric.stopEditing({code:"Escape"}),this.metric.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMetric),this.updateToDo("metric",!0),this.removeCursorPoint(),this.state.metric_value&&this.state.metric_unit&&(this.scale=Object(m.a)(this.metric,this.state.metric_value,this.state.metric_unit)),this.innerPolygon&&this.setState({vessel_capacity:Object(m.b)(this.innerPolygon,this.scale)}),this.vesselVolume&&this.setState({vessel_volume:Object(m.b)(this.vesselVolume,this.scale)}))}},{key:"definerotAxis",value:function(){this.rotAxis&&(this.canvas.removeChild(this.rotAxis.el),window.r_axis=null,this.updateToDo("rotAxis",!1)),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addRotAxis)}},{key:"addRotAxis",value:function(e){this.rotAxis=new c.a({points:[],id:this.id,type:"center",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.rotAxis.stroke="#ff5a00",this.rotAxis.add_point(e),this.canvas.appendChild(this.rotAxis.el),this.rotAxis.draw(),this.rotAxis.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addRotAxis),this.rotAxis.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.r_axis=this.rotAxis.points[0].cx,this.updateToDo("rotAxis",!0)}},{key:"colorChange",value:function(e,t){var n=this.getPolylineById(e);n.stroke=t,n.draw()}},{key:"typeChange",value:function(e,t){var n=this;this.setState({polylines:this.state.polylines.map(function(n){return n.id===e?(n.type=t,n):n})},function(){n.checkProfile("int_prof"),n.checkProfile("out_prof")})}},{key:"delete_line",value:function(){var e=this;if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.state.active_polyline.id}),active_polyline:void 0},function(){e.checkProfile("int_prof"),e.checkProfile("out_prof"),Object(m.g)(e.state.polylines)})}},{key:"edit_line",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.state.active_polyline.editLine()}},{key:"enterBreakLineMode",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");if(this.state.active_polyline.points.length<=2)return void this.addNotification("Line has two or less vertices and can't be subdivided");var e=this.state.active_polyline;e.breaking_mode=!0,this.setState({active_polyline:e});var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.breakLine)),t++}.bind(this))}},{key:"exitBreakLineMode",value:function(e){if(("Escape"===e.code||"KeyQ"===e.code)&&this.state.active_polyline.breaking_mode){var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(e.el.removeEventListener("click",this.breakLine),this.canvas.removeChild(e.el)),t++}.bind(this));var n=this.state.active_polyline;n.breaking_mode=!1,this.setState({active_polyline:n})}}},{key:"breakLine",value:function(e){var t=this,n=[e.target.getAttribute("cx"),e.target.getAttribute("cy")];this.exitBreakLineMode({code:"Escape"});var r=this.state.polylines,i=new c.a({points:[],id:this.id,type:"other",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.state.active_polyline.points.forEach(function(e){i.appendPoint([e.cx,e.cy]),e.cx===parseFloat(n[0])&&e.cy===parseFloat(n[1])&&(i.el.classList.remove("active"),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),i=new c.a({points:[],id:this.id,type:"other",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),i.appendPoint([e.cx,e.cy]))}.bind(this)),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),this.state.active_polyline.stopEditing({code:"Escape"}),this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:r.filter(function(e){return e.id!==t.state.active_polyline.id}),active_polyline:i})}},{key:"image_rotate",value:function(e){this.bck_image.style.transform="rotate("+e.target.value+"deg)"}},{key:"fileChangedHandler",value:function(e){var t=e.target.value.split("\\");t=t[t.length-1],this.setState({img_name:t});var n=new Image;n.src=window.URL.createObjectURL(e.target.files[0]),n.onload=function(){var e=n.naturalWidth,t=n.naturalHeight,r=this.state.toDo;r.image=!0,this.setState({img_w:e,img_h:t,selectedFile:n.src,toDo:r})}.bind(this)}},{key:"download_svg",value:function(){var e=this;if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");var t=this.state.selectedFile;this.state.img_name?this.setState({selectedFile:this.state.img_name.replace("href")},function(){b(e.svg.outerHTML,"dlText.svg","text/plain"),e.setState({selectedFile:t})}):b(this.svg.outerHTML,"myVessel.svg","text/plain")}},{key:"download_dxf",value:function(){if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");if(!this.scale)return void this.addNotification("You need to define a reference scale before export");var e=n(97),t={models:{}},r=1;this.state.polylines.forEach(function(n){var i=n.el.getAttribute("points"),o=e.model.mirror(new e.models.ConnectTheDots(!1,i),!1,!0);o=e.model.scale(o,this.scale/10),t.models["my-"+r+"-line"]=o,r++}.bind(this)),t.units=e.units.Meter;var i=e.exporter.toDXF(t,{units:e.unitType.Meter});b(i,"myVessel.dxf","text/plain")}},{key:"download_json",value:function(){var e=void 0,t=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(!(t.length>0))return void this.addNotification("No inner profile to export");if(t=t[0],!this.scale)return void this.addNotification("You need to define a reference scale before export");e=[],t.points.forEach(function(t){e.push([t.cx*this.scale/10,t.cy*this.scale/10*-1])}.bind(this)),e=JSON.stringify(e);var n='{ "type": "Feature",\n "geometry": {\n "type": "LineString",\n "coordinates": '+e+'\n },\n "properties": {\n "title": "myVessel",\n "description": "",\n "author": "'+void 0+'"\n }\n }';this.addNotification("Export completed"),b(n,"myVessel.json","text/plain")}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{id:"container"},s.a.createElement(h.a,{notification:this.state.notification}),s.a.createElement("h2",null,"Draw"),s.a.createElement("section",{id:"drawing"},s.a.createElement("svg",{id:"drawing-canvas",height:"500",width:"100%",ref:function(t){e.svg=t}},s.a.createElement("g",{className:"svg-pan-zoom_viewport",id:"canvas"},s.a.createElement("image",{ref:function(t){e.bck_image=t},id:"bck-img",href:this.state.selectedFile,x:"0",y:"0",height:this.state.img_h,width:this.state.img_w}))),s.a.createElement("div",{className:"tools"},s.a.createElement("div",{id:"actions-title"},"Actions:"),s.a.createElement("div",{className:"interface-button",onClick:this.create_new_polyline.bind(this),title:"Create new line",alt:"Create new line"},"New"),s.a.createElement("div",{className:"interface-button",onClick:this.enterBreakLineMode.bind(this),title:"Break selected line",alt:"Break selected line"},"Break"),s.a.createElement("div",{className:"interface-button",onClick:this.delete_line.bind(this),title:"Delete selected line",alt:"Delete selected line"},"Delete"),s.a.createElement("div",{className:"interface-button",onClick:this.edit_line.bind(this),title:"Edit selected line",alt:"Edit selected line"},"Edit"),s.a.createElement("div",{id:"actions-title2"},"Export:"),s.a.createElement("div",{className:"interface-button",onClick:this.download_svg.bind(this),title:"Download SVG (no scaling)",alt:"Download SVG (no scaling)"},"SVG"),s.a.createElement("div",{className:"interface-button",onClick:this.download_dxf.bind(this),title:"Download all-lines as DXF (scaled: 1 unit = 1 meter)",alt:"Download all-lines as DXF (scaled: 1 unit = 1 meter)"},"DXF"),s.a.createElement("div",{className:"interface-button",onClick:this.download_json.bind(this),title:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)",alt:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)"},"JSON"))),s.a.createElement("section",{id:"polylines"},s.a.createElement("div",{id:"layer-title"},"Layers:"),this.state.toDo.image&&s.a.createElement("div",{id:"image-layer",className:"polyline-layer"},s.a.createElement("div",{className:"slidecontainer"},s.a.createElement("label",{htmlFor:"myRange"},"Rotate image"),s.a.createElement("input",{type:"number",min:"0",max:"360",defaultValue:"0",className:"slider",id:"myRange",step:"0.01",onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(t){return s.a.createElement(p.a,{key:t.id,name:t.name,type:t.type,id:t.id,delete_line:e.delete_line.bind(e),edit_line:e.edit_line.bind(e),colorChange:e.colorChange.bind(e),typeChange:e.typeChange.bind(e),selectLayer:e.selectLayer.bind(e),selectedPoly:e.state.active_polyline?e.state.active_polyline.id:""})})),s.a.createElement("div",{className:"basic-info"},"Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ",s.a.createElement("code",null,"Esc")," or ",s.a.createElement("code",null,"q")," to quit editing mode and deselect."),s.a.createElement(d.a,{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),s.a.createElement(v.a,{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}))}}]),t}(a.Component);t.a=w},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(29),o=n(79),a=n(30),s=function(){function e(e,t){for(var n=0;n0&&this.points.length>e&&t.cx!==this.points[e-1].cx&&t.cy!==this.points[e-1].cy){var n=new o.a([(t.cx+this.points[e-1].cx)/2,(t.cy+this.points[e-1].cy)/2],e,this.zoom);this.midpoints.push(n)}e++}.bind(this)),this.midpoints.forEach(function(e){this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.create)}.bind(this))}},{key:"create",value:function(e){var t=e.target.getAttribute("index"),n=new i.a([parseFloat(e.target.getAttribute("cx")),parseFloat(e.target.getAttribute("cy"))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(t,n)}},{key:"addPointInMiddle",value:function(e,t){this.points.splice(e,0,t),this.canvas.appendChild(t.el),t.draw(),t.edit(),t.select(),this.draw()}},{key:"pointsTo",value:function(){var e="";return this.points.forEach(function(t){e+=t.cx+", "+t.cy+" "}),e}},{key:"add_point",value:function(e){var t=this.get_point(e);if("max_fill"===this.type){var n=[-1e6,t[1]];return this.appendPoint(n),n=[1e6,t[1]],void this.appendPoint(n)}if("center"===this.type){var r=[t[0],-1e6];return this.appendPoint(r),r=[t[0],1e6],void this.appendPoint(r)}this.appendPoint(t)}},{key:"appendPoint",value:function(e){window.snapping_points.push([e[0],e[1]]);var t=new i.a([e[0],e[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(t),this.draw(),1===this.points.length&&(window.addEventListener("mousemove",this.previewPoint),window.addEventListener("keyup",this.stopEditing))}},{key:"get_point",value:function(e){var t=this.canvas.transform.baseVal[0].matrix,n=[(e.pageX-t.e-this.x)/t.a,(e.pageY-t.f-this.y)/t.a];return this.snapPoint(n)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1&&Object(o.a)(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var o=n(84);t.a=function(e){if((n=e.length)<3)return null;var t,n,o=new Array(n),a=new Array(n);for(t=0;t=0;--t)f.push(e[o[s[t]][2]]);for(t=+u;ts!==u>s&&a<(l-n)*(s-r)/(u-r)+n&&(c=!c),l=n,u=r;return c}},function(e,t,n){"use strict";t.a=function(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],s=o[1],l=0;++r=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(t){return e.handleMouseWheel(t)},r.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(r.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!1)},l.prototype.handleMouseWheel=function(e){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&0===e.deltaMode&&e.wheelDelta&&(t=0===e.deltaY?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var i=this.svg.getScreenCTM().inverse(),o=a.getEventPoint(e,this.svg).matrixTransform(i),s=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(s,o)}},l.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e/=this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var i=this.viewport.getCTM(),o=t.matrixTransform(i.inverse()),a=this.svg.createSVGMatrix().translate(o.x,o.y).scale(e).translate(-o.x,-o.y),s=i.multiply(a);s.a!==i.a&&this.viewport.setCTM(s)},l.prototype.zoom=function(e,t){this.zoomAtPoint(e,a.getSvgCenterPoint(this.svg,this.width,this.height),t)},l.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)},l.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),"SVGPoint"!==o.getType(t)){if(!("x"in t&&"y"in t))throw new Error("Given point is invalid");t=a.createSVGPoint(this.svg,t.x,t.y)}this.zoomAtPoint(e,t,n)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){if((e.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control")>-1)return!1}var t;t=e.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=a.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(t,n)},l.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),o.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&o.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var t=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}},l.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.center=function(){var e=this.viewport.getViewBox(),t=.5*(this.width-(e.width+2*e.x)*this.getZoom()),n=.5*(this.height-(e.height+2*e.y)*this.getZoom());this.getPublicInstance().pan({x:t,y:n})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)},l.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)},l.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}},l.prototype.resize=function(){var e=a.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=null===t?null:o.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,i.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,i.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=null===t?null:o.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var c=[],f=function(e,t){var n=o.getSvg(e);if(null===n)return null;for(var r=c.length-1;r>=0;r--)if(c[r].svg===n)return c[r].instance.getPublicInstance();return c.push({svg:n,instance:new l(n,t)}),c[c.length-1].instance.getPublicInstance()};e.exports=f},function(e,t){e.exports=function(){function e(e,t,n){var r=function(e){!e&&(e=window.event);var n={originalEvent:e,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,delatZ:0,preventDefault:function(){e.preventDefault?e.preventDefault():e.returnValue=!1}};return"mousewheel"==u?(n.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(n.deltaX=-.025*e.wheelDeltaX)):n.deltaY=e.detail,t(n)};return f.push({element:e,fn:r,capture:n}),r}function t(e,t){for(var n=0;n2096103.424&&v!==d))return navigator.msSaveBlob?navigator.msSaveBlob(i(f),m):o(f);f=i(f),c=f.type||u}else if(/([\x80-\xff])/.test(f)){var g=0,b=new Uint8Array(f.length),w=b.length;for(g;g0?[e.substr(0,n),e.substr(n+1)]:["",e]}function splitDecimal(e){var t=e.toString();return t.indexOf("e")>0&&(t=e.toFixed(20).match(/.*[^(0+$)]/)[0]),split(t,".")}function round(e,t){if(void 0===t&&(t=1e-7),e%1===0)return e;var n=1-String(Math.ceil(1/t)).length;if("undefined"===typeof n||0===+n)return Math.round(e);if(e=+e,n=+n,isNaN(e)||"number"!==typeof n||n%1!==0)return NaN;if(e<0)return-round(-e,t);var r=split(e.toString(),"e");return e=Math.round(+(r[0]+"e"+(r[1]?+r[1]-n:-n))),r=split(e.toString(),"e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}function createRouteKey(e){for(var t=[],n=0;n0?".":"")+i:JSON.stringify([i]),t.push(r)}return t.join("")}function travel(e,t){if(!e||!t)return null;var n;n=Array.isArray(t)?t:JSON.parse(t);for(var r=n.slice(),i=e,o=e.origin||[0,0];r.length;){if(!(i=i[r.shift()]))return null;i.origin&&r.length&&(o=MakerJs.point.add(o,i.origin))}return{result:i,offset:o}}function cloneObject(e){return clone(e)}function extendObject(e,t){if(e&&t)for(var n in t)"undefined"!==typeof t[n]&&(e[n]=t[n]);return e}function isFunction(e){return"function"===typeof e}function isNumber(e){return"number"===typeof e}function isObject(e){return"object"===typeof e}function isPoint(e){return e&&Array.isArray(e)&&2==e.length&&isNumber(e[0])&&isNumber(e[1])}function isPath(e){return e&&e.type&&isPoint(e.origin)}function isPathLine(e){return isPath(e)&&e.type==MakerJs.pathType.Line&&isPoint(e.end)}function isPathCircle(e){return isPath(e)&&e.type==MakerJs.pathType.Circle&&isNumber(e.radius)}function isPathArc(e){return isPath(e)&&e.type==MakerJs.pathType.Arc&&isNumber(e.radius)&&isNumber(e.startAngle)&&isNumber(e.endAngle)}function isPathArcInBezierCurve(e){return isPathArc(e)&&isObject(e.bezierData)&&isNumber(e.bezierData.startT)&&isNumber(e.bezierData.endT)}function isModel(e){return e&&(e.paths||e.models)}function isChain(e){var t=e;return t&&t.links&&Array.isArray(t.links)&&isNumber(t.pathLength)}function $(e){return isModel(e)?new Cascade(MakerJs.model,e):isPath(e)?new Cascade(MakerJs.path,e):isPoint(e)?new Cascade(MakerJs.point,e):void 0}MakerJs.version="debug",MakerJs.environmentTypes={BrowserUI:"browser",NodeJs:"node",WebWorker:"worker",Unknown:"unknown"},MakerJs.environment=detectEnvironment(),MakerJs.unitType={Centimeter:"cm",Foot:"foot",Inch:"inch",Meter:"m",Millimeter:"mm"},MakerJs.splitDecimal=splitDecimal,MakerJs.round=round,MakerJs.createRouteKey=createRouteKey,MakerJs.travel=travel;var clone=__webpack_require__(98);MakerJs.cloneObject=cloneObject,MakerJs.extendObject=extendObject,MakerJs.isFunction=isFunction,MakerJs.isNumber=isNumber,MakerJs.isObject=isObject,MakerJs.isPoint=isPoint,MakerJs.isPath=isPath,MakerJs.isPathLine=isPathLine,MakerJs.isPathCircle=isPathCircle,MakerJs.isPathArc=isPathArc,MakerJs.isPathArcInBezierCurve=isPathArcInBezierCurve,MakerJs.pathType={Line:"line",Circle:"circle",Arc:"arc",BezierSeed:"bezier-seed"},MakerJs.isModel=isModel,MakerJs.isChain=isChain;var Cascade=function(){function e(e,t){this._module=e,this.$initial=t;for(var n in this._module)this._shadow(n);this.$result=t}return e.prototype._shadow=function(e){var t=this;this[e]=function(){return t._apply(t._module[e],arguments)}},e.prototype._apply=function(e,t){var n=[].slice.call(t);return n.unshift(this.$result),this.$result=e.apply(void 0,n),this},e.prototype.$reset=function(){return this.$result=this.$initial,this},e}();MakerJs.$=$}(MakerJs||(MakerJs={})),module.exports=MakerJs;var MakerJs;!function(e){!function(t){function n(t){return e.splitDecimal(t)[1]}function r(t,n){return n?+(e.splitDecimal(t)[0]+"."+n):t}function i(e,t){return e<0&&t<0||e>0&&t>0?r(t,n(e)):t}function o(e){var t=Math.floor(e/360);return 0===t?e:i(e,e-360*t)}function a(e){return o(e)*Math.PI/180}function s(e){return 180*e/Math.PI}function l(e){if(e.endAngle360?o(i):i}function f(e){return o(s(h(e.origin,e.end)))}function p(e,t){return s(h(e,t))}function h(t,n){var r=e.point.subtract(n,t),i=r[0],o=r[1];return Math.atan2(-o,-i)+Math.PI}function d(e,t,n){return n&&(e=360-e),t&&(e=(e<180?180:540)-e),e}function v(e,t){if(e){var n=e.walkedPath.pathContext,r=y[n.type];if(r)return r(n,t,e.reversed)}}function m(e,t){if(arguments.length<2)return null;var n=[e,t].map(function(e,t){return v(e,0===t)}),r=o(f(n[1])-f(n[0]));return r>180&&(r-=360),r}t.noRevolutions=o,t.toRadians=a,t.toDegrees=s,t.ofArcEnd=l,t.ofArcMiddle=u,t.ofArcSpan=c,t.ofLineInDegrees=f,t.ofPointInDegrees=p,t.ofPointInRadians=h,t.mirror=d;var y={};y[e.pathType.Arc]=function(t,n,r){var i=n!=r,o=i?t.endAngle-90:t.startAngle+90,a=e.point.fromArc(t)[i?1:0],s=e.point.rotate(e.point.add(a,[t.radius,0]),o,a);return new e.paths.Line(n?[s,a]:[a,s])},y[e.pathType.Line]=function(t,n,r){return r?new e.paths.Line(t.end,t.origin):t},t.ofChainLinkJoint=m}(e.angle||(e.angle={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=i(e);if(!t)return r;for(var o=2;o--;)n?r[o]-=t[o]:r[o]+=t[o];return r}function r(e,t){function n(n){return(e[n]+t[n])/2}return[n(0),n(1)]}function i(e){return e?[e[0],e[1]]:t.zero()}function o(t,n){for(var r={index:0,distance:-1},i=0;i=o?null:(i(t,o,n,r),t)}return null}function m(t,n){if(1==n)return[e.point.middle(t)];var r=[],i=n;t.type!=e.pathType.Circle&&i--;for(var o=0;op[0].size?p.push(s):p.unshift(s);s=p[l?1:0]}this.origin=s.origin,this.startAngle=s.startAngle,this.endAngle=s.endAngle;break;case 4:this.origin=n[0],this.radius=n[1],this.startAngle=n[2],this.endAngle=n[3];break;case 3:if(e.isPoint(n[2])){r.apply(this,n);for(var d=[],h=0;h<3;h++)d.push(e.angle.ofPointInDegrees(this.origin,n[h]));this.startAngle=d[0],this.endAngle=d[2],e.measure.isBetweenArcAngles(d[1],this,!1)||(this.startAngle=d[2],this.endAngle=d[0]);break}case 2:var u=n[2];r.call(this,n[0],n[1]),this.startAngle=e.angle.ofPointInDegrees(this.origin,n[u?1:0]),this.endAngle=e.angle.ofPointInDegrees(this.origin,n[u?0:1])}this.type=e.pathType.Arc}return t}();t.Arc=n;var r=function(){function t(){for(var t=[],n=0;n0){for(var m=null,y=0;!m&&y1&&e(n.key,n.items)}},e}();e.Collector=t;var n=__webpack_require__(103),r=function(){function t(){this.reset()}return t.prototype.reset=function(){this.insertedCount=0,this.graph={},this.index={},this.merged={},this.values=[]},t.prototype.insertValue=function(e){return this.values.push(e),this.values.length-1},t.prototype.insertValueIdAtPoint=function(e,t){var n=t[0],r=t[1];this.graph[n]||(this.graph[n]={});var i,o,a=this.graph[n],s=r in a;return s?(o=a[r],o in this.merged&&(o=this.merged[o]),i=this.index[o],i.valueIds.push(e)):(a[r]=o=this.insertedCount++,i={pointId:o,point:t,valueIds:[e]},this.index[o]=i),{existed:s,pointId:o}},t.prototype.mergePoints=function(e){var t=this,r=[],i=[];for(var o in this.index){var a=this.index[o],s=a.point;a.kdId=r.length,r.push(s),i.push(a)}this.kdbush=n(r);var l=this;for(var o in this.index)!function(n){if(n in l.merged)return"continue";var r=l.index[n];l.kdbush.within(r.point[0],r.point[1],e).forEach(function(e){e!==r.kdId&&t.mergeIndexElements(r,i[e])})}(o)},t.prototype.mergeNearestSinglePoints=function(t){var r=this,i=[];for(var o in this.index){var a=this.index[o];1===a.valueIds.length&&i.push(a)}this.kdbush=n(i.map(function(e){return e.point})),i.forEach(function(n){if(!(n.pointId in r.merged)){var o=r.kdbush.within(n.point[0],n.point[1],t),a=[];o.forEach(function(t){var r=i[t];r.pointId!==n.pointId&&a.push({el:r,distance:e.measure.pointDistance(r.point,n.point)})}),a.sort(function(e,t){return e.distance-t.distance});for(var s=0;s0?r.mergeIndexElements(l,n):r.mergeIndexElements(n,l))}}})},t.prototype.mergeIndexElements=function(e,t){return e.merged=e.merged||[],e.merged.push(t.pointId),this.merged[t.pointId]=e.pointId,e.valueIds.push.apply(e.valueIds,t.valueIds),delete this.index[t.pointId],e.pointId},t.prototype.forEachPoint=function(e){for(var t=this,n=0;n0&&e(r.point,r.valueIds.map(function(e){return t.values[e]}),n,r)}}},t.prototype.getIdOfPoint=function(e){var t=this.graph[e[0]];if(t){var n=t[e[1]];if(n>=0)return n in this.merged?this.merged[n]:n}},t.prototype.getElementAtPoint=function(e){var t=this.getIdOfPoint(e);if(t>=0)return this.index[t]},t}();e.PointGraph=r}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=0;do{var i=e[r];do{for(var o=!1,a=r+1;a0?(n.origin=o.low,n.end=o.high):(n.origin[0]=o.low[0],n.end[0]=o.high[0]):(n.origin[1]=o.low[1],n.end[1]=o.high[1])})}),r}t.simplify=r}(e.model||(e.model={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){if(!e)return null;var r=null,o=i[e.type];return o&&(r=o(e,t,n),r.origin=e.origin),r}function r(t,n,r,i){var o=e.angle.ofArcSpan(t),a=1;o>=270?a=4:o>180?a=3:(o>150||n)&&(a=2);for(var s=e.angle.toRadians(o/a),l=e.models.Polygon.circumscribedRadius(t.radius,s),u=e.point.fromArc(t),c=[e.point.subtract(u[0],t.origin)],f=e.angle.toRadians(t.startAngle)+s/2,p=0;p=0))return!1;return!0}function v(t){var n=t.end[0]-t.origin[0];if(0==e.round(n,1e-6))return{line:t,hasSlope:!1};var r=t.end[1]-t.origin[1],i=r/n;return{line:t,hasSlope:!0,slope:i,yIntercept:t.origin[1]-i*t.origin[0]}}function m(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function y(e,t,n){return[n(e[0],t[0]),n(e[1],t[1])]}function g(t,n){if(t){var r=N[t.type];if(r){var i=r(t);return n&&(i.high=e.point.add(i.high,n),i.low=e.point.add(i.low,n)),i}}return{low:null,high:null}}function b(e){if(e){var t=I[e.type];if(t)return t(e)}return 0}function w(t){var n=0;return e.model.walk(t,{onPath:function(e){n+=b(e.pathContext)}}),n}function x(t){return{high:e.point.clone(t.high),low:e.point.clone(t.low)}}function k(t,r){function i(t,i){if(i){var o=t.slice(0,-2),a=e.createRouteKey(o);a in r.modelMap?n(r.modelMap[a],i):r.modelMap[a]=x(i)}}r||(r=new j(t));var o={onPath:function(e){e.routeKey in r.pathMap||(r.pathMap[e.routeKey]=g(e.pathContext,e.offset)),i(e.route,r.pathMap[e.routeKey])},afterChildWalk:function(e){i(e.route,r.modelMap[e.routeKey])}};e.model.walk(t,o),r.modelsMeasured=!0;var a=r.modelMap[""];return a?E(a):a}function E(t){var n=t;return n.center=e.point.average(n.high,n.low),n.width=n.high[0]-n.low[0],n.height=n.high[1]-n.low[1],n}function _(e,t){return t>=e?t-e:t<0?t+e:t}function P(e,t){return e.slope*t+e.yIntercept}function C(e,t){return[t,P(v(e),t)]}function T(n){for(var r=1;r<3;r++)if(!t.isPointEqual(n[0].center,n[r].center,1e-6)||0!==e.round(n[0].width-n[r].width))return!1;return!0}function S(t,n,r,i){e.model.rotate(n,r);var o=k(n),a={index:t,rotation:i,center:e.point.rotate(o.center,i),width:o.height,height:o.width,bottom:new e.paths.Line(o.low,[o.high[0],o.low[1]]),middle:new e.paths.Line([o.low[0],o.center[1]],[o.high[0],o.center[1]]),top:new e.paths.Line(o.high,[o.low[0],o.high[1]])};return[a.top,a.middle,a.bottom].forEach(function(t){return e.path.rotate(t,i)}),a}function A(t,n){var r=t[1].origin,i=r[0],o=t[3].origin[0],a=t[0].origin[0],s=i-a;if(a-o>2*s)return null;var l=(i-o)/3;if(sp[1]?0:1,d=p[h];if(d>c){var v=e.solvers.equilateralAltitude(d),m=i-2*v;if(a>m+v)return null;if(o=u.height)return n(c,u.center,"solved by bound "+o.length);o.push(u)}if(T(o))return n(e.solvers.equilateralSide(o[0].width/2),o[0].center,"solved as circular");var f=o.map(function(e){return e.top}).concat(o.map(function(e){return e.bottom}));f.forEach(function(t,n){a.paths[n]=t,e.path.converge(f[_(6,n+2)],t,!0)}),o.forEach(function(e,t){a.paths["m"+t]=e.middle});for(var p,h=o.slice(),d=0;d<6;d++){d>0&&(f.push(f.shift()),h.push(h.shift()),e.model.rotate(a,-60));var v=A(f,h);v&&(!p||v.radius=o+n.radius||n.radius>=o+t.radius)return null;if(r&&t.radius+n.radius>=o)return null;var a;if(r||0!=e.round(t.radius-n.radius)){var s=o/2,l=new e.paths.Circle([s,0],s),u=new e.paths.Circle(t.radius>n.radius?[0,0]:[o,0],r?t.radius+n.radius:Math.abs(t.radius-n.radius)),c=e.path.intersection(u,l);if(!c||!c.path1Angles)return null;a=c.path1Angles}else a=[90,270];var f=e.angle.ofLineInDegrees(i);return a.map(function(t){return e.angle.noRevolutions(t+f)})}var s=Math.sqrt(3)/2;t.equilateralAltitude=n,t.equilateralSide=r,t.solveTriangleSSS=i,t.solveTriangleASA=o,t.circleTangentAngles=a}(e.solvers||(e.solvers={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,n,r,i){var o=r?[n.path2Offset,n.path1Offset]:[n.path1Offset,n.path2Offset];t.moveTemporary(e,o,i)}function r(e){var t=e.path1Angles;return e.path2Angles?e.path1Angles=e.path2Angles:delete e.path1Angles,t&&(e.path2Angles=t),e}function i(e,t,n){if(void 0===n&&(n={}),e&&t){var r=c[e.type][t.type];if(r)return r(e,t,n)}return null}function o(e,t){for(var n=2;n--;)if(e[n]===t)return n}function a(t,n){for(var r=[],i=0;i=180?u-360:u;t.rotate(l,-c,e.point.zero());var f=e.round(l.origin[1]),p=Math.abs(f);if(p>s)return null;var h=[];if(p==s){if(i.excludeTangents)return null;h.push(o(f>0?90:270))}else{var d=Math.asin(f/s),v=e.angle.toDegrees(d),m=Math.cos(d)*s;a(-m,180-v),a(m,v)}return h.length>0?h:null}function u(n,r,i){function o(t){var n=t+u;return e.angle.noRevolutions(n)}function a(t){return[o(t),o(e.angle.mirror(t,!1,!0))]}if(n.radius<=0||r.radius<=0)return null;if(n.radius==r.radius&&e.measure.isPointEqual(n.origin,r.origin,1e-4))return i.out_AreOverlapped=!0,null;var s=(e.point.subtract(e.point.zero(),n.origin),new e.paths.Circle(e.point.zero(),n.radius)),l=new e.paths.Circle(e.point.subtract(r.origin,n.origin),r.radius),u=e.angle.ofPointInDegrees(e.point.zero(),l.origin);t.rotate(l,-u,e.point.zero());var c=l.origin[0];if(0==e.round(l.radius-c-s.radius))return i.excludeTangents?null:[[o(180)],[o(180)]];if(0==e.round(l.radius+c-s.radius))return i.excludeTangents?null:[[o(0)],[o(0)]];if(0==e.round(c-l.radius-s.radius))return i.excludeTangents?null:[[o(0)],[o(180)]];if(e.round(c-l.radius)>s.radius)return null;if(e.round(c+l.radius)1))return!1;i[s].shardPoint=l.intersectionPoints[1]}}return!0}function o(e,n){var r=t.clone(e);return[r,t.breakAtPoint(r,n)]}function a(e,t,n){var r=null,i=d[e.path.type];return i&&(r=i(e.path,t,n,e.shardPoint,e.isStart)),r}function s(e,t,n){var r=null,i=v[e.path.type];return i&&(r=i(e.path,e.propertyName,t,n)),u(e,r)||(r=null),r}function l(t,n){var r={filletAngle:e.angle.ofPointInDegrees(n,t.shardPoint),clipPath:function(){t.path[t.propertyName]=t.shardPoint}};return u(t,r)||(r=null),r}function u(t,n){var r=!1;if(n){var i=t.path[t.propertyName];n.clipPath(),e.measure.pathLength(t.path)>0&&(r=!0),t.path[t.propertyName]=i}return r}function c(t){for(var n=0,r=[],i=0;i0){var s={pointMatchingDistance:.005};e.extendObject(s,a);var u=r(t,n,a);if(u){var f=c([t,n]),p=new e.paths.Line(u[0].oppositePoint,u[1].oppositePoint),h=e.point.middle(p,f),d=e.angle.ofPointInDegrees(u[0].point,h),v=e.point.add(u[0].point,e.point.fromPolar(e.angle.toRadians(d),o));if(!i(o,v,u,s))return null;for(var m=[],y=0;y<2;y++){var g=l(u[y],v);if(!g)return null;m.push(g)}var b=new e.paths.Arc(v,o,m[0].filletAngle,m[1].filletAngle);return e.round(e.angle.noRevolutions(e.angle.ofArcMiddle(b)))==e.round(d)&&(b.startAngle=m[1].filletAngle,b.endAngle=m[0].filletAngle),m[0].clipPath(),m[1].clipPath(),b}}return null}function p(n,o,l,u){if(n&&o&&l&&l>0){var c={pointMatchingDistance:.005};e.extendObject(c,u);var f=r(n,o,u);if(f){if(!i(l,f[0].point,f,c))return null;for(var p=[],h=0;h<2;h++){var d=f[1-h].shardPoint;if(!d)return null;var v=a(f[h],l,d);p.push(v)}var m=t.intersection(p[0],p[1]);if(m){var y;y=1==m.intersectionPoints.length?m.intersectionPoints[0]:e.point.closest(f[0].point,m.intersectionPoints);for(var g=[],h=0;h<2;h++){var b=s(f[h],l,y);if(!b)return null;g.push(b)}if(0==e.round(g[0].filletAngle-g[1].filletAngle))return null;var w=new e.paths.Arc(y,l,g[0].filletAngle,g[1].filletAngle),x=e.angle.ofArcSpan(w);return 180==x?null:(x>180&&(w.startAngle=g[1].filletAngle,w.endAngle=g[0].filletAngle),g[0].clipPath(),g[1].clipPath(),w)}}}return null}var h={};h[e.pathType.Arc]=function(e){return["startAngle","endAngle"]},h[e.pathType.Line]=function(e){return["origin","end"]};var d={};d[e.pathType.Arc]=function(t,n,r,i,a){var s=t.radius,l=o(t,i)[a?0:1];return l?(e.measure.isArcConcaveTowardsPoint(l,r)?s-=n:s+=n,e.round(s)<=0?null:new e.paths.Arc(t.origin,s,t.startAngle,t.endAngle)):null},d[e.pathType.Line]=function(t,n,r,i,o){return new e.paths.Parallel(t,n,r)};var v={};v[e.pathType.Arc]=function(t,n,r,i){var o=new e.paths.Line(t.origin,i),a=e.angle.ofLineInDegrees(o),s=a;return e.measure.isArcConcaveTowardsPoint(t,i)||(s+=180),{filletAngle:e.angle.noRevolutions(s),clipPath:function(){t[n]=a}}},v[e.pathType.Line]=function(n,r,i,o){var a=new e.paths.Line([0,0],[0,1]),s=e.angle.ofLineInDegrees(n);t.rotate(a,s,[0,0]),t.moveRelative(a,o);var l=e.point.fromSlopeIntersection(n,a);return l?{filletAngle:e.angle.ofPointInDegrees(o,l),clipPath:function(){n[r]=l}}:null},t.dogbone=f,t.fillet=p}(e.path||(e.path={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){return i(!1,e,t)}function r(e,t){return i(!0,e,t)}function i(t,n,r){function i(n,i){var l=s[n].walkedPath,u=s[i].walkedPath;l.modelContext===u.modelContext&&l.modelContext.type==e.models.BezierCurve.typeName||e.path.moveTemporary([l.pathContext,u.pathContext],[l.offset,u.offset],function(){var c;if(e.isObject(r)){var f=e.angle.ofChainLinkJoint(s[n],s[i]);if(0===e.round(f))return;c=f>0?r.left:r.right}else c=r;if(c&&!(c<0)){var p;p=t?e.path.fillet(l.pathContext,u.pathContext,c):e.path.dogbone(l.pathContext,u.pathContext,c),p&&(o.paths["fillet"+a]=p,a++)}})}for(var o={paths:{}},a=0,s=n.links,l=1;l1&&(r.endless=!0);break}t=u}}e.forEachPoint(function(e,n,o,a){if(a.valueIds.length>0){var s={links:[],pathLength:0};if(i(n[0],s,n[0]),s.endless)t(s,!1);else{s.links.reverse();var l=s.links[0];s.links.map(function(e){e.reversed=!e.reversed}),s.pathLength-=s.links[s.links.length-1].pathLength;i(s.links.pop(),s,l),s.links.length>1?t(s,!0):r(s.links[0].walkedPath)}}})}function i(e){var t=null;return a(e,function(e,n,r){t=e[0]},{byLayers:!1}),t}function o(e,t){var n=t===e.reversed?1:0;return e.endPoints[n]}function a(n){for(var i=[],a=1;a0){r.tempPaths=r.paths;var s={};a.forEach(function(e,t){e.layer=o,s["seed_"+t]=e}),r.paths=s}}}else"tempPaths"in r&&(r.paths=r.tempPaths,delete r.tempPaths),"tempLayer"in r&&(void 0==r.tempLayer?delete r.layer:r.layer=r.tempLayer,delete r.tempLayer)})}t.findSingleChain=i,t.findChains=a}(e.model||(e.model={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){if(void 0===t&&(t=1),e.endless){for(var n=Math.abs(t),r=0;r0&&n(e,r),e}}function o(t,n){void 0===n&&(n=!1);for(var r={paths:{}},i=0;i0;){var h=l/p;if(c.reversed&&(h=1-h),o.push(e.point.add(e.point.middle(f.pathContext,h),f.offset)),r&&o.length>=r)return o;var d;if(i){if(d=i[s],++s>i.length)return o}else d=n;l+=d}l-=p}return a(t.endless,o),o}function l(t,n){for(var r=[],i=0;i0){o.reversed&&l.reverse(),i>0&&l.shift();var u=l.map(function(t){return e.point.add(t,s.offset)});r.push.apply(r,u)}}return a(t.endless,r),r}t.cycle=n,t.reverse=r,t.startAt=i,t.toNewModel=o,t.toPoints=s,t.toKeyPoints=l}(e.chain||(e.chain={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n,i){var o={pointMatchingDistance:t||.005,keep:n},a=new r(e,o),s=a.findDeadEnds();return s.length0&&this.appendQueue(o,n)},n.prototype.removeValue=function(e,t){var n=e.valueIds.indexOf(t);n>=0&&e.valueIds.splice(n,1)},n.prototype.appendQueue=function(e,t){var n=this.ordinals[e.pointId];n":">",'"':"""};for(var n in t)e=e.split(n).join(t[n]);return e},e.prototype.getOpeningTag=function(t){var n="";for(var r in this.attrs)!function(t,r){null!=r&&"undefined"!==typeof r&&((Array.isArray(r)||"object"===typeof r)&&(r=JSON.stringify(r)),"string"===typeof r&&(r=e.escapeString(r)),n+=" "+t+'="'+r+'"')}(r,this.attrs[r]);return"<"+this.name+n+(t?"/":"")+">"},e.prototype.getInnerText=function(){return this.innerTextEscaped?this.innerText:e.escapeString(this.innerText)},e.prototype.getClosingTag=function(){return""},e.prototype.toString=function(){return this.innerText||this.closingTags?this.getOpeningTag(!1)+this.getInnerText()+this.getClosingTag():this.getOpeningTag(!0)},e}();e.XmlTag=t}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){return n?e+"("+t+")":t}function r(t,n){if(n){var r=new e.paths.Circle([0,0],t.radius),i=e.measure.pathLength(r);if(i)return Math.ceil(i/n)}}function i(t,i,o){function a(e){f?l=e+l:l+=e}var s="",l="",u=!0,c=!1,f=!1,p={};p[e.pathType.Circle]=function(t,a){var l={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),resolution:r(t,i)};s=n("CAG.circle",JSON.stringify(l),!0),c=!0},p[e.pathType.Line]=function(t,r){var i=r.endPoints.map(function(t){return e.point.rounded(t,o)});r.reversed&&i.reverse(),s=n("new CSG.Path2D",JSON.stringify(i),!0)},p[e.pathType.Arc]=function(t,a){var l=e.angle.ofArcEnd(t);a.reversed&&(f=!0);var u={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),startangle:e.round(t.startAngle,o),endangle:e.round(l,o),resolution:r(t,i)};s=n("new CSG.Path2D.arc",JSON.stringify(u),!0)};var h={};h[e.pathType.Line]=function(t,r){var i=f!=r.reversed,s=e.point.rounded(r.endPoints[i?0:1],o);a(n(".appendPoint",JSON.stringify(s),!0))},h[e.pathType.Arc]=function(t,s){var l=f!=s.reversed,u=e.angle.ofArcEnd(t),c={radius:e.round(t.radius,o),clockwise:l,large:Math.abs(u-t.startAngle)>180,resolution:r(t,i)},p=e.point.rounded(s.endPoints[l?0:1],o);a(n(".appendArc",JSON.stringify(p)+","+JSON.stringify(c),!0))};for(var d=0;d0&&r.subtracts.push(i)}c.total++,e in u||(u[e]=[]),u[e].unshift(r)}})}void 0===o&&(o={});var u={},c={total:0,complete:0},f={pointMatchingDistance:o.pointMatchingDistance,byLayers:o.byLayers,contain:!0};o.statusCallback&&o.statusCallback({progress:25});var p=e.model.findChains(i,f);if(Array.isArray(p))l("",p);else for(var h in p)l(h,p[h]);o.statusCallback&&o.statusCallback({progress:50});var d=0;for(var h in u)d+=u[h].length;if(0===d)throw o.statusCallback&&o.statusCallback({progress:100}),"No closed geometries found.";var v={};for(var h in u){var m=u[h].map(function(e){var t=e.cag;return e.subtracts.forEach(function(e){var n=a(50,50,e);t=r(t,n)}),t});v[h]=a(50,50,m)}return o.statusCallback&&o.statusCallback({progress:100}),f.byLayers?v:v[""]}function l(e,t,n){function r(n){return a(e,t,n)}function i(e,t,n){var r=e.extrude({offset:[0,0,t]});return n&&(r=r.translate([0,0,n])),r}function o(e,t){return e.union(t)}return u(r,i,o,t,n)}function u(t,n,r,i,a){void 0===a&&(a={});var s=a.statusCallback;i.exporterOptions&&e.extendObject(a,i.exporterOptions.toJscadCSG),a.byLayers=a.byLayers||a.layerOptions&&!0,a.statusCallback=o(s,0,50);var l=t(a),u=[];if(a.byLayers)for(var c in l){var f=a.layerOptions[c],p=n(l[c],f.extrude||a.extrude,function(t,n){return e.isNumber(t)?t:n}(f.z,a.z));u.push(p)}else{var p=n(l,a.extrude,a.z);u.push(p)}a.statusCallback=o(s,50,100);var h={total:u.length-1,complete:0},d=u.shift();return u.forEach(function(e,t){d=r(d,e),h.complete++,a.statusCallback({progress:h.complete/h.total})}),d}function c(e,t){function n(e,n){return c(i(e,n,t.accuracy))}function r(e,t){return e+".union("+t+")"}function o(e,t){return e+".subtract("+t+")"}function a(i){return s(n,r,o,e,t)}function l(e,t,n){var r=e+".extrude({ offset: [0, 0, "+t+"] })";return n&&(r=r+".translate([0, 0, "+n+"])"),r}function c(e){return""+p+f+e+p}void 0===t&&(t={});var f=new Array((t.indent||0)+1).join(" "),p=t.indent?"\n":"",h=u(a,l,r,e,t).trim();return"function "+(t.functionName||"main")+"(){"+c("return "+h+";")+"}"+p}function f(e,t,n,r){var i=r.statusCallback;r.statusCallback=o(i,0,50);var a=l(e,n,r);return t.serialize(a,{binary:!1,statusCallback:o(i,50,50)})}t.toJscadCAG=a,t.toJscadCSG=l,t.toJscadScript=c,t.toJscadSTL=f}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(n,r,i){if(r){var o={origin:[0,0],stroke:"#000"};e.extendObject(o,i);var a=1,s=o.units||r.units;a=s?e.units.conversionScale(s,e.unitType.Inch):.01,a*=72;var l=e.model.scale(e.cloneObject(r),a),u=e.measure.modelExtents(l),c=-u.low[0],f=[c,u.high[1]];f=e.point.add(f,i.origin),e.model.findChains(l,function(r,i,a){function s(e){var r=t.pathToSVGPathData(e.pathContext,e.offset,f);n.path(r).stroke(o.stroke)}r.map(function(r){if(r.links.length>1){var i=t.chainToSVGPathData(r,f);n.path(i).stroke(o.stroke)}else{var a=r.links[0].walkedPath;if(a.pathContext.type===e.pathType.Circle){var l;e.path.moveTemporary([a.pathContext],[a.offset],function(){l=e.path.mirror(a.pathContext,!1,!0)}),e.path.moveRelative(l,f),n.circle(l.origin[0],l.origin[1],a.pathContext.radius).stroke(o.stroke)}else s(a)}}),i.map(s)},{byLayers:!1})}}t.toPDF=n}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(t){return e.point.mirror(t,!1,!0)}function r(t){var n=e.angle.ofArcSpan(t);t.startAngle=e.angle.noRevolutions(t.startAngle),t.endAngle=t.startAngle+n}function i(t,r,i){function o(t){return e.point.add(t,r)}for(var a=t.links[0],s=o(n(a.endPoints[a.reversed?1:0])),l=["M",e.round(s[0],i),e.round(s[1],i)],u=0;u1){var a=i(e,n,o);s[r].push(a)}else l(e.links[0].walkedPath,t);e.contains&&u(e.contains,!t)})}s[r]=[],u(e,!0),t.forEach(function(e){return l(e)})},r),s}function l(t){for(var n=[],r=1;r0?(t in T||(T[t]=[]),T[t].push(e)):C.push(e)}function l(e){function t(e,t){void 0!==t&&n.push(e+":"+t)}var n=[];return t("stroke",e.stroke),t("stroke-width",e.strokeWidth),t("fill",e.fill),n.join(";")}function u(t,n){n&&e.extendObject(t,{stroke:n.stroke,"stroke-width":n.strokeWidth,fill:n.fill,style:n.cssStyle||l(n)})}function h(e){return E.layerOptions&&E.layerOptions[e]?E.layerOptions[e]:e in t.colors?{stroke:e}:void 0}function d(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=!1),"text"!==e&&u(n,h(r)),E.scalingStroke||(n["vector-effect"]="non-scaling-stroke");var s=new t.XmlTag(e,n);s.closingTags=E.closingTags,i&&(s.innerText=i),a(s.toString(),r,o)}function v(t){var r=n(t);return e.point.scale(r,E.scale)}function m(t,n){var r=e.path.mirror(t,!1,!0);return e.path.moveRelative(e.path.scale(r,E.scale),n)}function y(t,n,r){d("text",{id:t+"_text",x:e.round(n[0],E.accuracy),y:e.round(n[1],E.accuracy)},r,t)}function g(t,n,r,i,o,a,s,l,u){d("path",{id:t,"data-route":a,d:["M",e.round(n,E.accuracy),e.round(r,E.accuracy)].concat(i).join(" ")},o),l&&y(t,s,o)}function b(e,t,n,r,i,o,a){var s=c(n,E.accuracy);g(e,t[0],t[1],s,r,i,t,o,a)}function w(t,n,r,i,o){Z[e.pathType.Circle]("",new e.paths.Circle(r,t.size/2),n,"flow",null,!1,null);var a=[-1*t.size,t.size/2];[a,e.point.mirror(a,!1,!0)].map(function(t){return new e.paths.Line(e.point.add(e.point.rotate(t,o),i),i)}).forEach(function(t){return Z[e.pathType.Line]("",t,n,"flow",null,!1,null)})}function x(e,t){H.attrs={id:e},a(H.getOpeningTag(!1),t.layer)}function k(e){a(H.getClosingTag(),e.layer)}var E={accuracy:.001,annotate:!1,origin:null,scale:1,stroke:"#000",strokeLineCap:"round",strokeWidth:"0.25mm",fill:"none",fillRule:"evenodd",fontSize:"9pt",useSvgPathOnly:!0,viewBox:!0};e.extendObject(E,o);var _,P=e.isModel(i);P&&(_=i,_.exporterOptions&&e.extendObject(E,_.exporterOptions.toSVG));var C=[],T={};if(P)_=i;else if(Array.isArray(i)){var S={};i.forEach(function(e,t){S[t]=e}),_={paths:S}}else e.isPath(i)&&(_={paths:{modelToMeasure:i}});var A=e.measure.modelExtents(_);if(!E.units){var M=t.tryGetModelUnits(i);M&&(E.units=M)}var O=t.svgUnit[E.units];if(O&&E.viewBox&&(E.scale*=O.scaleConversion),A&&!E.origin){var R=-A.low[0]*E.scale;E.origin=[R,A.high[1]*E.scale]}e.extendObject(o,E);var z;if(A&&E.viewBox){var L=e.round(A.width*E.scale,E.accuracy),N=e.round(A.height*E.scale,E.accuracy),I=[0,0,L,N],j=O?O.svgUnitType:"";z={width:L+j,height:N+j,viewBox:I.join(" ")}}var D=new t.XmlTag("svg",e.extendObject(z||{},E.svgAttrs));a(D.getOpeningTag(!1));var B={id:"svgGroup","stroke-linecap":E.strokeLineCap,"fill-rule":E.fillRule,"font-size":E.fontSize};u(B,E);var U=new t.XmlTag("g",B);if(a(U.getOpeningTag(!1)),E.useSvgPathOnly){var F={byLayers:!0};"nonzero"===E.fillRule&&(F.contain={alternateDirection:!0});var J=s(_,E.origin,F,E.accuracy);for(var V in J){var q=J[V].join(" "),W={d:q};V.length>0&&(W.id=V),d("path",W,V,null,!0)}}else{var Z={};Z[e.pathType.Line]=function(t,n,r,i,o,a,s){var l=n.origin,u=n.end;d("line",{id:t,class:i,"data-route":o,x1:e.round(l[0],E.accuracy),y1:e.round(l[1],E.accuracy),x2:e.round(u[0],E.accuracy),y2:e.round(u[1],E.accuracy)},r),a&&y(t,e.point.middle(n),r),s&&w(s,r,n.origin,n.end,e.angle.ofLineInDegrees(n))},Z[e.pathType.Circle]=function(t,n,r,i,o,a,s){var l=n.origin;d("circle",{id:t,class:i,"data-route":o,r:n.radius,cx:e.round(l[0],E.accuracy),cy:e.round(l[1],E.accuracy)},r),a&&y(t,l,r)},Z[e.pathType.Arc]=function(t,n,i,o,a,s,l){r(n);var u=e.point.fromArc(n);if(e.measure.isPointEqual(u[0],u[1]))b(t,n.origin,n.radius,i,a,s,l);else{var c=["A"];p(c,n.radius,u[1],E.accuracy,e.angle.ofArcSpan(n)>180,n.startAngle>n.endAngle),g(t,u[0][0],u[0][1],c,i,a,e.point.middle(n),s,l),l&&w(l,i,u[1],u[0],e.angle.noRevolutions(n.startAngle-90))}},Z[e.pathType.BezierSeed]=function(t,n,r,i,o,a,s){var l=[];f(l,n,E.accuracy),g(t,n.origin[0],n.origin[1],l,r,o,e.point.middle(n),a,s)};var H=new t.XmlTag("g"),Y={beforeChildWalk:function(e){return x(e.childId,e.childModel),!0},onPath:function(t){var n=Z[t.pathContext.type];if(n){var r=e.point.add(v(t.offset),E.origin);n(t.pathId,m(t.pathContext,r),t.layer,null,t.route,E.annotate,E.flow)}},afterChildWalk:function(e){k(e.childModel)}};x("0",_),e.model.walk(_,Y);for(var K in T){var X=new t.XmlTag("g",{id:K});u(X.attrs,h(K));for(var G=0;G180,r?t.startAngle>t.endAngle:t.startAngle180,t.startAngle>t.endAngle),o(i[0],a,n)},d[e.pathType.BezierSeed]=function(e,t){var n=[];return f(n,e,t),o(e.origin,n,t)},t.pathToSVGPathData=a,t.toSVGPathData=l,t.toSVG=u,t.svgUnit={},t.svgUnit[e.unitType.Inch]={svgUnitType:"in",scaleConversion:1},t.svgUnit[e.unitType.Millimeter]={svgUnitType:"mm",scaleConversion:1},t.svgUnit[e.unitType.Centimeter]={svgUnitType:"cm",scaleConversion:1},t.svgUnit[e.unitType.Foot]={svgUnitType:"in",scaleConversion:12},t.svgUnit[e.unitType.Meter]={svgUnitType:"cm",scaleConversion:100}}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(n,r){function i(e){l.paths||(l.paths={}),l.paths["p_"+ ++d]=e}function o(e){l.models||(l.models={}),l.models["p_"+ ++d]=e}function a(t,n){void 0===n&&(n=0);var r=e.point.mirror([t.data[0+n],t.data[1+n]],!1,!0);return t.absolute?r:e.point.add(r,t.from)}function s(t,n){return e.measure.isPointEqual(t.from,n)||i(new e.paths.Line(t.from,n)),n}void 0===r&&(r={});var l={},u={};u.M=function(e){return p=a(e)},u.Z=function(e){return s(e,p)},u.H=function(t){var n=e.point.clone(t.from);return t.absolute?n[0]=t.data[0]:n[0]+=t.data[0],s(t,n)},u.V=function(t){var n=e.point.clone(t.from);return t.absolute?n[1]=-t.data[0]:n[1]-=t.data[0],s(t,n)},u.L=function(e){return s(e,a(e))},u.A=function(t){var n=t.data[0],s=t.data[1],l=t.data[2],u=1===t.data[3],c=1===t.data[4],f=a(t,5),p=n!==s,h=new e.paths.Line(t.from,e.point.rotate(f,l,t.from));p&&(h=e.path.distort(h,1,n/s));var d=new e.paths.Arc(h.origin,h.end,n,u,c);if(p){if(n1&&t.push.apply(t,e.controls[1]),t.push.apply(t,e.end),n(),new Bezier(t)}function a(t){var n=t.extrema().values.map(function(t){return e.round(t)}).filter(function(e,t,n){return n.indexOf(e)===t}).sort();return 0===n.length?[0,1]:(0!==n[0]&&n.unshift(0),1!==n[n.length-1]&&n.push(1),n)}function s(e){return[e.x,e.y]}function l(t,n,r,i,o){function a(r){var a=n+l*r,u=s(t.get(a)),c=e.point.middle(i,o?1-r:r);return e.measure.pointDistance(c,u)}var l=r-n;return a(.25)+a(.75)}function u(t,n,r,i){for(var o,a,u,c=new v(t,n),f=new v(t,r),p=f,h=c,d=0,m=p;d<100;){var y=s(t.get((c.t+m.t)/2));try{o=new e.paths.Arc(c.point,y,m.point)}catch(e){if(a)return a;break}void 0===u&&(u=e.measure.isPointEqual(c.point,e.point.fromAngleOnCircle(o.endAngle,o)));if(l(t,n,m.t,o,u)<=i?(o.bezierData={startT:n,endT:m.t},h=m,a=o):p=m,h.t===p.t||a&&a!==o&&e.angle.ofArcSpan(o)-e.angle.ofArcSpan(a)<.5)return a;d++,m=new v(t,(h.t+p.t)/2)}var g=new e.paths.Line(c.point,m.point);return g.bezierData={startT:n,endT:m.t},g}function c(t,n,r,i,o,a){for(var s,l=0;iu[1]&&l.reverse();for(var c=2;c--;)if(!e.measure.isPointEqual(l[c],s[c].point))return null;return n.bezierData}function p(t,n,r,i){var o=[n.links[0],n.links[n.links.length-1]];o[0].walkedPath.pathContext.bezierData.startT>o[1].walkedPath.pathContext.bezierData.startT&&(e.chain.reverse(n),o.reverse());var a=o.map(function(e){return f(t,e.walkedPath.pathContext,e.endPoints,e.walkedPath.offset)}),s={startT:a[0]?a[0].startT:null,endT:a[1]?a[1].endT:null};return null!==s.startT&&null!==s.endT?s:n.links.length>2?(null===s.startT&&(i(n.links[0].walkedPath.pathContext,r,!0),s.startT=n.links[1].walkedPath.pathContext.bezierData.startT),null===s.endT&&(i(n.links[n.links.length-1].walkedPath.pathContext,r,!0),s.endT=n.links[n.links.length-2].walkedPath.pathContext.bezierData.endT),s):null}var h,d=!1,v=function(){function t(t,n,r){this.t=n,this.point=e.point.add(s(t.get(n)),r)}return t}(),m=function(){function t(){for(var t=[],n=0;n2&&s(a.length-1,0,!0)}return t}();t.ConnectTheDots=r,r.metaParameters=[{title:"closed",type:"bool",value:!0},{title:"points",type:"select",value:[[[0,0],[40,40],[60,20],[100,100],[60,60],[40,80]],[[0,0],[100,0],[50,87]],[-10,0,10,0,0,20],"-10 0 10 0 0 20"]}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function n(e,r,i,o){this.paths={},this.paths=new t.ConnectTheDots(!0,n.getPoints(e,r,i,o)).paths}return n.circumscribedRadius=function(e,t){return e/Math.cos(t/2)},n.getPoints=function(t,r,i,o){void 0===i&&(i=0),void 0===o&&(o=!1);var a=[],s=e.angle.toRadians(i),l=2*Math.PI/t;o&&(r=n.circumscribedRadius(r,l));for(var u=0;u0&&(this.paths.TopLeft=new e.paths.Arc([-a,s],r,90,180),this.paths.TopRight=new e.paths.Arc([a,s],r,0,90)),a&&(this.paths.Top=new e.paths.Line([-a,n],[a,n]))}return t}();t.Dome=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:25},{title:"bottomless",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(){for(var t=[],n=0;n0&&(this.paths.BottomLeft=new e.paths.Arc([o,o],o,180,270),this.paths.BottomRight=new e.paths.Arc([l,o],o,270,0),this.paths.TopRight=new e.paths.Arc([l,u],o,0,90),this.paths.TopLeft=new e.paths.Arc([o,u],o,90,180)),l-o>0&&(this.paths.Bottom=new e.paths.Line([o,0],[l,0]),this.paths.Top=new e.paths.Line([l,i],[o,i])),u-o>0&&(this.paths.Right=new e.paths.Line([r,o],[r,u]),this.paths.Left=new e.paths.Line([0,u],[0,o]))}return t}();t.RoundRectangle=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:11}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t,n){this.paths={},this.paths=new e.RoundRectangle(t,n,Math.min(n/2,t/2)).paths}return t}();e.Oval=t,t.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this;this.paths={};var l;if(a&&(l={models:{}},this.models={Caps:l}),!(i<=0||r<=0)&&(t=e.angle.noRevolutions(t),n=e.angle.noRevolutions(n),0!=e.round(t-n))){n0;f&&c("Inner",-i);var p=[];p.push(u("StartCap",t,180,0)),p.push(u("EndCap",n,0,180));if(e.measure.pointDistance(p[0].origin,p[1].origin)/2n?(i=r(l,u),o=270,a=360-e.angle.toDegrees(Math.acos(u/i)),s=[0,i]):(i=r(u,l),o=180-e.angle.toDegrees(Math.asin(l/i)),a=180,s=[i,0]);var c=new e.paths.Arc(s,i,o,a);this.paths.curve_start=c,this.paths.curve_end=e.path.moveRelative(e.path.mirror(c,!0,!0),[t,n])}return t}();t.SCurve=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i){void 0===i&&(i=!1);var o=this;this.paths={};var a;i&&(a={models:{}},this.models={Caps:a});var s=function(e,t){var n;i?(n={paths:{}},a.models[e]=n):n=o,n.paths[e]=t},l=e.angle.ofPointInDegrees(t,n),u=e.measure.pointDistance(t,n);this.paths.Top=new e.paths.Line([0,r],[u,r]),this.paths.Bottom=new e.paths.Line([0,-r],[u,-r]),s("StartCap",new e.paths.Arc([0,0],r,90,270)),s("EndCap",new e.paths.Arc([u,0],r,270,90)),e.model.rotate(this,l,[0,0]),this.origin=t}return t}();t.Slot=n,n.metaParameters=[{title:"origin",type:"select",value:[[0,0],[10,0],[10,10]]},{title:"end",type:"select",value:[[80,0],[0,30],[10,30]]},{title:"radius",type:"range",min:1,max:50,value:10}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t){this.paths={},this.paths=new e.Rectangle(t,t).paths}return t}();e.Square=t,t.metaParameters=[{title:"side",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(n,r,i,o){void 0===o&&(o=2),this.paths={},i||(i=r*t.InnerRadiusRatio(n,o));for(var a=e.Polygon.getPoints(n,r),s=e.Polygon.getPoints(n,i,180/n),l=[],u=0;u0&&t>1&&t0){var y,g={};y=c?{models:{deleted:c,char:f}}:f,e.model.combine(y,d,!1,!0,!1,!0,g),c=g.out_deleted[1]}u.models[p]=d,p++,f=d};t.forEachGlyph(r,0,0,i,l,h)}return n.glyphToModel=function(n,r,i){function o(e){u.paths||(u.paths={}),u.paths["p_"+ ++c]=e}function a(e){u.models||(u.models={}),u.models["p_"+ ++c]=e}var s,l,u={},c=0;return n.getPath(0,0,r).commands.map(function(n,r){var u=[[n.x,n.y],[n.x1,n.y1],[n.x2,n.y2]].map(function(t){if(void 0!==t[0])return e.point.mirror(t,!1,!0)});switch(n.type){case"M":s=u[0];break;case"Z":u[0]=s;case"L":e.measure.isPointEqual(l,u[0])||o(new e.paths.Line(l,u[0]));break;case"C":a(new t.BezierCurve(l,u[1],u[2],u[0],i));break;case"Q":a(new t.BezierCurve(l,u[1],u[0],i))}l=u[0]}),u},n}();t.Text=n,n.metaParameters=[{title:"font",type:"font",value:"*"},{title:"text",type:"text",value:"Hello"},{title:"font size",type:"range",min:10,max:200,value:72},{title:"combine",type:"bool",value:!1},{title:"center character origin",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={})),MakerJs.version="0.11.1";var Bezier=__webpack_require__(109)},function(e,t,n){(function(t){var n=function(){"use strict";function e(n,r,i,o){function s(n,i){if(null===n)return null;if(0==i)return n;var f,p;if("object"!=typeof n)return n;if(e.__isArray(n))f=[];else if(e.__isRegExp(n))f=new RegExp(n.source,a(n)),n.lastIndex&&(f.lastIndex=n.lastIndex);else if(e.__isDate(n))f=new Date(n.getTime());else{if(c&&t.isBuffer(n))return f=t.allocUnsafe?t.allocUnsafe(n.length):new t(n.length),n.copy(f),f;"undefined"==typeof o?(p=Object.getPrototypeOf(n),f=Object.create(p)):(f=Object.create(o),p=o)}if(r){var h=l.indexOf(n);if(-1!=h)return u[h];l.push(n),u.push(f)}for(var d in n){var v;p&&(v=Object.getOwnPropertyDescriptor(p,d)),v&&null==v.set||(f[d]=s(n[d],i-1))}return f}"object"===typeof r&&(i=r.depth,o=r.prototype,r.filter,r=r.circular);var l=[],u=[],c="undefined"!=typeof t;return"undefined"==typeof r&&(r=!0),"undefined"==typeof i&&(i=1/0),s(n,i)}function n(e){return Object.prototype.toString.call(e)}function r(e){return"object"===typeof e&&"[object Date]"===n(e)}function i(e){return"object"===typeof e&&"[object Array]"===n(e)}function o(e){return"object"===typeof e&&"[object RegExp]"===n(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=n,e.__isDate=r,e.__isArray=i,e.__isRegExp=o,e.__getRegExpFlags=a,e}();"object"===typeof e&&e.exports&&(e.exports=n)}).call(t,n(99).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"===typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function F(e){if(e=J(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function H(e){return X.toByteArray(F(e))}function Y(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var X=n(100),G=n(101),$=n(102);t.Buffer=o,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"===typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new p(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;c>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;oa?a:o+16383));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=u;for(var c=[],f=[],p="undefined"!==typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,v=h.length;d>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?p/l:p*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t,n,r,o){return new i(e,t,n,r,o)}function i(e,t,n,r,i){t=t||o,n=n||a,i=i||Array,this.nodeSize=r||64,this.points=e,this.ids=new i(e.length),this.coords=new i(2*e.length);for(var l=0;lr;){if(a-r>600){var l=a-r+1,u=n-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);i(e,t,n,Math.max(r,Math.floor(n-u*f/l+p)),Math.min(a,Math.floor(n+(l-u)*f/l+p)),s)}var h=t[2*n+s],d=r,v=a;for(o(e,t,r,n),t[2*a+s]>h&&o(e,t,r,a);dh;)v--}t[2*r+s]===h?o(e,t,r,v):(v++,o(e,t,v,a)),v<=n&&(r=v+1),n<=v&&(a=v-1)}}function o(e,t,n,r){a(e,n,r),a(t,2*n,2*r),a(t,2*n+1,2*r+1)}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var f=u.pop(),p=u.pop(),h=u.pop();if(p-h<=a)for(var d=h;d<=p;d++)s=t[2*d],l=t[2*d+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[d]);else{var v=Math.floor((h+p)/2);s=t[2*v],l=t[2*v+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[v]);var m=(f+1)%2;(0===f?n<=s:r<=l)&&(u.push(h),u.push(v-1),u.push(m)),(0===f?i>=s:o>=l)&&(u.push(v+1),u.push(p),u.push(m))}}return c}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a){for(var s=[0,e.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),f=s.pop(),p=s.pop();if(f-p<=a)for(var h=p;h<=f;h++)i(t[2*h],t[2*h+1],n,r)<=u&&l.push(e[h]);else{var d=Math.floor((p+f)/2),v=t[2*d],m=t[2*d+1];i(v,m,n,r)<=u&&l.push(e[d]);var y=(c+1)%2;(0===c?n-o<=v:r-o<=m)&&(s.push(p),s.push(d-1),s.push(y)),(0===c?n+o>=v:r+o>=m)&&(s.push(d+1),s.push(f),s.push(y))}}return l}function i(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}t.a=r},function(e,t,n){function r(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}var i;r.prototype={constructor:r,Point:function(e,t){this.x=e,this.y=t},_findPolarAngle:function(e,t){var n,r;if(!e||!t)return 0;if(n=t.x-e.x,r=t.y-e.y,0==n&&0==r)return 0;var i=57.295779513082*Math.atan2(r,n);return this.reverse?0>=i&&(i+=360):i>=0&&(i+=360),i},addPoint:function(e,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(e,t)):this.anchorPoint.y>t&&this.anchorPoint.x>e||this.anchorPoint.y===t&&this.anchorPoint.x>e||this.anchorPoint.y>t&&this.anchorPoint.x===e?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(e,t))):void this.points.push(new this.Point(e,t))},_sortPoints:function(){var e=this;return this.points.sort(function(t,n){var r=e._findPolarAngle(e.anchorPoint,t),i=e._findPolarAngle(e.anchorPoint,n);return i>r?-1:r>i?1:0})},_checkPoints:function(e,t,n){var r=this._findPolarAngle(e,t),i=this._findPolarAngle(e,n);return r>i?!(r-i>180):!(i>r)||i-r>180},getHull:function(){var e,t,n=[];if(this.reverse=this.points.every(function(e){return e.x<0&&e.y<0}),e=this._sortPoints(),3>(t=e.length))return e.unshift(this.anchorPoint),e;for(n.push(e.shift(),e.shift());;){var r,i,o;if(n.push(e.shift()),r=n[n.length-3],i=n[n.length-2],o=n[n.length-1],this._checkPoints(r,i,o)&&n.splice(n.length-2,1),0==e.length){if(t==n.length){var a=this.anchorPoint;return n=n.filter(function(e){return!!e}),n.some(function(e){return e.x==a.x&&e.y==a.y})||n.unshift(this.anchorPoint),n}e=n,t=e.length,n=[],n.push(e.shift(),e.shift())}}}},n(108)&&(void 0!==(i=function(){return r}.call(t,n,t,e))&&(e.exports=i)),"undefined"!=typeof e&&(e.exports=r)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){e.exports=n(31)},function(e,t,n){!function(){"use strict";var t=n(32),r=function(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)};r.prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map(function(e){return t.pointsToString(e.points)}).join(", ")+"]"},addCurve:function(e){this.curves.push(e),this._3d=this._3d||e._3d},length:function(){return this.curves.map(function(e){return e.length()}).reduce(function(e,t){return e+t})},curve:function(e){return this.curves[e]},bbox:function(){for(var e=this.curves,n=e[0].bbox(),r=1;r2)for(a=0;a","\"","getOpeningTag","selfClose","attrName","attrValue","getInnerText","innerTextEscaped","getClosingTag","closingTags","wrap","content","facetSizeToResolution","arcOrCircle","facetSize","chainToJscadScript","reverseTail","tail","head","exit","beginMap","circleOptions","resolution","arcOptions","startangle","endangle","appendMap","large","makePhasedCallback","originalCb","phaseStart","phaseSpan","progress","toJscadCAG","jscadCAG","jsCadCagOptions","chainToJscadCag","fromPoints","jscadCagUnion","augend","addend","union","jscadCagSubtraction","minuend","subtrahend","convertChainsTo2D","convertToT","subtraction","unionize","complete","statusCallback","subtractChains","cs","subtracts","addChains","cag","adds","chainsResult","closedCount","resultMap","flatAdds","toJscadCSG","to2D","to3D","extrude","csg","union3D","convert2Dto3D","result2D","csgs","toJscadScript","_chainToJscadScript","scriptUnion","scriptSubtraction","nl","indent","functionName","toJscadSTL","CAG","stlSerializer","serialize","binary","toPDF","exportUnits","scaledModel","single","pathData","pathToSVGPathData","chainToSVGPathData","fixedPath","svgCoords","correctArc","offsetPoint","firstPoint","chainLinkToPathDataMap","startSvgPathData","pathToExport","exportOffset","clockwiseCircle","svgPathDataMap","getPathDataByLayer","pathDataByLayer","doChains","toSVGPathData","fillRule","findChainsOptions","pathDataArrayByLayer","pathDataStringByLayer","forcePush","layers","elements","cssStyle","elOpts","addSvgAttrs","stroke-width","tagname","scalingStroke","fixPoint","pointToFix","pointMirroredY","fixPath","pathToFix","drawText","textPoint","drawPath","annotate","flow","data-route","circleInPaths","svgCircleData","addFlowMarks","arrowEnd","beginModel","modelGroup","endModel","strokeLineCap","fontSize","useSvgPathOnly","itemToExportIsModel","unitSystem","useSvgUnit","svgUnit","scaleConversion","svgAttrs","svgUnitType","svgTag","groupAttrs","stroke-linecap","fill-rule","font-size","svgGroup","layerId1","class","svgArcData","svgBezierData","layerId2","layerGroup","halfCircle","sign","final","increasing","fromSVGPathData","pathCount","getPoint","cmd","lineTo","rx","ry","decreasing","elliptic","xAxis","scaleUp","control1","control2","prevControl2","command","control","prevControl","prevCommand","commandMatches","currPoint","regexpCommands","dataString","currCmd","layout","getChildPlacement","baseline","measureParent","parentTop","cpa","xMap","childMeasure","xRatio","cp","firstX","lastX","moveAndRotate","childrenOnPath","chosenPath","onPathLength","miterAngles","childrenOnChain","onChain","rotated","chainLength","relatives","absolutes","endLink","cloneToRadial","itemToClone","rotateFn","cloneTo","dimension","margin","measureFn","moveFn","cloneToColumn","cloneToRow","cloneToGrid","xCount","yCount","margins","getMargins","cloneToAlternatingRows","spacingFn","0","spacing","xMargin","cloneToBrick","yMargin","cloneToHoneycomb","hex","ensureBezierLib","hasLib","getScratch","bezierJsPoints","BezierToSeed","getIPoint","parentRange","seedToBezier","getExtrema","getError","arcReversed","tSpan","bp","ap","getLargestArc","lastGoodArc","TPoint","upper","lower","getArcs","getActualBezierRange","endpoints","tPoints","endpointDistancetoStart","getChainBezierRange","addToLayer","endLinks","actualBezierRanges","isArrayArg0","extremaSpan","seedsByLayer","pathToAdd","piece","controlYForCircularCubic","arcSpanInRadians","controlPointsForCircularCubic","bezierSeedFromArc","maxBezierArcspan","isPointArgs0","realArgs","numArgs","distortX","distortY","subSpan","subArc","getPoints","isClosed","skipZeroDistance","numberOfSides","firstCornerAngleInDegrees","circumscribed","Holes","holeRadius","ids","BoltCircle","boltRadius","boltCount","firstBoltAngleInDegrees","BoltRectangle","Dogbone","bottomless","maxRadius","maxSide","SQRT2","ax","ay","apexes","Dome","w2","wt","RoundRectangle","wr","Oval","sweepRadius","slotRadius","selfIntersect","capRoot","Caps","addCap","tiltAngle","offsetStartAngle","offsetEndAngle","capModel","addSweep","offsetRadius","hasInner","Rectangle","outerRadius","innerRadius","radii","Ring_outer","Ring_inner","Belt","leftRadius","rightRadius","SCurve","findRadius","arcOrigin","h2","capPath","Square","Star","skipPoints","InnerRadiusRatio","outerPoints","innerPoints","allPoints","Text","font","centerCharacterOrigin","opentypeOptions","prevDeleted","prevChar","charIndex","glyph","_fontSize","charModel","glyphToModel","deleted","forEachGlyph","getPath","commands","Buffer","circular","depth","_clone","proto","__isArray","__isRegExp","__getRegExpFlags","__isDate","useBuffer","isBuffer","allocUnsafe","allParents","allChildren","__objToStr","ignoreCase","multiline","clonePrototype","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","encodingOrOffset","fromArrayBuffer","fromString","fromObject","assertSize","alloc","encoding","isEncoding","actual","write","fromArrayLike","byteOffset","isnan","SlowBuffer","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","read","indexSize","readUInt16BE","arrLength","valLength","foundIndex","hexWrite","strLen","parsed","parseInt","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","out","toHex","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","leadSurrogate","byteArray","lo","toByteArray","dst","INSPECT_MAX_BYTES","foo","subarray","poolSize","_augment","species","allocUnsafeSlow","_isBuffer","compare","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","getLens","b64","validLen","lens","placeHoldersLen","_byteLength","tmp","Arr","curByte","revLookup","tripletToBase64","num","lookup","encodeChunk","uint8","output","extraBytes","len2","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","LN2","getX","getY","nodeSize","ArrayType","KDBush","defaultGetX","defaultGetY","__WEBPACK_IMPORTED_MODULE_0__sort__","__WEBPACK_IMPORTED_MODULE_1__range__","__WEBPACK_IMPORTED_MODULE_2__within__","minX","minY","maxX","maxY","sortKD","inc","swapItem","axis","nextAxis","qx","qy","sqDist","bx","by","ConvexHullGrahamScan","anchorPoint","_findPolarAngle","_sortPoints","_checkPoints","__webpack_amd_options__","addCurve","makeBezier","term","cvalues","PreboundConstructor","convertPath","terms","normalise","matcher","ARGS","normalizePath","instruction","op","lop","instructions","instructionLength","sx","sy","cx2","cy2","normalized"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAA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k/H,EAAAzvH,EAAAlP,EAAAP,EAAA,GACAuP,GAAAhP,EAAAP,EAAA,GACAyP,GAAAlP,EAAAP,EAAA,KAEAi/H,EAAA1+H,EAAAP,GACAk/H,EAAA3+H,EAAAP,EAAA,GACAuP,EAAAhP,EAAAP,EAAA,GACAyP,EAAAlP,EAAAP,EAAA,IAEAm/H,IAAA,IAAA1hH,EAAAC,EAAAuhH,EAAAC,EAAA3vH,EAAAE,EAAA,IAAAtL,KAAA,SAEK,MAAAy6H,IACLO,GAAA,KAEA5vH,EAAAwvH,EACAtvH,EAAAuvH,EAGA,OAAAG,GAAAriG,OAGAx+B,EAAAD,QAAAogI","file":"static/js/main.21b11d96.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 33);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nif (true) {\n module.exports = __webpack_require__(40);\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(50)();\n}\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = \"production\" !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(5);\n/* unused harmony reexport parsePath */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__[\"b\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return stripLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return hasBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return stripBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return stripTrailingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return parsePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createPath; });\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nvar createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (false) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return locationsAreEqual; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(5);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = Object(__WEBPACK_IMPORTED_MODULE_2__PathUtils__[\"d\" /* parsePath */])(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = Object(__WEBPACK_IMPORTED_MODULE_0_resolve_pathname__[\"a\" /* default */])(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nvar locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_1_value_equal__[\"a\" /* default */])(a.state, b.state);\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createTransitionManager);\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(11);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__[\"a\" /* default */]);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;\n };\n\n return Router;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRouter.propTypes = {\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node\n};\nRouter.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Router);\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (matchPath);\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Utils = __webpack_require__(14)\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar asap = __webpack_require__(36);\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (false) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (false) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(49);\n/* unused harmony reexport BrowserRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(58);\n/* unused harmony reexport MemoryRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(60);\n/* unused harmony reexport NavLink */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(62);\n/* unused harmony reexport Prompt */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(64);\n/* unused harmony reexport Redirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(10);\n/* unused harmony reexport Router */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(66);\n/* unused harmony reexport StaticRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(70);\n/* unused harmony reexport generatePath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(71);\n/* unused harmony reexport matchPath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(72);\n/* unused harmony reexport withRouter */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canUseDOM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return removeEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getConfirmation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return supportsHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return supportsPopStateOnHashChange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return supportsGoWithoutReloadUsingHash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isExtraneousPopstateEvent; });\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"c\" /* createLocation */])(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nLink.propTypes = {\n onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,\n innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Link);\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(24);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__[\"a\" /* default */]);\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRoute.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from \n path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRoute.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n })\n};\nRoute.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Route);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isarray = __webpack_require__(61)\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (generatePath);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i5&&arguments[5]!==undefined?arguments[5]:false;_classCallCheck(this,Point);this.cx=point[0];this.cy=point[1];this.fill='#2da7cf80';this.stroke='rgb(123, 207, 225)';this.selector=selector;this.canvas=canvas;this.x=x;this.y=y;this.zoom=zoom;this.el=document.createElementNS('http://www.w3.org/2000/svg','circle');this.select=this.select.bind(this);this.move=this.move.bind(this);this.stopEditing=this.stopEditing.bind(this);this.get_point=this.get_point.bind(this);this.old_cx=point[0];this.old_cy=point[1];this.base_size=10;this.base_stroke=5;this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;}_createClass(Point,[{key:'draw',value:function draw(){this.el.setAttribute('cx',this.cx);this.el.setAttribute('cy',this.cy);this.el.setAttribute('r',this.size);this.el.style.stroke=this.stroke;this.el.style.strokeWidth=this.strokeWidth;this.el.style.fill=this.fill;}},{key:'setSize',value:function setSize(zoom){this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;this.draw();}},{key:'edit',value:function edit(){this.el.addEventListener('click',this.select);}},{key:'clear',value:function clear(){window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);this.fill='#2da7cf80';this.cx=this.old_cx;this.cy=this.old_cy;this.draw();}},{key:'stopEditing',value:function stopEditing(){window.snapping_points.push([this.cx,this.cy]);this.old_cx=this.cx;this.old_cy=this.cy;this.fill='#2da7cf80';this.draw();window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis1||ub<0||ub>1){return false;}// Return a object with the x and y coordinates of the intersection\nvar x=x1+ua*(x2-x1);var y=y1+ua*(y2-y1);return{x:x,y:y};}function calc_vol(poly,scale){var measures=toD3(poly);var dist=(measures.centroid[0]-window.r_axis)*2*Math.PI;var vol=dist*measures.area*Math.pow(scale,3);return Math.abs(vol);}function distance(p1,p2){return Math.sqrt(Math.pow(p1[0]-p2[0],2)+Math.pow(p1[1]-p2[1],2));}function calcScale(poly,value,unit){if(!poly){return null;}var v1=[poly.points[0].cx,poly.points[0].cy];var v2=[poly.points[1].cx,poly.points[1].cy];var d=distance(v1,v2);var new_value=void 0;if(unit==='inch'){new_value=value*2.54;}else{new_value=value;}var pro=new_value/d/10;return pro;}function toD3(poly){var points_array=[];poly.forEach(function(point){points_array.push([point.cx,point.cy]);});return{centroid:d3.polygonCentroid(points_array),area:d3.polygonArea(points_array)};}function cleanedPoly(array){var points=[];var x=0;array.forEach(function(el){if(xend.cy&&window.maxFill=1){//message = \"Simple join\"\nif(points[0]==='start-start'){new_poly=poly1.points.reverse().concat(poly2.points);}else if(points[0]==='end-end'){new_poly=poly1.points.concat(poly2.points.reverse());}else if(points[0]==='start-end'){new_poly=poly2.points.concat(poly1.points);}else if(points[0]==='end-start'){new_poly=poly1.points.concat(poly2.points);}if(points.length===2){//message = \"closed line\"\n}return new_poly;}else{return;}}function polyPointsToPathData(points_string){return'M'+points_string.replace(/, /g,',').replace(/ $/,'').replace(/ /g,'L');}\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = __webpack_require__(32);\n\n // only used for outlines atm.\n var PolyBezier = __webpack_require__(110);\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = __webpack_require__(111);\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = __webpack_require__(31);\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(15);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(75);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__App__ = __webpack_require__(76);\n__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__[\"a\" /* HashRouter */],null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__App__[\"a\" /* default */],null)),document.getElementById('root'));\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar k=__webpack_require__(8),n=__webpack_require__(17),p=__webpack_require__(18),q=__webpack_require__(19),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"a\" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nBrowserRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (BrowserRouter);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(51);\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"g\" /* supportsHistory */])();\n var needsHashChangeListener = !Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"h\" /* supportsPopStateOnHashChange */])();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"d\" /* isExtraneousPopstateEvent */])(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createBrowserHistory);\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (resolvePathname);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (valueEqual);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */])(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n },\n slash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"f\" /* supportsGoWithoutReloadUsingHash */])();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"b\" /* locationsAreEqual */])(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location));\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createHashHistory);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(9);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, createKey()) : Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = __WEBPACK_IMPORTED_MODULE_1__PathUtils__[\"b\" /* createPath */];\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createMemoryHistory);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(10);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"b\" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nHashRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (HashRouter);\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(59);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(11);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"d\" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,\n initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (MemoryRouter);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(22);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__[\"a\" /* default */], {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */], _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: __WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */].propTypes.to,\n exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n \"aria-current\": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (NavLink);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(63);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__[\"a\" /* default */]);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPrompt.propTypes = {\n when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Prompt);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(65);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__[\"a\" /* default */]);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(26);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(prevProps.to);\n var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(this.props.to);\n\n if (Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"f\" /* locationsAreEqual */])(prevTo, nextTo)) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nRedirect.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from \n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Redirect);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(67);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"e\" /* createPath */])(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__[\"a\" /* default */], _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nStaticRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (StaticRouter);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(69);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__[\"a\" /* default */]);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {\n if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSwitch.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Switch);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(26);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__[\"a\" /* default */]);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(12);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__[\"a\" /* default */]);\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(73);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(24);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__[\"a\" /* default */], {\n children: function children(routeComponentProps) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (withRouter);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__responsive_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Draw__ = __webpack_require__(77);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:\"other\";this.globalStopEditingMode();this.addCursorPoint();var new_polylines=this.state.polylines;var polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:type,selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});new_polylines.push(polyline);this.id++;this.setState({polylines:new_polylines,active_polyline:polyline});}},{key:'selectLayer',value:function selectLayer(id){var _this2=this;if(this.state.active_polyline){if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:\"Escape\"});}}this.setState({active_polyline:this.getPolylineById(id)},function(){_this2.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});_this2.state.active_polyline.el.classList.toggle('active');});}//////////////////////////////////////////////////////////////////////////////\n// UTILITIES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'unselect_polyline',value:function unselect_polyline(e){console.log(e.code);if(e.code==='Escape'||e.code==='KeyQ'){if(this.state.active_polyline){this.state.active_polyline.el.classList.remove('active');this.state.active_polyline.stopEditing({'code':'Escape'});if(this.state.active_polyline.editing){this.state.active_polyline.stopEditingPoints({'code':'Escape'});}if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:'Escape'});}}this.setState({active_polyline:undefined});Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(this.state.polylines);this.checkProfile('int_prof');this.checkProfile('out_prof');if(this.new_point.added){this.removeCursorPoint();}//remove 0 or 1 vertex polyline\nthis.state.polylines.forEach(function(polyline){if(polyline.points.length<2){this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==polyline.id;})});this.canvas.removeChild(polyline.el);}}.bind(this));}}},{key:'globalStopEditingMode',value:function globalStopEditingMode(){this.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});if(this.state.active_polyline){this.state.active_polyline.stopEditing({'code':'Escape'});}}},{key:'addNotification',value:function addNotification(message){this.setState({notification:{id:this.not_id,message:message}});this.not_id++;}},{key:'getPolylineById',value:function getPolylineById(id){return this.state.polylines.filter(function(el){return el.id===id;})[0];}},{key:'addCursorPoint',value:function addCursorPoint(){this.canvas.appendChild(this.new_point.el);this.new_point.added=true;this.new_point.select();}},{key:'removeCursorPoint',value:function removeCursorPoint(){this.canvas.removeChild(this.new_point.el);this.new_point.added=false;}},{key:'updateToDo',value:function updateToDo(type,value){var toDo=this.state.toDo;toDo[type]=value;this.setState({toDo:toDo});}},{key:'checkProfile',value:function checkProfile(type){var poly1=this.state.polylines.filter(function(el){return el.type===type;});if(poly1.length===0){this.updateToDo(type,false);if(type==='int_prof'){if(this.inner_poly){this.canvas.removeChild(this.inner_poly);this.inner_poly=null;this.setState({vessel_capacity:null});}}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);this.vessel_poly=null;this.setState({vessel_volume:null});}}else if(poly1.length===1){this.updateToDo(type,true);}else{this.updateToDo(type,false);var profile=type==='int_prof'?'internal profile':'outer profile';this.addNotification('There should be only one '+profile);}}//////////////////////////////////////////////////////////////////////////////\n// JOIN POLYLINES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'joinIntExt',value:function joinIntExt(){var poly1=this.state.polylines.filter(function(el){return el.type==='int_prof';})[0];var poly2=this.state.polylines.filter(function(el){return el.type==='out_prof';})[0];if(!poly1||!poly2){this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\");return;}this.vesselVolume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"f\" /* join2Polylines */])(poly1,poly2);if(!this.vesselVolume){this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\");return;}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);}this.vessel_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.vesselVolume,'rgba(170, 170, 170, 0.6)');var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale);this.setState({vessel_volume:volume});this.canvas.appendChild(this.vessel_poly);}},{key:'create_inner_polygon',value:function create_inner_polygon(){var poly=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(poly.length===0){this.addNotification(\"To calculate vessel capacity you need an internal profile\");return;}if(this.inner_poly){this.canvas.removeChild(this.inner_poly);}//define inner polygon points based on inner profile and rotation axis\nthis.innerPolygon=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"e\" /* innerProfileToPolygon */])(poly[0].points.slice());//create svg polygon\nthis.inner_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.innerPolygon,'rgba(210, 204, 78, 0.28)');if(this.scale){var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale);this.setState({vessel_capacity:volume});}else{this.addNotification('Can\\'t measure, define scale first');}this.canvas.appendChild(this.inner_poly);}//////////////////////////////////////////////////////////////////////////////\n// ADD REFERENCE SCALE rotation axis AND MAX FILL //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'metricForm',value:function metricForm(obj){var _this3=this;if(obj.ref_unit){this.updateToDo('ref_unit',true);this.setState({metric_value:obj.value,metric_unit:obj.unit},function(){if(_this3.metric&&_this3.metric.points.length===2){_this3.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(_this3.metric,_this3.state.metric_value,_this3.state.metric_unit);//update volume info when metric info are updated\nif(_this3.innerPolygon){_this3.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.innerPolygon,_this3.scale)});}if(_this3.vesselVolume){_this3.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.vesselVolume,_this3.scale)});}}});}else{this.updateToDo('ref_unit',false);this.scale=null;}}},{key:'defineMaxFill',value:function defineMaxFill(){//remove maxFill if present\nif(this.maxFill){this.canvas.removeChild(this.maxFill.el);this.updateToDo('maxFill',false);}//create new maxFill polyline\nthis.maxFill=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'max_fill',type:'max_fill',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({code:'Escape'});}},{key:'addMaxFill',value:function addMaxFill(e){this.maxFill.stroke='rgb(0, 255, 21)';this.maxFill.add_point(e);this.canvas.appendChild(this.maxFill.el);this.maxFill.draw();//exit editing mode\nthis.maxFill.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.maxFill=this.maxFill.points[0].cy;this.updateToDo('maxFill',true);}},{key:'defineMetric',value:function defineMetric(){this.unselect_polyline({code:\"Escape\"});//remove metric if present\nif(this.metric){this.canvas.removeChild(this.metric.el);this.updateToDo('metric',false);}//create new metric polyline\nthis.metric=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'metric',type:'metric',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMetric);this.metric.stopEditing({code:'Escape'});}},{key:'addMetric',value:function addMetric(e){if(this.metric.points.length===0){this.metric.add_point(e);}else if(this.metric.points.length===1){//this is the 2nd point, add it and exit editing\nthis.metric.add_point(e);this.metric.stroke='red';this.metric.stopEditing({code:\"Escape\"});//set color\nthis.metric.el.classList.remove('active');//stop editing\nthis.canvas.removeEventListener('dblclick',this.addMetric);this.updateToDo('metric',true);this.removeCursorPoint();if(this.state.metric_value&&this.state.metric_unit){this.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(this.metric,this.state.metric_value,this.state.metric_unit);}//update volume info when metric info are updated\nif(this.innerPolygon){this.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale)});}if(this.vesselVolume){this.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale)});}}}},{key:'definerotAxis',value:function definerotAxis(){//remove if already present\nif(this.rotAxis){this.canvas.removeChild(this.rotAxis.el);window.r_axis=null;this.updateToDo('rotAxis',false);}//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addRotAxis);}},{key:'addRotAxis',value:function addRotAxis(e){//create rotation axis polyline\nthis.rotAxis=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'center',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.rotAxis.stroke='#ff5a00';this.rotAxis.add_point(e);this.canvas.appendChild(this.rotAxis.el);this.rotAxis.draw();//exit editing mode\nthis.rotAxis.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addRotAxis);this.rotAxis.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.r_axis=this.rotAxis.points[0].cx;this.updateToDo('rotAxis',true);}//////////////////////////////////////////////////////////////////////////////\n// LAYER EDITING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'colorChange',value:function colorChange(id,color){var my_polyline=this.getPolylineById(id);my_polyline.stroke=color;my_polyline.draw();}},{key:'typeChange',value:function typeChange(id,type){var _this4=this;this.setState({polylines:this.state.polylines.map(function(el){if(el.id===id){el.type=type;return el;}return el;})},function(){_this4.checkProfile('int_prof');_this4.checkProfile('out_prof');});}},{key:'delete_line',value:function delete_line(){var _this5=this;this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.canvas.removeChild(this.state.active_polyline.el);this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==_this5.state.active_polyline.id;}),active_polyline:undefined},function(){_this5.checkProfile('int_prof');_this5.checkProfile('out_prof');Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(_this5.state.polylines);});}},{key:'edit_line',value:function edit_line(){this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.state.active_polyline.editLine();}//////////////////////////////////////////////////////////////////////////////\n// LAYER BREAKING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'enterBreakLineMode',value:function enterBreakLineMode(){this.globalStopEditingMode();//check if breaking selected line is possible\nif(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}if(this.state.active_polyline.points.length<=2){this.addNotification(\"Line has two or less vertices and can't be subdivided\");return;}//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=true;this.setState({active_polyline:active_polyline});//add breaking points to canvas\nvar x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){this.canvas.appendChild(point.el);point.draw();point.el.addEventListener('click',this.breakLine);}x++;}.bind(this));}},{key:'exitBreakLineMode',value:function exitBreakLineMode(e){//remove breaking points from canvas\nif((e.code==='Escape'||e.code==='KeyQ')&&this.state.active_polyline.breaking_mode){var x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){point.el.removeEventListener('click',this.breakLine);this.canvas.removeChild(point.el);}x++;}.bind(this));//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=false;this.setState({active_polyline:active_polyline});}}},{key:'breakLine',value:function breakLine(e){var _this6=this;var break_point=[e.target.getAttribute('cx'),e.target.getAttribute('cy')];this.exitBreakLineMode({code:'Escape'});//instantiate polyline list to edit\nvar new_polylines=this.state.polylines;//create a new polyline\nvar polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//loop over the polyine to break and add point to new polyline until you get to the breaking point\nthis.state.active_polyline.points.forEach(function(point){polyline.appendPoint([point.cx,point.cy]);if(point.cx===parseFloat(break_point[0])&&point.cy===parseFloat(break_point[1])){//save draw and exit editing mode\npolyline.el.classList.remove('active');new_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//create a new polyline with starting point the breaking point\npolyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});polyline.appendPoint([point.cx,point.cy]);}}.bind(this));//save draw and exit editing mode for sencond line\nnew_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//delete orignal broken line and exit editing mode\nthis.state.active_polyline.stopEditing({'code':'Escape'});this.canvas.removeChild(this.state.active_polyline.el);//update the state with the two new lines without the old one\nthis.setState({polylines:new_polylines.filter(function(el){return el.id!==_this6.state.active_polyline.id;}),active_polyline:polyline});}//////////////////////////////////////////////////////////////////////////////\n// HANDLE IMAGE //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'image_rotate',value:function image_rotate(e){this.bck_image.style.transform='rotate('+e.target.value+'deg)';}},{key:'fileChangedHandler',value:function fileChangedHandler(e){var img_name=e.target.value.split(\"\\\\\");img_name=img_name[img_name.length-1];this.setState({img_name:img_name});var img=new Image();img.src=window.URL.createObjectURL(e.target.files[0]);img.onload=function(){var width=img.naturalWidth;var height=img.naturalHeight;var toDo=this.state.toDo;toDo.image=true;this.setState({img_w:width,img_h:height,selectedFile:img.src,toDo:toDo});}.bind(this);}//////////////////////////////////////////////////////////////////////////////\n// DOWNLOAD //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'download_svg',value:function download_svg(){var _this7=this;if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}var saved_path=this.state.selectedFile;if(this.state.img_name){this.setState({selectedFile:this.state.img_name.replace('href')},function(){download(_this7.svg.outerHTML,\"dlText.svg\",\"text/plain\");_this7.setState({selectedFile:saved_path});});}else{download(this.svg.outerHTML,\"myVessel.svg\",\"text/plain\");}}},{key:'download_dxf',value:function download_dxf(){if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}var makerjs=__webpack_require__(97);var models={models:{}};var x=1;this.state.polylines.forEach(function(polyline){var points=polyline.el.getAttribute('points');var closed=false;//true for SVG polygon, false for SVG polyline\nvar model=makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed,points),false,true);model=makerjs.model.scale(model,this.scale/10);models.models['my-'+x+'-line']=model;x++;}.bind(this));models.units=makerjs.units.Meter;var file=makerjs.exporter.toDXF(models,{units:makerjs.unitType.Meter});download(file,\"myVessel.dxf\",\"text/plain\");}},{key:'download_json',value:function download_json(){var title='myVessel';var coordinates=void 0,author=void 0,description='';var int_prof=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(int_prof.length>0){int_prof=int_prof[0];}else{this.addNotification('No inner profile to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}coordinates=[];int_prof.points.forEach(function(point){// scale the point - unit will be dm - convert to cm - invert y axis\ncoordinates.push([point.cx*this.scale/10,point.cy*this.scale/10*-1]);}.bind(this));coordinates=JSON.stringify(coordinates);var json='{ \"type\": \"Feature\",\\n \"geometry\": {\\n \"type\": \"LineString\",\\n \"coordinates\": '+coordinates+'\\n },\\n \"properties\": {\\n \"title\": \"'+title+'\",\\n \"description\": \"'+description+'\",\\n \"author\": \"'+author+'\"\\n }\\n }';this.addNotification('Export completed');download(json,title+'.json',\"text/plain\");}//////////////////////////////////////////////////////////////////////////////\n// RENDER //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'render',value:function render(){var _this8=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'container'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__components_Notification__[\"a\" /* default */],{notification:this.state.notification}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2',null,'Draw'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'drawing'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('svg',{id:'drawing-canvas',height:'500',width:'100%',ref:function ref(svg){_this8.svg=svg;}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('g',{className:'svg-pan-zoom_viewport',id:'canvas'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('image',{ref:function ref(bck_image){_this8.bck_image=bck_image;},id:'bck-img',href:this.state.selectedFile,x:'0',y:'0',height:this.state.img_h,width:this.state.img_w}))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'tools'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title'},'Actions:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.create_new_polyline.bind(this),title:'Create new line',alt:'Create new line'},'New'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.enterBreakLineMode.bind(this),title:'Break selected line',alt:'Break selected line'},'Break'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.delete_line.bind(this),title:'Delete selected line',alt:'Delete selected line'},'Delete'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.edit_line.bind(this),title:'Edit selected line',alt:'Edit selected line'},'Edit'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title2'},'Export:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_svg.bind(this),title:'Download SVG (no scaling)',alt:'Download SVG (no scaling)'},'SVG'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_dxf.bind(this),title:'Download all-lines as DXF (scaled: 1 unit = 1 meter)',alt:'Download all-lines as DXF (scaled: 1 unit = 1 meter)'},'DXF'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_json.bind(this),title:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)',alt:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)'},'JSON'))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'polylines'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'layer-title'},'Layers:'),this.state.toDo.image&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'image-layer',className:'polyline-layer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'slidecontainer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label',{htmlFor:'myRange'},'Rotate image'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input',{type:'number',min:'0',max:'360',defaultValue:'0',className:'slider',id:'myRange',step:'0.01',onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(el){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__components_listPoly__[\"a\" /* default */],{key:el.id,name:el.name,type:el.type,id:el.id,delete_line:_this8.delete_line.bind(_this8),edit_line:_this8.edit_line.bind(_this8),colorChange:_this8.colorChange.bind(_this8),typeChange:_this8.typeChange.bind(_this8),selectLayer:_this8.selectLayer.bind(_this8),selectedPoly:_this8.state.active_polyline?_this8.state.active_polyline.id:''});})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'basic-info'},'Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'Esc'),' or ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'q'),' to quit editing mode and deselect.'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__components_Steps__[\"a\" /* default */],{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__components_Measures__[\"a\" /* default */],{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}));}}]);return Draw;}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);/* harmony default export */ __webpack_exports__[\"a\"] = (Draw);//get point coordinates from event\n//get_point(e){\n// const matrix = this.canvas.transform.baseVal[0].matrix\n// const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n// return newPoint\n//}\n//\n//\n//\n//joinTwoPolylines(poly1, poly2){\n// const new_poly = join2Polylines(poly1, poly2)\n//\n// if(!new_poly){\n// this.addNotification(\"Not joinable\")\n// return\n// }\n// return joined_poly\n//\n// //const joined_poly = new Polyline({\n// // points: cleanedPoly(new_poly),\n// // id: this.id,\n// // type: poly1.type,\n// // selected: true,\n// // canvas: this.canvas,\n// // offsetX: this.x,\n// // offsetY: this.y,\n// // currentZoom: this.panZoomTiger.getZoom()\n// //})\n// //joined_poly.stopEditing({code:'Escape'})\n// //this.canvas.removeChild(joined_poly.el)\n// //this.id++\n//\n// //this.canvas.removeChild(poly1.el)\n// //this.canvas.removeChild(poly2.el)\n// //this.canvas.appendChild(joined_poly.el)\n// //joined_poly.draw()\n////\n// //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n// //new_polylines.push(joined_poly)\n// //this.addNotification(message)\n// //this.setState(\n// // { polylines: new_polylines,\n// // notification:{ id:this.not_id, message: message },\n// // active_polyline: joined_poly\n// // }\n// //)\n// //this.not_id++\n//}\n//joinTwoLines(){\n// //TODO\n// this.addNotification(\"Select first line\")\n//}\n//\n// Join 2 lines\n//\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Point__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MidPoint__ = __webpack_require__(79);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calc_functions__ = __webpack_require__(30);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&this.points.length>index){if(point.cx!==this.points[index-1].cx&&point.cy!==this.points[index-1].cy){var midpoint=new __WEBPACK_IMPORTED_MODULE_1__MidPoint__[\"a\" /* default */]([(point.cx+this.points[index-1].cx)/2,(point.cy+this.points[index-1].cy)/2],index,this.zoom);this.midpoints.push(midpoint);}}index++;}.bind(this));//add midpoints to canvas\nthis.midpoints.forEach(function(midpoint){this.canvas.appendChild(midpoint.el);midpoint.draw();midpoint.el.addEventListener('click',this.create);}.bind(this));}},{key:'create',value:function create(e){var index=e.target.getAttribute('index');var new_point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([parseFloat(e.target.getAttribute('cx')),parseFloat(e.target.getAttribute('cy'))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(index,new_point);}},{key:'addPointInMiddle',value:function addPointInMiddle(index,new_point){this.points.splice(index,0,new_point);this.canvas.appendChild(new_point.el);new_point.draw();new_point.edit();new_point.select();this.draw();}},{key:'pointsTo',value:function pointsTo(){var str='';this.points.forEach(function(point){str+=point.cx+', '+point.cy+' ';});return str;}//add point\n},{key:'add_point',value:function add_point(e){var new_point=this.get_point(e);if(this.type==='max_fill'){var point=[-1000000,new_point[1]];this.appendPoint(point);point=[1000000,new_point[1]];this.appendPoint(point);return;}if(this.type==='center'){var _point=[new_point[0],-1000000];this.appendPoint(_point);_point=[new_point[0],1000000];this.appendPoint(_point);return;}this.appendPoint(new_point);}},{key:'appendPoint',value:function appendPoint(array){window.snapping_points.push([array[0],array[1]]);var point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([array[0],array[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(point);this.draw();if(this.points.length===1){window.addEventListener('mousemove',this.previewPoint);window.addEventListener('keyup',this.stopEditing);}}},{key:'get_point',value:function get_point(e){var matrix=this.canvas.transform.baseVal[0].matrix;var newPoint=[(e.pageX-matrix.e-this.x)/matrix.a,(e.pageY-matrix.f-this.y)/matrix.a];return this.snapPoint(newPoint);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && Object(__WEBPACK_IMPORTED_MODULE_0__cross__[\"a\" /* default */])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n});\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n});\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n});\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\n// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13);\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13)\n , Utils = __webpack_require__(14)\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = __webpack_require__(98);\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = __webpack_require__(103);\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = __webpack_require__(107);\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = __webpack_require__(109);\r\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(Buffer) {var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(99).Buffer))\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(100)\nvar ieee754 = __webpack_require__(101)\nvar isArray = __webpack_require__(102)\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"default\"] = kdbush;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sort__ = __webpack_require__(104);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range__ = __webpack_require__(105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__within__ = __webpack_require__(106);\n\n\n\n\n\nfunction kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n Object(__WEBPACK_IMPORTED_MODULE_0__sort__[\"a\" /* default */])(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__range__[\"a\" /* default */])(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__within__[\"a\" /* default */])(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = sortKD;\n\nfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = range;\n\nfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = within;\n\nfunction within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==\"function\"&&__webpack_require__(108)&&!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return ConvexHullGrahamScan}.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports) {\n\n/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(31);\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n var utils = __webpack_require__(32);\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar normalise = __webpack_require__(112);\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\n/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// static/js/main.21b11d96.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5cd89ac8094629488961","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react/index.js\n// module id = 0\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 1\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/invariant/browser.js\n// module id = 2\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/warning/warning.js\n// module id = 3\n// module chunks = 0","export var addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nexport var createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/PathUtils.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/node_modules/warning/browser.js\n// module id = 6\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/LocationUtils.js\n// module id = 7\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 8\n// module chunks = 0","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n warning(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\nexport default createTransitionManager;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createTransitionManager.js\n// module id = 9\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Router from \"react-router/es/Router\";\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Router.js\n// module id = 10\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n invariant(children == null || React.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? React.Children.only(children) : null;\n };\n\n return Router;\n}(React.Component);\n\nRouter.propTypes = {\n history: PropTypes.object.isRequired,\n children: PropTypes.node\n};\nRouter.contextTypes = {\n router: PropTypes.object\n};\nRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Router.js\n// module id = 11\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/matchPath.js\n// module id = 12\n// module chunks = 0","var Utils = require('./utilities')\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-utilities.js\n// module id = 13\n// module chunks = 0","module.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/utilities.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/core.js\n// module id = 15\n// module chunks = 0","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 16\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/invariant.js\n// module id = 17\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyObject.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyFunction.js\n// module id = 19\n// module chunks = 0","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/DOMUtils.js\n// module id = 21\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport { createLocation } from \"history\";\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n invariant(this.context.router, \"You should not use outside a \");\n\n invariant(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? createLocation(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return React.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(React.Component);\n\nLink.propTypes = {\n onClick: PropTypes.func,\n target: PropTypes.string,\n replace: PropTypes.bool,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired,\n createHref: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Link;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Link.js\n// module id = 22\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Route from \"react-router/es/Route\";\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Route.js\n// module id = 23\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Route.js\n// module id = 24\n// module chunks = 0","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/index.js\n// module id = 25\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = pathToRegexp.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/generatePath.js\n// module id = 26\n// module chunks = 0","export default class Point {\n\n constructor(point, canvas, x, y, zoom, selector = false) {\n this.cx = point[0]\n this.cy = point[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n\n this.selector = selector\n this.canvas = canvas\n this.x = x\n this.y = y\n this.zoom = zoom\n\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n this.select = this.select.bind(this)\n this.move = this.move.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.get_point = this.get_point.bind(this)\n\n this.old_cx = point[0]\n this.old_cy = point[1]\n\n this.base_size = 10\n this.base_stroke = 5\n this.size = this.base_size / zoom\n this.strokeWidth = this.base_stroke / zoom\n }\n\n draw() {\n this.el.setAttribute('cx', this.cx);\n this.el.setAttribute('cy', this.cy);\n this.el.setAttribute('r', this.size);\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.fill = this.fill;\n }\n\n setSize(zoom) {\n this.size = this.base_size/zoom\n this.strokeWidth = this.base_stroke / zoom\n this.draw()\n }\n\n edit() {\n this.el.addEventListener('click', this.select)\n }\n\n clear() {\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n this.fill = '#2da7cf80'\n this.cx = this.old_cx\n this.cy = this.old_cy\n this.draw()\n }\n\n stopEditing() {\n window.snapping_points.push([this.cx, this.cy])\n this.old_cx = this.cx\n this.old_cy = this.cy\n\n this.fill = '#2da7cf80'\n this.draw()\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n move(e) {\n this.cx = this.get_point(e)[0]\n this.cy = this.get_point(e)[1]\n this.draw()\n if(!this.selector){\n window.addEventListener('dblclick', this.stopEditing)\n }\n }\n\n select() {\n this.old_cx = this.cx\n this.old_cy = this.cy\n this.fill = 'yellow'\n this.draw()\n window.addEventListener('mousemove', this.move)\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Point.js","const d3 = require('d3-polygon')\n\n//http://paulbourke.net/geometry/pointlineplane/javascript.txt\n// line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/\n// Determine the intersection point of two line segments\n// Return FALSE if the lines don't intersect\nfunction intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n // Check if none of the lines are of length 0\n\tif ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n\t\treturn false\n\t}\n\tlet denominator = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1))\n // Lines are parallel\n\tif (denominator === 0) {\n\t\treturn false\n\t}\n\tlet ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator\n\tlet ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator\n // is the intersection along the segments\n\tif (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n\t\treturn false\n\t}\n // Return a object with the x and y coordinates of the intersection\n\tlet x = x1 + ua * (x2 - x1)\n\tlet y = y1 + ua * (y2 - y1)\n\n\treturn {x, y}\n}\n\nfunction calc_vol(poly, scale) {\n let measures = toD3(poly)\n let dist = (measures.centroid[0] - window.r_axis) * 2 * Math.PI\n let vol = dist * measures.area * Math.pow(scale, 3)\n return Math.abs(vol)\n}\n\nfunction distance(p1, p2) {\n return Math.sqrt(Math.pow((p1[0] - p2[0]), 2) + Math.pow((p1[1] - p2[1]), 2))\n}\n\nfunction calcScale(poly, value, unit) {\n if (!poly) {\n return null\n }\n const v1 = [\n poly.points[0].cx,\n poly.points[0].cy\n ]\n const v2 = [\n poly.points[1].cx,\n poly.points[1].cy\n ]\n const d = distance(v1, v2)\n let new_value\n if (unit === 'inch') {\n new_value = value * 2.54\n } else {\n new_value = value\n }\n const pro = (new_value / d) / 10\n return pro\n}\n\nfunction toD3(poly) {\n let points_array = []\n poly.forEach(function(point) {\n points_array.push([point.cx, point.cy])\n })\n return {centroid: d3.polygonCentroid(points_array), area: d3.polygonArea(points_array)}\n}\n\nfunction cleanedPoly(array) {\n let points = []\n let x = 0\n array.forEach(function(el) {\n if (x < array.length - 1) {\n if (el.cx !== array[x + 1].cx && el.cy !== array[x + 1].cy) {\n points.push(el)\n }\n x++\n } else {\n points.push(el)\n }\n })\n return points\n}\n\nfunction getCommonPoints(poly1, poly2) {\n let start1 = poly1[0]\n let end1 = poly1[poly1.length - 1]\n let start2 = poly2[0]\n let end2 = poly2[poly2.length - 1]\n let commons = []\n if (start1.cx === start2.cx && start1.cy === start2.cy) {\n commons.push('start-start')\n }\n if (start1.cx === end2.cx && start1.cy === end2.cy) {\n commons.push('start-end')\n }\n if (end1.cx === start2.cx && end1.cy === start2.cy) {\n commons.push('end-start')\n }\n if (end1.cx === end2.cx && end1.cy === end2.cy) {\n commons.push('end-end')\n }\n return commons\n}\n\nfunction innerProfileToPolygon(old_poly) {\n let poly = [];\n old_poly.forEach(function(point){\n poly.push(Object.assign({}, point))\n })\n let start = poly[0]\n let end = poly[poly.length - 1]\n //start polyline from bottom to top Y values are inverted topY < bottomY\n if (start.cy < end.cy) {\n poly.reverse()\n start = poly[0]\n end = poly[poly.length - 1]\n }\n let new_end = Object.assign({}, end);\n\n //set max fill\n if(window.maxFill && window.maxFill > end.cy && window.maxFill < start.cy){\n //recreate poly excluding vetices above maxFill\n let temp_poly = []\n let first_time = true\n poly.forEach(function(point){\n if(point.cy < window.maxFill){\n\t\t\t\t//this vertex is above maxFill skip\n\t\t\t\t//if this is the first vertex above add it otherwise ignore it\n\t\t\t\tif(first_time){\n temp_poly.push(point)\n first_time = false\n }\n }else{\n\t\t\t\t//this vertex is under maxFill\n\t\t\t\t//add vertex that is under maxFill limit\n temp_poly.push(point)\n }\n })\n\n poly = temp_poly\n\n start = poly[0]\n end = poly[poly.length - 1]\n end.cx = intersect(\n end.cx, end.cy, poly[poly.length-2].cx, poly[poly.length-2].cy,\n -10000000, window.maxFill, 10000000, window.maxFill\n ).x\n end.cy = window.maxFill\n new_end.cy = window.maxFill\n }\n\n\n //if not caxis use start x as center axis else use the defined center axis\n if (!window.r_axis || window.r_axis === start.cx) {\n window.r_axis = start.cx\n new_end.cx = start.cx\n poly.push(new_end)\n poly.push(start) //duplicated to close polygon\n } else {\n let new_start = Object.assign({}, start);\n new_start.cx = window.r_axis\n new_end.cx = window.r_axis\n poly.push(new_end)\n poly.push(new_start)\n poly.push(start) //duplicated to close polygon\n }\n return poly\n}\n\nfunction create_polygon(poly, color) {\n let str = ''\n poly.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n let new_poly = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n new_poly.setAttribute('points', str)\n new_poly.style.fill = color\n new_poly.style.strokeWidth = '0'\n return new_poly\n}\n\nfunction recreate_snapping_points(polylines) {\n window.snapping_points = []\n polylines.forEach(function(poly) {\n poly.points.forEach(function(point) {\n window.snapping_points.push([point.cx, point.cy])\n })\n })\n}\n\nfunction join2Polylines(poly1, poly2) {\n const points = getCommonPoints(poly1.points.slice(), poly2.points.slice())\n let new_poly = []\n\n if (points.length >= 1) {\n //message = \"Simple join\"\n if (points[0] === 'start-start') {\n new_poly = poly1.points.reverse().concat(poly2.points)\n } else if (points[0] === 'end-end') {\n new_poly = poly1.points.concat(poly2.points.reverse())\n } else if (points[0] === 'start-end') {\n new_poly = poly2.points.concat(poly1.points)\n } else if (points[0] === 'end-start') {\n new_poly = poly1.points.concat(poly2.points)\n }\n if (points.length === 2) {\n //message = \"closed line\"\n }\n return new_poly\n } else {\n return\n }\n}\n\nfunction polyPointsToPathData(points_string){\n\treturn 'M'+points_string.replace(/, /g, ',').replace(/ $/, '').replace(/ /g, 'L')\n}\n\nexport {\n calc_vol,\n distance,\n calcScale,\n toD3,\n cleanedPoly,\n getCommonPoints,\n create_polygon,\n recreate_snapping_points,\n join2Polylines,\n innerProfileToPolygon,\n\tpolyPointsToPathData\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/calc_functions.js","/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = require(\"./utils.js\");\n\n // only used for outlines atm.\n var PolyBezier = require(\"./poly-bezier.js\");\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = require(\"./svg-to-beziers\");\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/bezier.js\n// module id = 31\n// module chunks = 0","(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = require(\"./bezier\");\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 36\n// module chunks = 0","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/es6-extensions.js\n// module id = 37\n// module chunks = 0","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/whatwg-fetch/fetch.js\n// module id = 38\n// module chunks = 0","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HashRouter } from 'react-router-dom'\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(, document.getElementById('root'));\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var k=require(\"object-assign\"),n=require(\"fbjs/lib/invariant\"),p=require(\"fbjs/lib/emptyObject\"),q=require(\"fbjs/lib/emptyFunction\"),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n basename: PropTypes.string,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default BrowserRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/BrowserRouter.js\n// module id = 49\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 50\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 51\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + createPath(location);\n };\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createBrowserHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createBrowserHistory.js\n// module id = 52\n// module chunks = 0","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/resolve-pathname/index.js\n// module id = 53\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/value-equal/index.js\n// module id = 54\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + createPath(location));\n };\n\n var push = function push(path, state) {\n warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createHashHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createHashHistory.js\n// module id = 55\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = createPath;\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createMemoryHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createMemoryHistory.js\n// module id = 56\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createHashHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n basename: PropTypes.string,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: PropTypes.node\n};\n\n\nexport default HashRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/HashRouter.js\n// module id = 57\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from \"react-router/es/MemoryRouter\";\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/MemoryRouter.js\n// module id = 58\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/MemoryRouter.js\n// module id = 59\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Route from \"./Route\";\nimport Link from \"./Link\";\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return React.createElement(Route, {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return React.createElement(Link, _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: Link.propTypes.to,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n location: PropTypes.object,\n activeClassName: PropTypes.string,\n className: PropTypes.string,\n activeStyle: PropTypes.object,\n style: PropTypes.object,\n isActive: PropTypes.func,\n \"aria-current\": PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\nexport default NavLink;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/NavLink.js\n// module id = 60\n// module chunks = 0","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/node_modules/isarray/index.js\n// module id = 61\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Prompt from \"react-router/es/Prompt\";\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Prompt.js\n// module id = 62\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n when: PropTypes.bool,\n message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n block: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Prompt.js\n// module id = 63\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Redirect from \"react-router/es/Redirect\";\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Redirect.js\n// module id = 64\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = createLocation(prevProps.to);\n var nextTo = createLocation(this.props.to);\n\n if (locationsAreEqual(prevTo, nextTo)) {\n warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return generatePath(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n computedMatch: PropTypes.object, // private, from \n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired\n }).isRequired,\n staticContext: PropTypes.object\n }).isRequired\n};\n\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Redirect.js\n// module id = 65\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport StaticRouter from \"react-router/es/StaticRouter\";\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/StaticRouter.js\n// module id = 66\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n invariant(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return React.createElement(Router, _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object.isRequired,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/StaticRouter.js\n// module id = 67\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Switch from \"react-router/es/Switch\";\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Switch.js\n// module id = 68\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n React.Children.forEach(children, function (element) {\n if (match == null && React.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n router: PropTypes.shape({\n route: PropTypes.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n};\n\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Switch.js\n// module id = 69\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport generatePath from \"react-router/es/generatePath\";\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/generatePath.js\n// module id = 70\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport matchPath from \"react-router/es/matchPath\";\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/matchPath.js\n// module id = 71\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport withRouter from \"react-router/es/withRouter\";\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/withRouter.js\n// module id = 72\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: PropTypes.func\n };\n\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/withRouter.js\n// module id = 73\n// module chunks = 0","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\n// module id = 74\n// module chunks = 0","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport { Route, Switch, Link} from 'react-router-dom'\nimport Draw from './Draw'\n\nclass App extends Component {\n\n render() {\n return (\n
\n
\n

\n VMT Vessel Measuring Tool\n

\n\n About\n
\n\n \n\n \n\n {/* This switch handle 404 pages */}\n \n \n \n \n \n\n
\n );\n }\n}\n\nclass About extends Component{\n render(){\n return (\n
\n

About

\n

What is this?

\n

This is a simple webapp written in javascript using ReactJs Framework.\n It can be used to digitize archeological drawings of vessels in order to calculate their capacity and weight.\n

\n

How does it work?

\n

You can watch this youtube video that show how to use this app. If you have problems you can contact me or open an issue on github.

\n

\n

\n

Saving

\n

After you have digitized your drawing you can download your file in three differents formats:

\n
\n\n

Source code

\n

This is an open source project you can find the source code at this link\n on Github.\n You can download and use this webapp even without an internet connection, after you've downloded the source code\n you can open the index.html file in the build folder with any modern browser and start measuring\n your vessels.\n

\n\n

Alternatives

\n

\n There are many other projects that calculate vessel capacity, it this projects doesn't work for you you should\n check them out. You can find a list at\n this link.\n

\n\n

Limitations

\n

\n Although this webapp displays nicely on different devices, drawing capacity is currently available only using a mouse.\n

\n\n

Dependencies

\n

This app has been built using these javascript libraries:

\n \n

Back to main page

\n
\n )\n }\n}\n\nclass NoMatch extends Component{\n render(){\n return (\n
\n

404 - Not found

\n

Page not found

\n\n

Back to main page

\n
\n )\n }\n}\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.js","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport Polyline from './svg_classes/Polyline'\nimport Point from './svg_classes/Point'\nimport ListPoly from './components/listPoly'\nimport Notification from './components/Notification'\nimport Steps from './components/Steps'\nimport Measures from './components/Measures'\nimport { calc_vol, calcScale, join2Polylines, innerProfileToPolygon,\n create_polygon, recreate_snapping_points } from './calc_functions'\nconst svgPanZoom = require('svg-pan-zoom')\nconst download = require(\"downloadjs\")\n\nclass Draw extends Component {\n constructor(props){\n super(props)\n this.breakLine = this.breakLine.bind(this)\n this.exitBreakLineMode = this.exitBreakLineMode.bind(this)\n this.addRotAxis = this.addRotAxis.bind(this)\n this.addMetric = this.addMetric.bind(this)\n this.addMaxFill = this.addMaxFill.bind(this)\n this.resizeSvg = this.resizeSvg.bind(this)\n this.unselect_polyline = this.unselect_polyline.bind(this)\n }\n state = {\n polylines: [],\n active_polyline: undefined,\n selectedFile: '',\n img_w: 1000,\n img_h: 1000,\n notification:{id:-1,message:''},\n toDo:{image:false, rotAxis:false, metric:false,\n int_prof:false, out_prof:false, ref_unit:false, maxFill:false}\n }\n id = 0\n not_id = 0\n\n componentDidMount(){\n //init canvas\n this.canvas = document.getElementById('canvas')\n //initialize x,y needed to calculate svg coordinate in get_point()\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point = new Point([0,0], this.canvas, this.x, this.y, 1, true)\n window.addEventListener('resize', this.resizeSvg)\n\n //global vars\n window.snapping_points = []\n window.zoom = 1\n window.r_axis = null\n window.addEventListener('keyup', this.unselect_polyline)\n\n //init zoom canvas\n this.panZoomTiger = svgPanZoom('#drawing-canvas', {\n dblClickZoomEnabled: false,\n panEnabled: true,\n zoomScaleSensitivity: 0.8,\n maxZoom: 50,\n minZoom: 0.1,\n\n onZoom: function(e){\n window.zoom = e\n this.state.polylines.forEach(function(poly){\n poly.zoom = e\n poly.setSize( e )\n\n poly.points.forEach(function(point){\n point.setSize( e )\n })\n poly.midpoints.forEach(function(point){\n point.setSize( e )\n })\n })\n if(this.metric){\n this.metric.zoom = e\n this.metric.setSize( e )\n }\n if(this.rotAxis){\n this.rotAxis.zoom = e\n this.rotAxis.setSize( e )\n }\n if(this.maxFill){\n this.maxFill.zoom = e\n this.maxFill.setSize( e )\n }\n this.new_point.zoom = e\n this.new_point.setSize( e )\n }.bind(this)\n });\n }\n\n componentWillUnmount(){\n window.removeEventListener('resize', this.resizeSvg)\n window.removeEventListener('keyup', this.unselect_polyline)\n }\n\n resizeSvg(){\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point.x = this.x\n this.new_point.y = this.y\n this.state.polylines.forEach(function(el){\n el.y = this.y\n el.x = this.x\n }.bind(this))\n if(this.state.active_polyline){\n let a_p = this.state.active_polyline\n a_p.x = this.x\n a_p.y = this.y\n this.setState({active_polyline:a_p})\n this.state.active_polyline.points.forEach(function(p){\n p.x = this.x\n p.y = this.y\n }.bind(this))\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // CREATE, SELECT, DESELECT POLYLINE //\n //////////////////////////////////////////////////////////////////////////////\n\n create_new_polyline(type = \"other\"){\n this.globalStopEditingMode()\n\n this.addCursorPoint()\n const new_polylines = this.state.polylines\n const polyline = new Polyline({\n points: [],\n id: this.id,\n type: type,\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n new_polylines.push( polyline )\n this.id++\n this.setState(\n { polylines: new_polylines,\n active_polyline: polyline\n }\n )\n }\n\n selectLayer(id){\n if(this.state.active_polyline){\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code:\"Escape\"})\n }\n }\n this.setState({active_polyline: this.getPolylineById(id)},\n ()=> {\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n });\n this.state.active_polyline.el.classList.toggle('active')\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // UTILITIES //\n //////////////////////////////////////////////////////////////////////////////\n\n unselect_polyline(e){\n console.log(e.code)\n if( e.code === 'Escape' || e.code === 'KeyQ'){\n if(this.state.active_polyline){\n this.state.active_polyline.el.classList.remove('active')\n this.state.active_polyline.stopEditing({'code':'Escape'})\n if(this.state.active_polyline.editing){\n this.state.active_polyline.stopEditingPoints({'code':'Escape'})\n }\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code: 'Escape'})\n }\n }\n this.setState({active_polyline:undefined})\n recreate_snapping_points(this.state.polylines)\n\n this.checkProfile('int_prof')\n this.checkProfile('out_prof')\n if(this.new_point.added){\n this.removeCursorPoint()\n }\n //remove 0 or 1 vertex polyline\n this.state.polylines.forEach(function(polyline){\n if(polyline.points.length < 2){\n this.setState({polylines: this.state.polylines.filter(el => el.id !== polyline.id)})\n this.canvas.removeChild(polyline.el)\n }\n }.bind(this))\n }\n }\n\n globalStopEditingMode(){\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n })\n if(this.state.active_polyline){\n this.state.active_polyline.stopEditing({'code':'Escape'})\n }\n }\n\n addNotification(message){\n this.setState({notification:{ id:this.not_id, message: message }})\n this.not_id++\n }\n\n getPolylineById(id){\n return this.state.polylines.filter(el => el.id === id)[0]\n }\n\n addCursorPoint(){\n this.canvas.appendChild(this.new_point.el)\n this.new_point.added = true\n this.new_point.select()\n }\n\n removeCursorPoint(){\n this.canvas.removeChild(this.new_point.el)\n this.new_point.added = false\n }\n\n updateToDo(type, value){\n let toDo = this.state.toDo\n toDo[type] = value\n this.setState({toDo})\n }\n\n checkProfile(type){\n const poly1 = this.state.polylines.filter(el => el.type===type)\n if(poly1.length===0){\n this.updateToDo(type, false)\n if(type==='int_prof'){\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n this.inner_poly = null\n this.setState({vessel_capacity:null})\n }\n }\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n this.vessel_poly = null\n this.setState({vessel_volume:null})\n }\n }\n else if(poly1.length===1){\n this.updateToDo(type, true)\n }\n else{\n this.updateToDo(type, false)\n let profile = type === 'int_prof' ? 'internal profile' : 'outer profile'\n this.addNotification(`There should be only one ${profile}`)\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // JOIN POLYLINES //\n //////////////////////////////////////////////////////////////////////////////\n\n joinIntExt(){\n const poly1 = this.state.polylines.filter(el => el.type==='int_prof')[0]\n const poly2 = this.state.polylines.filter(el => el.type==='out_prof')[0]\n if(!poly1 || !poly2){\n this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\")\n return\n }\n this.vesselVolume = join2Polylines(poly1, poly2)\n if(!this.vesselVolume){\n this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\")\n return\n }\n\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n }\n this.vessel_poly = create_polygon(this.vesselVolume, 'rgba(170, 170, 170, 0.6)')\n const volume = calc_vol(this.vesselVolume, this.scale)\n this.setState({vessel_volume:volume})\n this.canvas.appendChild(this.vessel_poly)\n }\n\n create_inner_polygon(){\n let poly = this.state.polylines.filter(el => el.type==='int_prof')\n if(poly.length===0){\n this.addNotification(\"To calculate vessel capacity you need an internal profile\")\n return\n }\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n }\n //define inner polygon points based on inner profile and rotation axis\n this.innerPolygon = innerProfileToPolygon(poly[0].points.slice())\n //create svg polygon\n this.inner_poly = create_polygon(this.innerPolygon, 'rgba(210, 204, 78, 0.28)')\n\n if(this.scale){\n const volume = calc_vol(this.innerPolygon, this.scale)\n this.setState({vessel_capacity:volume})\n }else{\n this.addNotification('Can\\'t measure, define scale first')\n }\n this.canvas.appendChild(this.inner_poly)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // ADD REFERENCE SCALE rotation axis AND MAX FILL //\n //////////////////////////////////////////////////////////////////////////////\n\n metricForm(obj){\n if(obj.ref_unit){\n this.updateToDo('ref_unit', true)\n this.setState({metric_value:obj.value, metric_unit: obj.unit}, () => {\n if(this.metric && this.metric.points.length===2){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n }\n })\n }else{\n this.updateToDo('ref_unit', false)\n this.scale = null\n }\n }\n\n defineMaxFill(){\n //remove maxFill if present\n if(this.maxFill){\n this.canvas.removeChild(this.maxFill.el)\n this.updateToDo('maxFill', false)\n }\n //create new maxFill polyline\n this.maxFill = new Polyline({\n points: [],\n id: 'max_fill',\n type: 'max_fill',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({code:'Escape'})\n }\n\n addMaxFill(e){\n this.maxFill.stroke = 'rgb(0, 255, 21)'\n this.maxFill.add_point(e)\n this.canvas.appendChild(this.maxFill.el)\n this.maxFill.draw()\n //exit editing mode\n this.maxFill.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.maxFill = this.maxFill.points[0].cy\n this.updateToDo('maxFill', true)\n }\n\n defineMetric(){\n this.unselect_polyline({code:\"Escape\"})\n //remove metric if present\n if(this.metric){\n this.canvas.removeChild(this.metric.el)\n this.updateToDo('metric', false)\n }\n //create new metric polyline\n this.metric = new Polyline({\n points: [],\n id: 'metric',\n type: 'metric',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMetric)\n this.metric.stopEditing({code:'Escape'})\n }\n\n addMetric(e){\n if(this.metric.points.length === 0){\n this.metric.add_point(e)\n }\n else if(this.metric.points.length === 1){\n //this is the 2nd point, add it and exit editing\n this.metric.add_point(e)\n this.metric.stroke = 'red'\n this.metric.stopEditing({code:\"Escape\"})\n //set color\n this.metric.el.classList.remove('active')\n //stop editing\n this.canvas.removeEventListener('dblclick', this.addMetric)\n this.updateToDo('metric', true)\n this.removeCursorPoint()\n if(this.state.metric_value && this.state.metric_unit){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n }\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n\n }\n }\n\n definerotAxis(){\n //remove if already present\n if(this.rotAxis){\n this.canvas.removeChild(this.rotAxis.el)\n window.r_axis = null\n this.updateToDo('rotAxis', false)\n }\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addRotAxis)\n }\n\n addRotAxis(e){\n //create rotation axis polyline\n this.rotAxis = new Polyline({\n points: [],\n id: this.id,\n type: 'center',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n this.rotAxis.stroke = '#ff5a00'\n this.rotAxis.add_point(e)\n this.canvas.appendChild(this.rotAxis.el)\n this.rotAxis.draw()\n //exit editing mode\n this.rotAxis.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addRotAxis)\n this.rotAxis.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.r_axis = this.rotAxis.points[0].cx\n this.updateToDo('rotAxis', true)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER EDITING //\n //////////////////////////////////////////////////////////////////////////////\n\n colorChange(id, color){\n const my_polyline = this.getPolylineById(id)\n my_polyline.stroke = color\n my_polyline.draw()\n }\n\n typeChange(id, type){\n this.setState(\n {polylines: this.state.polylines.map(el =>\n {\n if(el.id===id){\n el.type = type\n return el\n }\n return el\n })\n }, ()=> { this.checkProfile('int_prof'); this.checkProfile('out_prof') }\n )\n }\n\n delete_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.canvas.removeChild(this.state.active_polyline.el)\n this.setState({\n polylines:this.state.polylines.filter(\n el => el.id !== this.state.active_polyline.id),\n active_polyline: undefined\n }, ()=> {\n this.checkProfile('int_prof');\n this.checkProfile('out_prof');\n recreate_snapping_points(this.state.polylines)\n }\n )\n }\n\n edit_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.state.active_polyline.editLine()\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER BREAKING //\n //////////////////////////////////////////////////////////////////////////////\n\n enterBreakLineMode(){\n this.globalStopEditingMode()\n //check if breaking selected line is possible\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n if(this.state.active_polyline.points.length <= 2){\n this.addNotification(\"Line has two or less vertices and can't be subdivided\")\n return\n }\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = true\n this.setState({active_polyline})\n //add breaking points to canvas\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!==this.state.active_polyline.points.length-1){\n this.canvas.appendChild(point.el)\n point.draw()\n point.el.addEventListener('click', this.breakLine)\n }\n x++\n }.bind(this))\n }\n\n exitBreakLineMode(e){\n //remove breaking points from canvas\n if ((e.code === 'Escape' || e.code === 'KeyQ') && this.state.active_polyline.breaking_mode) {\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!== this.state.active_polyline.points.length-1){\n point.el.removeEventListener('click', this.breakLine)\n this.canvas.removeChild(point.el)\n }\n x++\n }.bind(this))\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = false\n this.setState({active_polyline})\n }\n }\n\n breakLine(e){\n const break_point = [e.target.getAttribute('cx'), e.target.getAttribute('cy')]\n this.exitBreakLineMode({code: 'Escape'})\n //instantiate polyline list to edit\n const new_polylines = this.state.polylines\n //create a new polyline\n let polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n }\n )\n //loop over the polyine to break and add point to new polyline until you get to the breaking point\n this.state.active_polyline.points.forEach(function(point) {\n polyline.appendPoint([point.cx, point.cy])\n if(point.cx===parseFloat(break_point[0]) && point.cy===parseFloat(break_point[1])){\n //save draw and exit editing mode\n polyline.el.classList.remove('active')\n new_polylines.push( polyline )\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //create a new polyline with starting point the breaking point\n polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n polyline.appendPoint([point.cx, point.cy])\n }\n }.bind(this))\n //save draw and exit editing mode for sencond line\n new_polylines.push(polyline)\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //delete orignal broken line and exit editing mode\n this.state.active_polyline.stopEditing({'code':'Escape'})\n this.canvas.removeChild(this.state.active_polyline.el)\n //update the state with the two new lines without the old one\n this.setState(\n { polylines: new_polylines.filter(el=>el.id!==this.state.active_polyline.id),\n active_polyline: polyline\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // HANDLE IMAGE //\n //////////////////////////////////////////////////////////////////////////////\n\n image_rotate(e){\n this.bck_image.style.transform = `rotate(${e.target.value}deg)`\n }\n\n fileChangedHandler(e){\n let img_name = e.target.value.split(\"\\\\\")\n img_name = img_name[img_name.length-1]\n this.setState({img_name})\n var img = new Image();\n img.src = window.URL.createObjectURL( e.target.files[0] );\n img.onload = function() {\n var width = img.naturalWidth\n var height = img.naturalHeight\n let toDo = this.state.toDo\n toDo.image = true\n this.setState({\n img_w:width,\n img_h:height,\n selectedFile: img.src,\n toDo: toDo\n })\n }.bind(this)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // DOWNLOAD //\n //////////////////////////////////////////////////////////////////////////////\n\n download_svg(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n let saved_path = this.state.selectedFile\n if(this.state.img_name){\n this.setState({selectedFile:this.state.img_name.replace('href':'xlink:href')}, ()=> {\n download(this.svg.outerHTML, \"dlText.svg\", \"text/plain\");\n this.setState({selectedFile:saved_path})\n })\n }else{\n download(this.svg.outerHTML, \"myVessel.svg\", \"text/plain\");\n }\n }\n\n download_dxf(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n var makerjs = require('makerjs');\n let models = {models:{}}\n let x = 1\n this.state.polylines.forEach(function(polyline){\n let points = polyline.el.getAttribute('points');\n let closed = false; //true for SVG polygon, false for SVG polyline\n let model = makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed, points), false, true);\n model = makerjs.model.scale(model, this.scale/10)\n models.models[`my-${x}-line`] = model\n x++\n }.bind(this))\n models.units = makerjs.units.Meter;\n let file = makerjs.exporter.toDXF(models, {units:makerjs.unitType.Meter})\n download(file, \"myVessel.dxf\", \"text/plain\");\n }\n\n download_json(){\n let title = 'myVessel'\n let coordinates, author, description = ''\n\n let int_prof = this.state.polylines.filter(el=>el.type==='int_prof')\n if(int_prof.length > 0){\n int_prof = int_prof[0]\n }else{\n this.addNotification('No inner profile to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n coordinates = []\n int_prof.points.forEach(function(point){\n // scale the point - unit will be dm - convert to cm - invert y axis\n coordinates.push( [point.cx*this.scale/10, point.cy*this.scale/10*-1] )\n }.bind(this))\n coordinates = JSON.stringify(coordinates)\n let json = `{ \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": ${coordinates}\n },\n \"properties\": {\n \"title\": \"${title}\",\n \"description\": \"${description}\",\n \"author\": \"${author}\"\n }\n }`\n this.addNotification('Export completed')\n download(json, `${title}.json`, \"text/plain\");\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // RENDER //\n //////////////////////////////////////////////////////////////////////////////\n\n render() {\n return (\n
\n\n \n\n

Draw

\n
\n {this.svg = svg}}>\n \n {this.bck_image=bck_image}}\n id=\"bck-img\" href={this.state.selectedFile} x=\"0\" y=\"0\"\n height={this.state.img_h} width={this.state.img_w}/>\n \n \n
\n
Actions:
\n \n New\n
\n \n Break\n
\n \n Delete\n \n \n Edit\n \n\n
Export:
\n \n SVG\n \n \n DXF\n \n \n JSON\n \n \n \n\n
\n
Layers:
\n {this.state.toDo.image &&
\n
\n \n \n
\n
}\n {this.state.polylines.map(el =>\n \n )}\n
\n
\n Double-left-click to draw a point, single left-click and hold to pan the view,\n single left-click to select vertices (in edit and break mode),\n mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line.\n Press Esc or q to quit editing mode and deselect.\n
\n \n\n \n\n \n );\n }\n }\n\n export default Draw;\n\n //get point coordinates from event\n //get_point(e){\n // const matrix = this.canvas.transform.baseVal[0].matrix\n // const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n // return newPoint\n //}\n //\n //\n //\n //joinTwoPolylines(poly1, poly2){\n // const new_poly = join2Polylines(poly1, poly2)\n //\n // if(!new_poly){\n // this.addNotification(\"Not joinable\")\n // return\n // }\n // return joined_poly\n //\n // //const joined_poly = new Polyline({\n // // points: cleanedPoly(new_poly),\n // // id: this.id,\n // // type: poly1.type,\n // // selected: true,\n // // canvas: this.canvas,\n // // offsetX: this.x,\n // // offsetY: this.y,\n // // currentZoom: this.panZoomTiger.getZoom()\n // //})\n // //joined_poly.stopEditing({code:'Escape'})\n // //this.canvas.removeChild(joined_poly.el)\n // //this.id++\n //\n // //this.canvas.removeChild(poly1.el)\n // //this.canvas.removeChild(poly2.el)\n // //this.canvas.appendChild(joined_poly.el)\n // //joined_poly.draw()\n ////\n // //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n // //new_polylines.push(joined_poly)\n // //this.addNotification(message)\n // //this.setState(\n // // { polylines: new_polylines,\n // // notification:{ id:this.not_id, message: message },\n // // active_polyline: joined_poly\n // // }\n // //)\n // //this.not_id++\n //}\n //joinTwoLines(){\n // //TODO\n // this.addNotification(\"Select first line\")\n //}\n //\n // Join 2 lines\n //\n\n\n\n// WEBPACK FOOTER //\n// ./src/Draw.js","import Point from './Point'\nimport MidPoint from './MidPoint'\nimport {cleanedPoly} from './../calc_functions'\n\nexport default class Poly {\n\n constructor(obj) {\n this.points = obj.points\n this.fill = 'none'\n this.stroke = 'magenta'\n this.base_size = 5\n this.id = obj.id\n this.type = obj.type\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n this.el.classList.add('active')\n this.canvas = obj.canvas\n\n this.x = obj.offsetX\n this.y = obj.offsetY\n\n this.zoom = obj.currentZoom\n this.setSize(this.zoom)\n\n this.canvas.appendChild(this.el)\n\n this.draw = this.draw.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.stopEditingPoints = this.stopEditingPoints.bind(this)\n this.get_point = this.get_point.bind(this)\n this.previewPoint = this.previewPoint.bind(this)\n this.create = this.create.bind(this)\n this.add_point = this.add_point.bind(this)\n\n this.canvas.addEventListener('dblclick', this.add_point)\n\n this.editing = false\n this.breaking_mode = false\n\n this.midpoints = []\n }\n\n setSize(zoom){\n this.strokeWidth = this.base_size/zoom\n this.draw()\n }\n draw() {\n this.el.setAttribute('points', this.pointsTo())\n this.el.id = this.id\n this.el.style.fill = this.fill\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n if (this.editing) {\n this.draw_midpoints()\n }\n }\n\n draw_midpoints() {\n //remove from canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n //recreate midpoints\n let index = 0\n this.points.forEach(function(point) {\n if (index > 0 && this.points.length > index) {\n if(point.cx !== this.points[index - 1].cx && point.cy !== this.points[index - 1].cy){\n const midpoint = new MidPoint(\n [ (point.cx + this.points[index - 1].cx) / 2,\n (point.cy + this.points[index - 1].cy) / 2 ],\n index, this.zoom)\n this.midpoints.push(midpoint)\n }\n }\n index++\n }.bind(this))\n //add midpoints to canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.appendChild(midpoint.el)\n midpoint.draw()\n midpoint.el.addEventListener('click', this.create)\n }.bind(this))\n }\n\n create(e) {\n const index = e.target.getAttribute('index')\n const new_point = new Point( [parseFloat(e.target.getAttribute('cx')), parseFloat(e.target.getAttribute('cy'))],\n this.canvas, this.x, this.y, this.zoom\n )\n this.addPointInMiddle(index, new_point)\n }\n\n addPointInMiddle(index, new_point) {\n this.points.splice(index, 0, new_point)\n this.canvas.appendChild(new_point.el)\n new_point.draw()\n new_point.edit()\n new_point.select()\n this.draw()\n }\n\n pointsTo() {\n let str = ''\n this.points.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n return str\n }\n\n //add point\n add_point(e){\n let new_point = this.get_point(e)\n if(this.type==='max_fill'){\n let point = [-1000000, new_point[1]]\n this.appendPoint(point)\n point = [1000000, new_point[1]]\n this.appendPoint(point)\n return\n }\n if(this.type==='center'){\n let point = [new_point[0], -1000000]\n this.appendPoint(point)\n point = [new_point[0], 1000000]\n this.appendPoint(point)\n return\n }\n\n this.appendPoint(new_point)\n }\n\n appendPoint(array) {\n window.snapping_points.push([array[0], array[1]])\n const point = new Point([array[0], array[1]], this.canvas, this.x, this.y, this.zoom)\n this.points.push(point)\n this.draw()\n if (this.points.length === 1) {\n window.addEventListener('mousemove', this.previewPoint)\n window.addEventListener('keyup', this.stopEditing)\n }\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n\n }\n\n previewPoint(e) {\n const new_point = this.get_point(e)\n this.points.push(new Point([new_point[0], new_point[1]], this.canvas, this.x, this.y, this.zoom))\n this.draw()\n this.removeLastPoint()\n }\n\n editLine() {\n this.editing = true\n window.addEventListener('keyup', this.stopEditingPoints)\n this.points.forEach(function(point) {\n point.x = this.x\n point.y = this.y\n this.canvas.appendChild(point.el)\n point.draw()\n point.edit()\n }.bind(this))\n this.draw_midpoints()\n window.addEventListener('mousemove', this.draw)\n }\n\n stopEditingPoints(e) {\n this.editing = false\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n window.removeEventListener('mousemove', this.draw)\n }\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n this.points.forEach(function(point) {\n this.canvas.removeChild(point.el)\n point.clear()\n }.bind(this))\n this.points = cleanedPoly(this.points)\n this.draw()\n window.removeEventListener('keyup', this.stopEditingPoints)\n }\n\n removeLastPoint() {\n this.points.pop()\n }\n\n stopEditing(e) {\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n this.canvas.removeEventListener('dblclick', this.add_point)\n window.removeEventListener('mousemove', this.previewPoint)\n window.removeEventListener('keyup', this.stopEditing)\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Polyline.js","export default class MidPoint {\n\n constructor(points, index, zoom) {\n this.cx = points[0]\n this.cy = points[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n this.strokeWidth = '2'\n this.index = index\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n this.zoom = zoom\n\n this.base_size = 17\n this.size = this.base_size / zoom\n this.base_stroke = 5\n this.strokeWidth = this.base_stroke / zoom\n\n }\n\n setSize(zoom) {\n this.zoom = zoom\n this.strokeWidth = this.base_stroke / zoom\n this.size = this.base_size / zoom\n this.draw()\n }\n\n draw() {\n this.el.setAttribute('x', this.cx - (this.size/2))\n this.el.setAttribute('y', this.cy - (this.size/2))\n this.el.setAttribute('cx', this.cx)\n this.el.setAttribute('cy', this.cy)\n this.el.setAttribute('height', this.size)\n this.el.setAttribute('width', this.size)\n this.el.setAttribute('index', this.index)\n this.el.style.fill = this.fill\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.stroke = this.stroke\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/MidPoint.js","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/area.js\n// module id = 81\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/centroid.js\n// module id = 82\n// module chunks = 0","import cross from \"./cross\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/hull.js\n// module id = 83\n// module chunks = 0","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/cross.js\n// module id = 84\n// module chunks = 0","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/contains.js\n// module id = 85\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/length.js\n// module id = 86\n// module chunks = 0","import React, { Component } from 'react';\n\nexport default class ListPoly extends Component {\n state = {\n types : [\n {val: 'other', text: 'Other'},\n {val: 'int_prof', text: 'Inner profile'},\n {val: 'out_prof', text: 'Outer profile'},\n {val: 'handle', text: 'Handle'},\n ],\n colors : [\n {val: 'magenta', text: 'Magenta'},\n {val: '#1d47ff', text: 'Blue'},\n {val: '#ff3b30', text: 'Red'},\n {val: '#4bea4b', text: 'Green'},\n {val: 'black', text: 'Black'},\n {val: 'white', text: 'White'},\n ]\n }\n\n colorChange(e){\n this.props.colorChange(this.props.id, e.target.value)\n this.color.value = e.target.value\n }\n\n typeChange(e){\n this.props.typeChange(this.props.id, e.target.value)\n this.type.value = e.target.value\n }\n\n render(){\n return (\n this.props.selectLayer(this.props.id)}\n >\n
\n \n
\n
\n \n
\n
\n \n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/listPoly.js","import React, { Component } from 'react';\n\nexport default class Notification extends Component {\n state = {\n id: -1\n }\n componentWillReceiveProps(nextProps){\n if(nextProps.notification.id!==this.state.id){\n this.setState({id:nextProps.notification.id})\n this.notification.innerHTML = nextProps.notification.message\n this.notification.style.display = \"block\"\n setTimeout(()=>this.notification.style.display=\"none\", 1500)\n }\n }\n render(){\n return (\n
this.notification=notification}>
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Notification.js","import React, { Component } from 'react';\n\nexport default class Steps extends Component {\n metricForm(){\n const value = this.ref_val.value\n const unit = this.reference_unit.value\n if(value&&unit){\n this.props.handleForm({ref_unit: true, value:value, unit:unit})\n }else{\n this.props.handleForm({ref_unit: false, value:value, unit:unit})\n }\n }\n\n render(){\n return (\n
\n

Steps:

\n
    \n
  • \n
    \n
    \n
    \n 1. Select image\n
    \n
    \n \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 2. Draw rotation axis\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 3. Draw reference scale\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 4. Define reference scale length\n
    \n
    \n {this.ref_val = ref_val}}>\n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 5. Draw inner profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 6. Draw outer profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 7- Draw max fill limit\n
    \n
    \n \n
    \n
  • \n
\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Steps.js","import React, { Component } from 'react';\n\nexport default class Measures extends Component {\n state = {\n vessel_weight: 0,\n total_weight: 0,\n\n vessel_volume: 0,\n vessel_unit: 1,\n vessel_specific_weight: 2,\n\n content_specific_weight: 1,\n content_volume: 0,\n }\n\n componentWillReceiveProps(nProp){\n this.setState({content_volume:nProp.content_volume, vessel_volume:nProp.vessel_volume}, () => this.vesselWeightCalc())\n }\n\n vesselWeightCalc(){\n this.setState({ vessel_weight: this.state.vessel_unit * this.state.vessel_specific_weight * this.state.vessel_volume}, () => {\n this.contentWeightCalc()\n })\n }\n\n contentWeightCalc(){\n this.setState(\n { total_weight: this.state.vessel_weight + (this.state.content_volume * this.state.content_specific_weight)}\n )\n }\n\n contentWeightSetter(e){\n this.setState({content_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselUnitSetter(e){\n this.setState({vessel_unit:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselSpecWeightSetter(e){\n this.setState({vessel_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n render(){\n return (\n
\n

Measures:

\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n

Volume

\n }\n
\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n
\n \n Calculate capacity\n
\n\n { this.props.content_volume &&\n
\n Volume: {this.props.content_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n
\n }\n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n
\n \n Calculate vessel volume\n
\n\n { this.props.vessel_volume &&\n
\n Volume: {this.props.vessel_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n \n }\n \n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n this.props.vessel_volume && this.props.content_volume &&\n
\n

Weight

\n
\n

Insert specfic weight of vessel's material to calculate vessel weight:

\n \n \n
Vessel weight:\n {this.state.vessel_weight.toFixed(2)}\n Kg\n
\n
\n
\n

Insert type of content to calculate full weight:

\n \n
Full weight:\n {this.state.total_weight.toFixed(2)}\n Kg\n
\n
\n\n
\n }\n { (!this.props.toDo.int_prof || !this.props.toDo.ref_unit\n || !this.props.toDo.metric) &&\n
\n

No calculations available, follow the steps listed on the left

\n
\n }\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Measures.js","var SvgPanZoom = require('./svg-pan-zoom.js');\n\nmodule.exports = SvgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/browserify.js\n// module id = 91\n// module chunks = 0","var Wheel = require('./uniwheel')\n, ControlIcons = require('./control-icons')\n, Utils = require('./utilities')\n, SvgUtils = require('./svg-utilities')\n, ShadowViewport = require('./shadow-viewport')\n\nvar SvgPanZoom = function(svg, options) {\n this.init(svg, options)\n}\n\nvar optionsDefaults = {\n viewportSelector: '.svg-pan-zoom_viewport' // Viewport selector. Can be querySelector string or SVGElement\n, panEnabled: true // enable or disable panning (default enabled)\n, controlIconsEnabled: false // insert icons to give user an option in addition to mouse events to control pan/zoom (default disabled)\n, zoomEnabled: true // enable or disable zooming (default enabled)\n, dblClickZoomEnabled: true // enable or disable zooming by double clicking (default enabled)\n, mouseWheelZoomEnabled: true // enable or disable zooming by mouse wheel (default enabled)\n, preventMouseEventsDefault: true // enable or disable preventDefault for mouse events\n, zoomScaleSensitivity: 0.1 // Zoom sensitivity\n, minZoom: 0.5 // Minimum Zoom level\n, maxZoom: 10 // Maximum Zoom level\n, fit: true // enable or disable viewport fit in SVG (default true)\n, contain: false // enable or disable viewport contain the svg (default false)\n, center: true // enable or disable viewport centering in SVG (default true)\n, refreshRate: 'auto' // Maximum number of frames per second (altering SVG's viewport)\n, beforeZoom: null\n, onZoom: null\n, beforePan: null\n, onPan: null\n, customEventsHandler: null\n, eventsListenerElement: null\n, onUpdatedCTM: null\n}\n\nSvgPanZoom.prototype.init = function(svg, options) {\n var that = this\n\n this.svg = svg\n this.defs = svg.querySelector('defs')\n\n // Add default attributes to SVG\n SvgUtils.setupSvgAttributes(this.svg)\n\n // Set options\n this.options = Utils.extend(Utils.extend({}, optionsDefaults), options)\n\n // Set default state\n this.state = 'none'\n\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Init shadow viewport\n this.viewport = ShadowViewport(SvgUtils.getOrCreateViewport(this.svg, this.options.viewportSelector), {\n svg: this.svg\n , width: this.width\n , height: this.height\n , fit: this.options.fit\n , contain: this.options.contain\n , center: this.options.center\n , refreshRate: this.options.refreshRate\n // Put callbacks into functions as they can change through time\n , beforeZoom: function(oldScale, newScale) {\n if (that.viewport && that.options.beforeZoom) {return that.options.beforeZoom(oldScale, newScale)}\n }\n , onZoom: function(scale) {\n if (that.viewport && that.options.onZoom) {return that.options.onZoom(scale)}\n }\n , beforePan: function(oldPoint, newPoint) {\n if (that.viewport && that.options.beforePan) {return that.options.beforePan(oldPoint, newPoint)}\n }\n , onPan: function(point) {\n if (that.viewport && that.options.onPan) {return that.options.onPan(point)}\n }\n , onUpdatedCTM: function(ctm) {\n if (that.viewport && that.options.onUpdatedCTM) {return that.options.onUpdatedCTM(ctm)}\n }\n })\n\n // Wrap callbacks into public API context\n var publicInstance = this.getPublicInstance()\n publicInstance.setBeforeZoom(this.options.beforeZoom)\n publicInstance.setOnZoom(this.options.onZoom)\n publicInstance.setBeforePan(this.options.beforePan)\n publicInstance.setOnPan(this.options.onPan)\n publicInstance.setOnUpdatedCTM(this.options.onUpdatedCTM)\n\n if (this.options.controlIconsEnabled) {\n ControlIcons.enable(this)\n }\n\n // Init events handlers\n this.lastMouseWheelEventTime = Date.now()\n this.setupHandlers()\n}\n\n/**\n * Register event handlers\n */\nSvgPanZoom.prototype.setupHandlers = function() {\n var that = this\n , prevEvt = null // use for touchstart event to detect double tap\n ;\n\n this.eventListeners = {\n // Mouse down group\n mousedown: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n , touchstart: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n\n // Mouse up group\n , mouseup: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchend: function(evt) {\n return that.handleMouseUp(evt);\n }\n\n // Mouse move group\n , mousemove: function(evt) {\n return that.handleMouseMove(evt);\n }\n , touchmove: function(evt) {\n return that.handleMouseMove(evt);\n }\n\n // Mouse leave group\n , mouseleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchcancel: function(evt) {\n return that.handleMouseUp(evt);\n }\n }\n\n // Init custom events handler if available\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.init({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n\n // Custom event handler may halt builtin listeners\n var haltEventListeners = this.options.customEventsHandler.haltEventListeners\n if (haltEventListeners && haltEventListeners.length) {\n for (var i = haltEventListeners.length - 1; i >= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-pan-zoom.js\n// module id = 92\n// module chunks = 0","// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/uniwheel.js\n// module id = 93\n// module chunks = 0","var SvgUtils = require('./svg-utilities');\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/control-icons.js\n// module id = 94\n// module chunks = 0","var SvgUtils = require('./svg-utilities')\n , Utils = require('./utilities')\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/shadow-viewport.js\n// module id = 95\n// module chunks = 0","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = require('clone');\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = require('kdbush');\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = require('graham_scan');\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = require('bezier-js');\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/makerjs/dist/index.js\n// module id = 97\n// module chunks = 0","var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/clone/clone.js\n// module id = 98\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buffer/index.js\n// module id = 99\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/base64-js/index.js\n// module id = 100\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ieee754/index.js\n// module id = 101\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/isarray/index.js\n// module id = 102\n// module chunks = 0","\nimport sort from './sort';\nimport range from './range';\nimport within from './within';\n\nexport default function kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/index.js\n// module id = 103\n// module chunks = 0","\nexport default function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/sort.js\n// module id = 104\n// module chunks = 0","\nexport default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/range.js\n// module id = 105\n// module chunks = 0","\nexport default function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/within.js\n// module id = 106\n// module chunks = 0","/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==typeof define&&define.amd&&define(function(){return ConvexHullGrahamScan}),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/graham_scan/graham_scan.min.js\n// module id = 107\n// module chunks = 0","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 108\n// module chunks = 0","module.exports = require('./lib/bezier');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/index.js\n// module id = 109\n// module chunks = 0","(function() {\n \"use strict\";\n\n var utils = require(\"./utils.js\");\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/poly-bezier.js\n// module id = 110\n// module chunks = 0","var normalise = require(\"./normalise-svg.js\");\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/svg-to-beziers.js\n// module id = 111\n// module chunks = 0","/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/normalise-svg.js\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/build/static/js/main.b7eb699e.js b/build/static/js/main.b7eb699e.js new file mode 100644 index 0000000..ba0e4b8 --- /dev/null +++ b/build/static/js/main.b7eb699e.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/Vessel-Measuring-Tool/",t(t.s=33)}([function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){e.exports=n(50)()},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(52);n.d(t,"a",function(){return r.a});var i=n(55);n.d(t,"b",function(){return i.a});var o=n(56);n.d(t,"d",function(){return o.a});var a=n(7);n.d(t,"c",function(){return a.a}),n.d(t,"f",function(){return a.b});var s=n(5);n.d(t,"e",function(){return s.b})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return u});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},i=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return o(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},l=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},u=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l});var r=n(53),i=n(54),o=n(5),a=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?f.a.Children.only(e):null},t}(f.a.Component);v.propTypes={history:h.a.object.isRequired,children:h.a.node},v.contextTypes={router:h.a.object},v.childContextTypes={router:h.a.object.isRequired},t.a=v},function(e,t,n){"use strict";var r=n(25),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];var s=[],l=i()(e,s,t),u={re:l,keys:s};return a<1e4&&(r[e]=u,a++),u},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"===typeof t&&(t={path:t});var r=t,i=r.path,o=r.exact,a=void 0!==o&&o,l=r.strict,u=void 0!==l&&l,c=r.sensitive,f=void 0!==c&&c;if(null==i)return n;var p=s(i,{end:a,strict:u,sensitive:f}),h=p.re,d=p.keys,v=h.exec(e);if(!v)return null;var m=v[0],y=v.slice(1),g=e===m;return a&&!g?null:{path:i,url:"/"===i&&""===m?"/":m,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=y[n],e},{})}};t.a=l},function(e,t,n){var r=n(14),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(e){if(e.clientWidth&&e.clientHeight)return{width:e.clientWidth,height:e.clientHeight};if(e.getBoundingClientRect())return e.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(e,t){var n=null;if(!(n=r.isElement(t)?t:e.querySelector(t))){var i=Array.prototype.slice.call(e.childNodes||e.children).filter(function(e){return"defs"!==e.nodeName&&"#text"!==e.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(n=i[0])}if(!n){var o="viewport-"+(new Date).toISOString().replace(/\D/g,"");n=document.createElementNS(this.svgNS,"g"),n.setAttribute("id",o);var a=e.childNodes||e.children;if(a&&a.length>0)for(var s=a.length;s>0;s--)"defs"!==a[a.length-s].nodeName&&n.appendChild(a[a.length-s]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==e.parentNode){var t=e.getAttribute("style")||"";-1===t.toLowerCase().indexOf("overflow")&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:r.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;nt?(clearTimeout(s),s=null,l=c,o=e.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(u,f)),o}},createRequestAnimationFrame:function(e){var t=null;return"auto"!==e&&e<60&&e>1&&(t=Math.floor(1e3/e)),null===t?window.requestAnimationFrame||n(33):n(t)}}},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return y=e,g}}function o(e,t){try{return e(t)}catch(e){return y=e,g}}function a(e,t,n){try{e(t,n)}catch(e){return y=e,g}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&v(e,this)}function l(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),u(e,new d(t,n,a))})}function u(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){m(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?f(t.promise,e._18):p(t.promise,e._18));var r=o(n,e._18);r===g?p(t.promise,y):f(t.promise,r)})}function f(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===g)return p(e,y);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void h(e);if("function"===typeof n)return void v(n.bind(t),e)}e._83=1,e._18=t,h(e)}function p(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),h(e)}function h(e){if(1===e._75&&(u(e,e._38),e._38=null),2===e._75){for(var t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),l=n.n(s),u=n(1),c=n.n(u),f=n(2),p=n.n(f),h=n(4),d=Object.assign||function(e){for(var t=1;t outside a "),p()(void 0!==t,'You must specify the "to" property');var o=this.context.router.history,a="string"===typeof t?Object(h.c)(t,null,null,o.location):t,s=o.createHref(a);return l.a.createElement("a",d({},i,{onClick:this.handleClick,href:s,ref:n}))},t}(l.a.Component);m.propTypes={onClick:c.a.func,target:c.a.string,replace:c.a.bool,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired,innerRef:c.a.oneOfType([c.a.string,c.a.func])},m.defaultProps={replace:!1},m.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired,createHref:c.a.func.isRequired}).isRequired}).isRequired},t.a=m},function(e,t,n){"use strict";var r=n(24);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(2),u=n.n(l),c=n(0),f=n.n(c),p=n(1),h=n.n(p),d=n(12),v=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,c=(r||l.location).pathname;return Object(d.a)(c,{path:i,strict:o,exact:a,sensitive:s},l.match)},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),s()(!(this.props.component&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored"),s()(!(this.props.render&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,a=o.history,s=o.route,l=o.staticContext,u=this.props.location||s.location,c={match:e,location:u,history:a,staticContext:l};return r?e?f.a.createElement(r,c):null:i?e?i(c):null:"function"===typeof n?n(c):n&&!m(n)?f.a.Children.only(n):null},t}(f.a.Component);y.propTypes={computedMatch:h.a.object,path:h.a.string,exact:h.a.bool,strict:h.a.bool,sensitive:h.a.bool,component:h.a.func,render:h.a.func,children:h.a.oneOfType([h.a.func,h.a.node]),location:h.a.object},y.contextTypes={router:h.a.shape({history:h.a.object.isRequired,route:h.a.object.isRequired,staticContext:h.a.object})},y.childContextTypes={router:h.a.object.isRequired},t.a=y},function(e,t,n){function r(e,t){for(var n,r=[],i=0,o=0,a="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var c=n[0],f=n[1],p=n.index;if(a+=e.slice(o,p),o=p+c.length,f)a+=f[1];else{var h=e[o],d=n[2],v=n[3],m=n[4],y=n[5],b=n[6],w=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,k="+"===b||"*"===b,E="?"===b||"*"===b,_=n[2]||s,P=m||y;r.push({name:v||i++,prefix:d||"",delimiter:_,optional:E,repeat:k,partial:x,asterisk:!!w,pattern:P?u(P):w?".*":"[^"+l(_)+"]+?"})}}return o0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:s(e)(t,{pretty:!0})};t.a=l},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n5&&void 0!==arguments[5]&&arguments[5];r(this,e),this.cx=t[0],this.cy=t[1],this.fill="#2da7cf80",this.stroke="rgb(123, 207, 225)",this.selector=s,this.canvas=n,this.x=i,this.y=o,this.zoom=a,this.el=document.createElementNS("http://www.w3.org/2000/svg","circle"),this.select=this.select.bind(this),this.move=this.move.bind(this),this.stopEditing=this.stopEditing.bind(this),this.get_point=this.get_point.bind(this),this.old_cx=t[0],this.old_cy=t[1],this.base_size=10,this.base_stroke=5,this.size=this.base_size/a,this.strokeWidth=this.base_stroke/a}return i(e,[{key:"draw",value:function(){this.el.setAttribute("cx",this.cx),this.el.setAttribute("cy",this.cy),this.el.setAttribute("r",this.size),this.el.style.stroke=this.stroke,this.el.style.strokeWidth=this.strokeWidth,this.el.style.fill=this.fill}},{key:"setSize",value:function(e){this.size=this.base_size/e,this.strokeWidth=this.base_stroke/e,this.draw()}},{key:"edit",value:function(){this.el.addEventListener("click",this.select)}},{key:"clear",value:function(){window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing),this.fill="#2da7cf80",this.cx=this.old_cx,this.cy=this.old_cy,this.draw()}},{key:"stopEditing",value:function(){window.snapping_points.push([this.cx,this.cy]),this.old_cx=this.cx,this.old_cy=this.cy,this.fill="#2da7cf80",this.draw(),window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1||c<0||c>1)&&{x:e+u*(n-e),y:t+u*(r-t)}}function i(e,t){var n=s(e),r=2*(n.centroid[0]-window.r_axis)*Math.PI,i=r*n.area*Math.pow(t,3);return Math.abs(i)}function o(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function a(e,t,n){if(!e)return null;var r=[e.points[0].cx,e.points[0].cy],i=[e.points[1].cx,e.points[1].cy],a=o(r,i);return("inch"===n?2.54*t:t)/a/10}function s(e){var t=[];return e.forEach(function(e){t.push([e.cx,e.cy])}),{centroid:d.polygonCentroid(t),area:d.polygonArea(t)}}function l(e){var t=[],n=0;return e.forEach(function(r){ni.cy&&window.maxFill=1?("start-start"===n[0]?r=e.points.reverse().concat(t.points):"end-end"===n[0]?r=e.points.concat(t.points.reverse()):"start-end"===n[0]?r=t.points.concat(e.points):"end-start"===n[0]&&(r=e.points.concat(t.points)),n.length,r):void 0}n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return f}),n.d(t,"g",function(){return p}),n.d(t,"f",function(){return h}),n.d(t,"e",function(){return c});var d=n(80)},function(e,t,n){!function(){"use strict";function t(e,t,n,r,i){"undefined"===typeof i&&(i=.5);var o=p.projectionratio(i,e),a=1-o,s={x:o*t.x+a*r.x,y:o*t.y+a*r.y},l=p.abcratio(i,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s}}var r=Math.abs,i=Math.min,o=Math.max,a=Math.cos,s=Math.sin,l=Math.acos,u=Math.sqrt,c=Math.PI,f={x:0,y:0,z:0},p=n(32),h=n(110),d=function(e){var t=e&&e.forEach?e:[].slice.call(arguments),n=!1;if("object"===typeof t[0]){n=t.length;var i=[];t.forEach(function(e){["x","y","z"].forEach(function(t){"undefined"!==typeof e[t]&&i.push(e[t])})}),t=i}var o=!1,a=t.length;if(n){if(n>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var s=!o&&(9===a||12===a)||e&&e[0]&&"undefined"!==typeof e[0].z;this._3d=s;for(var l=[],u=0,c=s?3:2;u1e-4)return void(e._linear=!1);e._linear=!0}(this),this._t1=0,this._t2=1,this.update()},v=n(111);d.SVGtoBeziers=function(e){return v(d,e)},d.quadraticFromPoints=function(e,n,r,i){if("undefined"===typeof i&&(i=.5),0===i)return new d(n,n,r);if(1===i)return new d(e,n,n);var o=t(2,e,n,r,i);return new d(e,o.A,r)},d.cubicFromPoints=function(e,n,r,i,o){"undefined"===typeof i&&(i=.5);var a=t(3,e,n,r,i);"undefined"===typeof o&&(o=p.dist(n,a.C));var s=o*(1-i)/i,l=p.dist(e,r),u=(r.x-e.x)/l,c=(r.y-e.y)/l,f=o*u,h=o*c,v=s*u,m=s*c,y={x:n.x-f,y:n.y-h},g={x:n.x+v,y:n.y+m},b=a.A,w={x:b.x+(y.x-b.x)/(1-i),y:b.y+(y.y-b.y)/(1-i)},x={x:b.x+(g.x-b.x)/i,y:b.y+(g.y-b.y)/i},k={x:e.x+(w.x-e.x)/i,y:e.y+(w.y-e.y)/i},E={x:r.x+(x.x-r.x)/(1-i),y:r.y+(x.y-r.y)/(1-i)};return new d(e,k,E,r)};var m=function(){return p};d.getUtils=m,d.PolyBezier=h,d.prototype={getUtils:m,valueOf:function(){return this.toString()},toString:function(){return p.pointsToString(this.points)},toSVG:function(e){if(this._3d)return!1;for(var t=this.points,n=t[0].x,r=t[0].y,i=["M",n,r,2===this.order?"Q":"C"],o=1,a=t.length;o1;t--,n--){for(var r,i=[],o=0;o0},length:function(){return p.length(this.derivative.bind(this))},_lut:[],getLUT:function(e){if(e=e||100,this._lut.length===e)return this._lut;this._lut=[],e--;for(var t=0;t<=e;t++)this._lut.push(this.compute(t/e));return this._lut},on:function(e,t){t=t||5;for(var n,r=this.getLUT(),i=[],o=0,a=0;a1;){for(var p=0;p1;){for(r=[],a=0,s=n.length-1;a=0&&e<=1}),i=i.concat(r[n].sort(p.numberSort))}.bind(this)),i=i.sort(p.numberSort).filter(function(e,t){return i.indexOf(e)===t}),r.values=i,r},bbox:function(){var e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=p.getminmax(this,n,e[n])}.bind(this)),t},overlaps:function(e){var t=this.bbox(),n=e.bbox();return p.bboxoverlap(t,n)},offset:function(e,t){if("undefined"!==typeof t){var n=this.get(e),r=this.normal(e),i={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(i.z=n.z+r.z*t),i}if(this._linear){var o=this.normal(0),a=this.points.map(function(t){var n={x:t.x+e*o.x,y:t.y+e*o.y};return t.z&&r.z&&(n.z=t.z+e*o.z),n});return[new d(a)]}return this.reduce().map(function(t){return t.scale(e)})},simple:function(){if(3===this.order){var e=p.angle(this.points[0],this.points[3],this.points[1]),t=p.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}var n=this.normal(0),i=this.normal(1),o=n.x*i.x+n.y*i.y;return this._3d&&(o+=n.z*i.z),r(l(o))1,s.endcap.virtual=o0&&(i=i.concat(t))}),i},arcs:function(e){e=e||.5;var t=[];return this._iterate(e,t)},_error:function(e,t,n,i){var o=(i-n)/4,a=this.get(n+o),s=this.get(i-o),l=p.dist(e,t),u=p.dist(e,a),c=p.dist(e,s);return r(u-l)+r(c-l)},_iterate:function(e,t){var n,r=0,i=1;do{n=0,i=1;var o,l,u,c,f,h=this.get(r),d=!1,v=!1,m=i,y=1,g=0;do{v=d,c=u,m=(r+i)/2,g++,o=this.get(m),l=this.get(i),u=p.getccenter(h,o,l),u.interval={start:r,end:i};if(d=this._error(u,h,r,i)<=e,f=v&&!d,f||(y=i),d){if(i>=1){if(u.interval.end=y=1,c=u,i>1){var b={x:u.x+u.r*a(u.e),y:u.y+u.r*s(u.e)};u.e+=p.angle({x:u.x,y:u.y},b,this.get(1))}break}i+=(i-r)/2}else i=m}while(!f&&n++<100);if(n>=100)break;c=c||u,t.push(c),r=y}while(i<1);return t}},e.exports=d}()},function(e,t,n){!function(){"use strict";var t=Math.abs,r=Math.cos,i=Math.sin,o=Math.acos,a=Math.atan2,s=Math.sqrt,l=Math.pow,u=function(e){return e<0?-l(-e,1/3):l(e,1/3)},c=Math.PI,f=2*c,p=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,d=Number.MIN_SAFE_INTEGER||-9007199254740991,v={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){var n=t(e),r=n.x*n.x+n.y*n.y;return"undefined"!==typeof n.z&&(r+=n.z*n.z),s(r)},between:function(e,t,n){return t<=e&&e<=n||v.approximately(e,t)||v.approximately(e,n)},approximately:function(e,n,r){return t(e-n)<=(r||1e-6)},length:function(e){var t,n,r=0,i=v.Tvalues.length;for(t=0;to.x.min&&(t=o.x.min),n>o.y.min&&(n=o.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,o.push(a))}})}),o},makeshape:function(e,t,n){var r=t.points.length,i=e.points.length,o=v.makeline(t.points[r-1],e.points[0]),a=v.makeline(e.points[i-1],t.points[0]),s={startcap:o,forward:e,back:t,endcap:a,bbox:v.findbbox([o,e,t,a])},l=v;return s.intersections=function(e){return l.shapeintersections(s,s.bbox,e,e.bbox,n)},s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};var r,i,o=h,a=d;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(var s=0,l=n.length;sa&&(a=i[t]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(e,t){var n=t.p1.x,o=t.p1.y,s=-a(t.p2.y-o,t.p2.x-n),l=function(e){return{x:(e.x-n)*r(s)-(e.y-o)*i(s),y:(e.x-n)*i(s)+(e.y-o)*r(s)}};return e.map(l)},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};var n=e.length-1,i=v.align(e,t),a=function(e){return 0<=e&&e<=1};if(2===n){var l=i[0].y,c=i[1].y,p=i[2].y,h=l-2*c+p;if(0!==h){var d=-s(c*c-l*p),m=-l+c,y=-(d+m)/h;return[y,-(-d+m)/h].filter(a)}return c!==p&&0===h?[(2*c-p)/2*(c-p)].filter(a):[]}var g=i[0].y,b=i[1].y,w=i[2].y,x=i[3].y,h=3*b-g-3*w+x,l=3*g-6*b+3*w,c=-3*g+3*b,p=g;if(v.approximately(h,0)){if(v.approximately(l,0))return v.approximately(c,0)?[]:[-p/c].filter(a);var k=s(c*c-4*l*p),E=2*l;return[(k-c)/E,(-c-k)/E].filter(a)}l/=h,c/=h,p/=h;var _,y,P,C,T,i=(3*c-l*l)/3,S=i/3,k=(2*l*l*l-9*l*c+27*p)/27,A=k/2,M=A*A+S*S*S;if(M<0){var O=-i/3,R=O*O*O,z=s(R),L=-k/(2*z),N=L<-1?-1:L>1?1:L,I=o(N),j=u(z),D=2*j;return P=D*r(I/3)-l/3,C=D*r((I+f)/3)-l/3,T=D*r((I+2*f)/3)-l/3,[P,C,T].filter(a)}if(0===M)return _=A<0?u(-A):-u(A),P=2*_-l/3,C=-_-l/3,[P,C].filter(a);var B=s(M);return _=u(-A+B),y=u(A+B),[_-y-l/3].filter(a)},droots:function(e){if(3===e.length){var t=e[0],n=e[1],r=e[2],i=t-2*n+r;if(0!==i){var o=-s(n*n-t*r),a=-t+n;return[-(o+a)/i,-(-o+a)/i]}return n!==r&&0===i?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){var t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}},inflections:function(e){if(e.length<4)return[];var t=v.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,i=t[1].x*t[2].y,o=t[3].x*t[2].y,a=18*(-3*n+2*r+3*i-o),s=18*(3*n-r-3*i),l=18*(i-n);if(v.approximately(a,0)){if(!v.approximately(s,0)){var u=-l/s;if(0<=u&&u<=1)return[u]}return[]}var c=s*s-4*a*l,f=Math.sqrt(c),o=2*a;return v.approximately(o,0)?[]:[(f-s)/o,-(s+f)/o].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){var r,i,o,a,s,l=["x","y"],u=l.length;for(r=0;r=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){var r=e.bbox(),i=t.bbox(),o=1e5,a=n||.5;if(r.x.size+r.y.sizeA||A>M)&&(S+=f),S>M&&(o=M,M=S,S=o)):Mu){for(var t=0,n=a.length-l;t-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function v(e){var t=new i;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];m.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=h,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var i=new h(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new m(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&y.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(41),a=n.n(o),s=n(20),l=n(75),u=(n.n(l),n(76));a.a.render(i.a.createElement(s.a,null,i.a.createElement(u.a,null)),document.getElementById("root"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rD.length&&D.push(e)}function p(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:a=!0}}if(a)return n(i,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function B(e){e.eventPool=[],e.getPooled=j,e.release=D}function U(e,t){switch(e){case"keyup":return-1!==ki.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function F(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function J(e,t){switch(e){case"compositionend":return F(t);case"keypress":return 32!==t.which?null:(Ai=!0,Ti);case"textInput":return e=t.data,e===Ti&&Ai?null:e;default:return null}}function V(e,t){if(Mi)return"compositionend"===e||!Ei&&U(e,t)?(e=L(),yi._root=null,yi._startText=null,yi._fallbackText=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function pe(e){return e[1].toUpperCase()}function he(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(null!==i?0===i.type:!r&&(2Oo.length&&Oo.push(e)}}}function Ze(e){return Object.prototype.hasOwnProperty.call(e,Io)||(e[Io]=No++,Lo[e[Io]]={}),Lo[e[Io]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ye(e,t){var n=He(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=He(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Xe(e,t){if(Jo||null==Bo||Bo!==Br())return null;var n=Bo;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Fo&&Ur(Fo,n)?null:(Fo=n,e=I.getPooled(Do.select,Uo,e,t),e.type="select",e.target=Bo,A(e),e)}function Ge(e){var t="";return Nr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function $e(e,t){return e=jr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Qe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function it(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function ot(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ot(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function st(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||va.hasOwnProperty(i)&&va[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function ut(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function ct(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ze(e);t=Kr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function ht(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function dt(e,t,n,r){var i=ct(t,n);switch(t){case"iframe":case"object":Je("load",e);var o=n;break;case"video":case"audio":for(o=0;oCa||(e.current=Pa[Ca],Pa[Ca]=null,Ca--)}function Pt(e,t){Ca++,Pa[Ca]=e.current,e.current=t}function Ct(e){return St(e)?Aa:Ta.current}function Tt(e,t){var n=e.type.contextTypes;if(!n)return Jr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function St(e){return 2===e.tag&&null!=e.type.childContextTypes}function At(e){St(e)&&(_t(Sa,e),_t(Ta,e))}function Mt(e){_t(Sa,e),_t(Ta,e)}function Ot(e,t,n){Ta.current!==Jr&&r("168"),Pt(Ta,t,e),Pt(Sa,n,e)}function Rt(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ae(e)||"Unknown",o);return jr({},t,n)}function zt(e){if(!St(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Jr,Aa=Ta.current,Pt(Ta,t,e),Pt(Sa,Sa.current,e),!0}function Lt(e,t){var n=e.stateNode;if(n||r("169"),t){var i=Rt(e,Aa);n.__reactInternalMemoizedMergedChildContext=i,_t(Sa,e),_t(Ta,e),Pt(Ta,i,e)}else _t(Sa,e);Pt(Sa,t,e)}function Nt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function It(e,t,n){var r=e.alternate;return null===r?(r=new Nt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function jt(e,t,n){var i=e.type,o=e.key;if(e=e.props,"function"===typeof i)var a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case Vi:return Dt(e.children,t,n,o);case Yi:a=11,t|=3;break;case qi:a=11,t|=2;break;case Wi:return i=new Nt(15,e,o,4|t),i.type=Wi,i.expirationTime=n,i;case Xi:a=16,t|=2;break;default:e:{switch("object"===typeof i&&null!==i?i.$$typeof:null){case Zi:a=13;break e;case Hi:a=12;break e;case Ki:a=14;break e;default:r("130",null==i?i:typeof i,"")}a=void 0}}return t=new Nt(a,e,o,t),t.type=i,t.expirationTime=n,t}function Dt(e,t,n,r){return e=new Nt(10,e,r,t),e.expirationTime=n,e}function Bt(e,t,n){return e=new Nt(6,e,null,t),e.expirationTime=n,e}function Ut(e,t,n){return t=new Nt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ft(e,t,n){return t=new Nt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Jt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ma=Jt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Jt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function qt(e){"function"===typeof Ma&&Ma(e)}function Wt(e){"function"===typeof Oa&&Oa(e)}function Zt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Kt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Xt(e,t,n){var r=e.alternate;if(null===r){var i=e.updateQueue,o=null;null===i&&(i=e.updateQueue=Zt(e.memoizedState))}else i=e.updateQueue,o=r.updateQueue,null===i?null===o?(i=e.updateQueue=Zt(e.memoizedState),o=r.updateQueue=Zt(r.memoizedState)):i=e.updateQueue=Ht(o):null===o&&(o=r.updateQueue=Ht(i));null===o||i===o?Kt(i,t,n):null===i.lastUpdate||null===o.lastUpdate?(Kt(i,t,n),Kt(o,t,n)):(Kt(i,t,n),o.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Zt(e.memoizedState):$t(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function $t(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ht(t)),t}function Qt(e,t,n,r,i,o){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(o,r,i):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(i="function"===typeof e?e.call(o,r,i):e)||void 0===i)break;return jr({},r,i);case 2:Ra=!0}return r}function en(e,t,n,r,i){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>i)){t=$t(e,t);for(var o=t.baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c>i?(null===a&&(a=l,o=u),(0===s||s>c)&&(s=c)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var f=l.expirationTime;f>i?(null===c&&(c=l,null===a&&(o=u)),(0===s||s>f)&&(s=f)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=s,e.memoizedState=u}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:se(t)}}function on(e){var t=e.type._context;Pt(Na,t._changedBits,e),Pt(La,t._currentValue,e),Pt(za,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Na.current,n=La.current;_t(za,e),_t(La,e),_t(Na,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function sn(e){return e===Ia&&r("174"),e}function ln(e,t){Pt(Ba,t,e),Pt(Da,e,e),Pt(ja,Ia,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}_t(ja,e),Pt(ja,t,e)}function un(e){_t(ja,e),_t(Da,e),_t(Ba,e)}function cn(e){Da.current===e&&(_t(ja,e),_t(Da,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:jr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function pn(e,t,n,r,i,o){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(t,n)||!Ur(r,i))}function hn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function dn(e,t){var n=e.type,r=e.stateNode,i=e.pendingProps,o=Ct(e);r.props=i,r.state=e.memoizedState,r.refs=Jr,r.context=Tt(e,o),o=e.updateQueue,null!==o&&(en(e,o,i,r,t),r.state=e.memoizedState),o=e.type.getDerivedStateFromProps,"function"===typeof o&&(fn(e,o,i),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Ua.enqueueReplaceState(r,r.state,null),null!==(o=e.updateQueue)&&(en(e,o,i,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function vn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===Jr?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function mn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=It(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rv?(m=f,f=null):m=f.sibling;var y=h(r,f,s[v],l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),o=a(y,o,v),null===c?u=y:c.sibling=y,c=y,f=m}if(v===s.length)return n(r,f),u;if(null===f){for(;vm?(y=v,v=null):y=v.sibling;var b=h(o,v,g.value,u);if(null===b){v||(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=a(b,s,m),null===f?c=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),c;if(null===v){for(;!g.done;m++,g=l.next())null!==(g=p(o,g.value,u))&&(s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return c}for(v=i(o,v);!g.done;m++,g=l.next())null!==(g=d(v,o,m,g.value,u))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach(function(e){return t(o,e)}),c}return function(e,i,a,l){var u="object"===typeof a&&null!==a&&a.type===Vi&&null===a.key;u&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case Fi:e:{for(c=a.key,u=i;null!==u;){if(u.key===c){if(10===u.tag?a.type===Vi:u.type===a.type){n(e,u.sibling),i=o(u,a.type===Vi?a.props.children:a.props,l),i.ref=vn(e,u,a),i.return=e,e=i;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===Vi?(i=Dt(a.props.children,e.mode,l,a.key),i.return=e,e=i):(l=jt(a,e.mode,l),l.ref=vn(e,i,a),l.return=e,e=l)}return s(e);case Ji:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],l),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=Ut(a,e.mode,l),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,l),i.return=e,e=i):(n(e,i),i=Bt(a,e.mode,l),i.return=e,e=i),s(e);if(Fa(a))return v(e,i,a,l);if(oe(a))return m(e,i,a,l);if(c&&mn(e,a),"undefined"===typeof a&&!u)switch(e.tag){case 2:case 1:l=e.type,r("152",l.displayName||l.name||"Component")}return n(e,i)}}function gn(e,t){var n=new Nt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if(Za){var t=Wa;if(t){var n=t;if(!bn(e,t)){if(!(t=xt(n))||!bn(e,t))return e.effectTag|=2,Za=!1,void(qa=e);gn(qa,n)}qa=e,Wa=kt(t)}else e.effectTag|=2,Za=!1,qa=e}}function xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;qa=e}function kn(e){if(e!==qa)return!1;if(!Za)return xn(e),Za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Wa;t;)gn(e,t),t=xt(t);return xn(e),Wa=qa?xt(e.stateNode):null,!0}function En(){Wa=qa=null,Za=!1}function _n(e,t,n){Pn(e,t,n,t.expirationTime)}function Pn(e,t,n,r){t.child=null===e?Va(t,null,n,r):Ja(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Tn(e,t,n,r,i){Cn(e,t);var o=0!==(64&t.effectTag);if(!n&&!o)return r&&Lt(t,!1),On(e,t);n=t.stateNode,Bi.current=t;var a=o?null:n.render();return t.effectTag|=1,o&&(Pn(e,t,null,i),t.child=null),Pn(e,t,a,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Lt(t,!0),t.child}function Sn(e){var t=e.stateNode;t.pendingContext?Ot(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(e,t.context,!1),ln(e,t.containerInfo)}function An(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Mn(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(o===i)return t.stateNode=0,on(t),On(e,t);var s=i.value;if(t.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else{var l=o.value;if(l===s&&(0!==l||1/l===1/s)||l!==l&&s!==s){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else if(s="function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,s):1073741823,0===(s|=0)){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t)}else An(t,r,s,n)}return t.stateNode=s,on(t),_n(e,t,i.children),t.child}function On(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=It(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=It(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Rn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Sn(t);break;case 2:zt(t);break;case 4:ln(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=Ct(t);return a=Tt(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,o),o=zt(t),i.updater=Ua,t.stateNode=i,i._reactInternalFiber=t,dn(t,n),e=Tn(e,t,!0,o,n)):(t.tag=1,_n(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(i=Ct(t),i=Tt(t,i),o=o(n,i),t.effectTag|=1,_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 2:if(o=zt(t),null===e)if(null===t.stateNode){var s=t.pendingProps,l=t.type;i=Ct(t);var u=2===t.tag&&null!=t.type.contextTypes;a=u?Tt(t,i):Jr,s=new l(s,a),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=Ua,t.stateNode=s,s._reactInternalFiber=t,u&&(u=t.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=i,u.__reactInternalMemoizedMaskedChildContext=a),dn(t,n),i=!0}else{l=t.type,i=t.stateNode,u=t.memoizedProps,a=t.pendingProps,i.props=u;var c=i.context;s=Ct(t),s=Tt(t,s);var f=l.getDerivedStateFromProps;(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(u!==a||c!==s)&&hn(t,i,a,s),Ra=!1;var p=t.memoizedState;c=i.state=p;var h=t.updateQueue;null!==h&&(en(t,h,a,i,n),c=t.memoizedState),u!==a||p!==c||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),c=t.memoizedState),(u=Ra||pn(t,u,a,p,c,s))?(l||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.effectTag|=4)):("function"===typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,i=u):("function"===typeof i.componentDidMount&&(t.effectTag|=4),i=!1)}else l=t.type,i=t.stateNode,a=t.memoizedProps,u=t.pendingProps,i.props=a,c=i.context,s=Ct(t),s=Tt(t,s),f=l.getDerivedStateFromProps,(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(a!==u||c!==s)&&hn(t,i,u,s),Ra=!1,c=t.memoizedState,p=i.state=c,h=t.updateQueue,null!==h&&(en(t,h,u,i,n),p=t.memoizedState),a!==u||c!==p||Sa.current||Ra?("function"===typeof f&&(fn(t,f,u),p=t.memoizedState),(f=Ra||pn(t,a,u,c,p,s))?(l||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(u,p,s),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(u,p,s)),"function"===typeof i.componentDidUpdate&&(t.effectTag|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),i.props=u,i.state=p,i.context=s,i=f):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),i=!1);return Tn(e,t,i,o,n);case 3:return Sn(t),o=t.updateQueue,null!==o?(i=t.memoizedState,i=null!==i?i.element:null,en(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(En(),e=On(e,t)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Wa=kt(t.stateNode.containerInfo),qa=t,i=Za=!0),i?(t.effectTag|=2,t.child=Va(t,null,o,n)):(En(),_n(e,t,o)),e=t.child)):(En(),e=On(e,t)),e;case 5:return sn(Ba.current),o=sn(ja.current),i=at(o,t.type),o!==i&&(Pt(Da,t,t),Pt(ja,i,t)),null===e&&wn(t),o=t.type,u=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||u!==i||((u=1&t.mode&&!!i.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=i.children,wt(o,i)?u=null:a&&wt(o,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(_n(e,t,u),t.memoizedProps=i,e=t.child)):e=On(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ln(t,t.stateNode.containerInfo),o=t.pendingProps,Sa.current||t.memoizedProps!==o?(null===e?t.child=Ja(t,null,o,n):_n(e,t,o),t.memoizedProps=o,e=t.child):e=On(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,i=t.ref,Sa.current||t.memoizedProps!==n||i!==(null!==e?e.ref:null)?(o=o(n,i),_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=On(e,t):(_n(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Mn(e,t,n);case 12:e:if(i=t.type,a=t.pendingProps,u=t.memoizedProps,o=i._currentValue,s=i._changedBits,Sa.current||0!==s||u!==a){if(t.memoizedProps=a,l=a.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(s&l))An(t,i,s,n);else if(u===a){e=On(e,t);break e}n=a.children,n=n(o),t.effectTag|=1,_n(e,t,n),e=t.child}else e=On(e,t);return e;default:r("156")}}function zn(e){e.effectTag|=4}function Ln(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return At(t),null;case 3:un(t),Mt(t);var i=t.stateNode;return i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),Ha(t),null;case 5:cn(t),i=sn(Ba.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,s=t.stateNode,l=sn(ja.current);s=vt(s,o,a,n,i),Ya(e,t,s,o,a,n,i,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=sn(ja.current),kn(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[ii]=t,n[oi]=a,i=yt(n,o,a,e,i),t.updateQueue=i,null!==i&&zn(t);else{e=pt(o,n,i,e),e[ii]=t,e[oi]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}dt(e,o,n,i),bt(o,n)&&zn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;i=sn(Ba.current),sn(ja.current),kn(t)?(i=t.stateNode,n=t.memoizedProps,i[ii]=t,gt(i,n)&&zn(t)):(i=ht(n,i),i[ii]=t,t.stateNode=i)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return un(t),Ha(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Nn(e,t){var n=t.source;null===t.stack&&null!==n&&se(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function In(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Xn(e,t)}else t.current=null}function jn(e){switch("function"===typeof Wt&&Wt(e),e.tag){case 2:In(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Xn(e,t)}break;case 5:In(e);break;case 4:Un(e)}}function Dn(e){return 5===e.tag||3===e.tag||4===e.tag}function Bn(e){e:{for(var t=e.return;null!==t;){if(Dn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(st(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Dn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(i){var a=t,s=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(s,l):a.insertBefore(s,l)}else t.insertBefore(o.stateNode,n);else i?(a=t,s=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(s,a):a.appendChild(s)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Un(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,s=a;;)if(jn(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}o?(a=i,s=t.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):i.removeChild(t.stateNode)}else if(4===t.tag?i=t.stateNode.containerInfo:jn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Fn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[oi]=i,mt(n,a,o,e,i))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Jn(e,t,n){n=Yt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dr(r),Nn(e,t)},n}function Vn(e,t,n){n=Yt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cs?cs=new Set([this]):cs.add(this);var n=t.value,r=t.stack;Nn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qn(e,t,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Jn(e,r,o),void Gt(e,r,o);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cs||!cs.has(n)))return e.effectTag|=1024,r=Vn(e,t,o),void Gt(e,r,o)}e=e.return}while(null!==e)}function Wn(e){switch(e.tag){case 2:At(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return un(e),Mt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return un(e),null;case 13:return an(e),null;default:return null}}function Zn(){if(null!==ns)for(var e=ns.return;null!==e;){var t=e;switch(t.tag){case 2:At(t);break;case 3:un(t),Mt(t);break;case 5:cn(t);break;case 4:un(t);break;case 13:an(t)}e=e.return}rs=null,is=0,os=-1,as=!1,ns=null,us=!1}function Hn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Ln(t,e,is);var i=e;if(1073741823===is||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1gs)&&(gs=e),e}function Qn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ts&&0!==is&&tTs&&r("185")}e=e.return}}function er(){return $a=ka()-Xa,Ga=2+($a/10|0)}function tr(e){var t=es;es=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{es=t}}function nr(e,t,n,r,i){var o=es;es=1;try{return e(t,n,r,i)}finally{es=o}}function rr(e){if(0!==hs){if(e>hs)return;null!==ds&&_a(ds)}var t=ka()-Xa;hs=e,ds=Ea(ar,{timeout:10*(e-2)-t})}function ir(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ps?(fs=ps=e,e.nextScheduledRoot=e):(ps=ps.nextScheduledRoot=e,ps.nextScheduledRoot=fs);else{var n=e.remainingExpirationTime;(0===n||t=ys)&&(!bs||er()>=ys);)er(),fr(ms,ys,!bs),or();else for(;null!==ms&&0!==ys&&(0===e||e>=ys);)fr(ms,ys,!1),or();null!==ks&&(hs=0,ds=null),0!==ys&&rr(ys),ks=null,bs=!1,cr()}function ur(e,t){vs&&r("253"),ms=e,ys=t,fr(e,t,!1),sr(),cr()}function cr(){if(Ss=0,null!==Cs){var e=Cs;Cs=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Ye(_,C),x=Ye(_,b),w&&x&&(1!==P.rangeCount||P.anchorNode!==w.node||P.anchorOffset!==w.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),P.removeAllRanges(),C>b?(P.addRange(k),P.extend(x.node,x.offset)):(k.setEnd(x.node,x.offset),P.addRange(k))))),P=[];for(C=_;C=C.parentNode;)1===C.nodeType&&P.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_As)&&(bs=!0)}function dr(e){null===ms&&r("246"),ms.remainingExpirationTime=0,ws||(ws=!0,xs=e)}function vr(e){null===ms&&r("246"),ms.remainingExpirationTime=e}function mr(e,t){var n=Es;Es=!0;try{return e(t)}finally{(Es=n)||vs||sr()}}function yr(e,t){if(Es&&!_s){_s=!0;try{return e(t)}finally{_s=!1}}return e(t)}function gr(e,t){vs&&r("187");var n=Es;Es=!0;try{return nr(e,t)}finally{Es=n,sr()}}function br(e,t,n){if(Ps)return e(t,n);Es||vs||0===gs||(lr(gs,!1,null),gs=0);var r=Ps,i=Es;Es=Ps=!0;try{return e(t,n)}finally{Ps=r,(Es=i)||vs||sr()}}function wr(e){var t=Es;Es=!0;try{nr(e)}finally{(Es=t)||vs||lr(1,!1,null)}}function xr(e,t,n,i,o){var a=t.current;if(n){n=n._reactInternalFiber;var s;e:{for(2===ze(n)&&2===n.tag||r("170"),s=n;3!==s.tag;){if(St(s)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}(s=s.return)||r("171")}s=s.stateNode.context}n=St(n)?Rt(n,s):s}else n=Jr;return null===t.context?t.context=n:t.pendingContext=n,t=o,o=Yt(i),o.payload={element:e},t=void 0===t?null:t,null!==t&&(o.callback=t),Xt(a,o,i),Qn(a,i),i}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Ie(t),null===e?null:e.stateNode}function Er(e,t,n,r){var i=t.current;return i=$n(er(),i),xr(e,t,n,i,r)}function _r(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Pr(e){var t=e.findFiberByHostInstance;return Vt(jr({},e,{findHostInstanceByFiber:function(e){return e=Ie(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=_i),Ti=String.fromCharCode(32),Si={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ai=!1,Mi=!1,Oi={eventTypes:Si,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Ei)e:{switch(e){case"compositionstart":i=Si.compositionStart;break e;case"compositionend":i=Si.compositionEnd;break e;case"compositionupdate":i=Si.compositionUpdate;break e}i=void 0}else Mi?U(e,n)&&(i=Si.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Si.compositionStart);return i?(Ci&&(Mi||i!==Si.compositionStart?i===Si.compositionEnd&&Mi&&(o=L()):(yi._root=r,yi._startText=N(),Mi=!0)),i=wi.getPooled(i,t,n,r),o?i.data=o:null!==(o=F(n))&&(i.data=o),A(i),o=i):o=null,(e=Pi?J(e,n):V(e,n))?(t=xi.getPooled(Si.beforeInput,t,n,r),t.data=e,A(t)):t=null,null===o?t:null===t?o:[o,t]}},Ri=null,zi={injectFiberControlledHostComponent:function(e){Ri=e}},Li=null,Ni=null,Ii={injection:zi,enqueueStateRestore:W,needsStateRestore:Z,restoreStateIfNeeded:H},ji=!1,Di={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Bi=Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ui="function"===typeof Symbol&&Symbol.for,Fi=Ui?Symbol.for("react.element"):60103,Ji=Ui?Symbol.for("react.portal"):60106,Vi=Ui?Symbol.for("react.fragment"):60107,qi=Ui?Symbol.for("react.strict_mode"):60108,Wi=Ui?Symbol.for("react.profiler"):60114,Zi=Ui?Symbol.for("react.provider"):60109,Hi=Ui?Symbol.for("react.context"):60110,Yi=Ui?Symbol.for("react.async_mode"):60111,Ki=Ui?Symbol.for("react.forward_ref"):60112,Xi=Ui?Symbol.for("react.timeout"):60113,Gi="function"===typeof Symbol&&Symbol.iterator,$i=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qi=Object.prototype.hasOwnProperty,eo={},to={},no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){no[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){no[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){no[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){no[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){no[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){no[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ro=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),no.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var io={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},oo=null,ao=null,so=!1;Ir.canUseDOM&&(so=ee("input")&&(!document.documentMode||9=document.documentMode,Do={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Bo=null,Uo=null,Fo=null,Jo=!1,Vo={eventTypes:Do,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ze(o),i=Kr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Qo;null!==r;){var i=r.timeoutTime;-1!==i&&i<=t?n.push(r):-1!==i&&(-1===e||it&&(t=8),aa=t"+t+"",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),va={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ma=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});var ya=jr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ga=Dr.thatReturns(""),ba={createElement:pt,createTextNode:ht,setInitialProperties:dt,diffProperties:vt,updateProperties:mt,diffHydratedProperties:yt,diffHydratedText:gt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,forceRefresh:f.a.bool,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node}},function(e,t,n){"use strict";function r(){}var i=n(51);e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Browser history needs a DOM");var t=window.history,n=Object(c.g)(),r=!Object(c.h)(),o=e.forceRefresh,d=void 0!==o&&o,v=e.getUserConfirmation,m=void 0===v?c.c:v,y=e.keyLength,g=void 0===y?6:y,b=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",w=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname,u=o.search,c=o.hash,f=a+u+c;return i()(!b||Object(l.c)(f,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+f+'" to begin with "'+b+'".'),b&&(f=Object(l.e)(f,b)),Object(s.a)(f,r,n)},x=function(){return Math.random().toString(36).substr(2,g)},k=Object(u.a)(),E=function(e){p(J,e),J.length=t.length,k.notifyListeners(J.location,J.action)},_=function(e){Object(c.d)(e)||T(w(e.state))},P=function(){T(w(h()))},C=!1,T=function(e){if(C)C=!1,E();else{k.confirmTransitionTo(e,"POP",m,function(t){t?E({action:"POP",location:e}):S(e)})}},S=function(e){var t=J.location,n=M.indexOf(t.key);-1===n&&(n=0);var r=M.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(C=!0,L(i))},A=w(h()),M=[A.key],O=function(e){return b+Object(l.b)(e)},R=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"PUSH",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.pushState({key:a,state:s},null,r),d)window.location.href=r;else{var l=M.indexOf(J.location.key),u=M.slice(0,-1===l?0:l+1);u.push(o.key),M=u,E({action:"PUSH",location:o})}else i()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},z=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"REPLACE",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.replaceState({key:a,state:s},null,r),d)window.location.replace(r);else{var l=M.indexOf(J.location.key);-1!==l&&(M[l]=o.key),E({action:"REPLACE",location:o})}else i()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},L=function(e){t.go(e)},N=function(){return L(-1)},I=function(){return L(1)},j=0,D=function(e){j+=e,1===j?(Object(c.a)(window,"popstate",_),r&&Object(c.a)(window,"hashchange",P)):0===j&&(Object(c.e)(window,"popstate",_),r&&Object(c.e)(window,"hashchange",P))},B=!1,U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=k.setPrompt(e);return B||(D(1),B=!0),function(){return B&&(B=!1,D(-1)),t()}},F=function(e){var t=k.appendListener(e);return D(1),function(){D(-1),t()}},J={length:t.length,action:"POP",location:A,createHref:O,push:R,replace:z,go:L,goBack:N,goForward:I,block:U,listen:F};return J};t.a=d},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),l=a||s;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var u=void 0;if(o.length){var c=o[o.length-1];u="."===c||".."===c||""===c}else u=!1;for(var f=0,p=o.length;p>=0;p--){var h=o[p];"."===h?i(o,p):".."===h?(i(o,p),f++):f&&(i(o,p),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}t.a=o},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":i(e);if(n!==("undefined"===typeof t?"undefined":i(t)))return!1;if("object"===n){var o=e.valueOf(),a=t.valueOf();if(o!==e||a!==t)return r(o,a);var s=Object.keys(e),l=Object.keys(t);return s.length===l.length&&s.every(function(n){return r(e[n],t[n])})}return!1}var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=r},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Hash history needs a DOM");var t=window.history,n=Object(c.f)(),r=e.getUserConfirmation,o=void 0===r?c.c:r,m=e.hashType,y=void 0===m?"slash":m,g=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",b=p[y],w=b.encodePath,x=b.decodePath,k=function(){var e=x(h());return i()(!g||Object(l.c)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=Object(l.e)(e,g)),Object(s.a)(e)},E=Object(u.a)(),_=function(e){f(W,e),W.length=t.length,E.notifyListeners(W.location,W.action)},P=!1,C=null,T=function(){var e=h(),t=w(e);if(e!==t)v(t);else{var n=k(),r=W.location;if(!P&&Object(s.b)(r,n))return;if(C===Object(l.b)(n))return;C=null,S(n)}},S=function(e){if(P)P=!1,_();else{E.confirmTransitionTo(e,"POP",o,function(t){t?_({action:"POP",location:e}):A(e)})}},A=function(e){var t=W.location,n=z.lastIndexOf(Object(l.b)(t));-1===n&&(n=0);var r=z.lastIndexOf(Object(l.b)(e));-1===r&&(r=0);var i=n-r;i&&(P=!0,j(i))},M=h(),O=w(M);M!==O&&v(O);var R=k(),z=[Object(l.b)(R)],L=function(e){return"#"+w(g+Object(l.b)(e))},N=function(e,t){i()(void 0===t,"Hash history cannot push state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"PUSH",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);if(h()!==r){C=t,d(r);var o=z.lastIndexOf(Object(l.b)(W.location)),a=z.slice(0,-1===o?0:o+1);a.push(t),z=a,_({action:"PUSH",location:n})}else i()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),_()}})},I=function(e,t){i()(void 0===t,"Hash history cannot replace state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"REPLACE",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);h()!==r&&(C=t,v(r));var i=z.indexOf(Object(l.b)(W.location));-1!==i&&(z[i]=t),_({action:"REPLACE",location:n})}})},j=function(e){i()(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},D=function(){return j(-1)},B=function(){return j(1)},U=0,F=function(e){U+=e,1===U?Object(c.a)(window,"hashchange",T):0===U&&Object(c.e)(window,"hashchange",T)},J=!1,V=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return J||(F(1),J=!0),function(){return J&&(J=!1,F(-1)),t()}},q=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},W={length:t.length,action:"POP",location:R,createHref:L,push:N,replace:I,go:j,goBack:D,goForward:B,block:V,listen:q};return W};t.a=m},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(5),a=n(7),s=n(9),l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,f=e.initialIndex,p=void 0===f?0:f,h=e.keyLength,d=void 0===h?6:h,v=Object(s.a)(),m=function(e){u(A,e),A.length=A.entries.length,v.notifyListeners(A.location,A.action)},y=function(){return Math.random().toString(36).substr(2,d)},g=c(p,0,r.length-1),b=r.map(function(e){return"string"===typeof e?Object(a.a)(e,void 0,y()):Object(a.a)(e,void 0,e.key||y())}),w=o.b,x=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=A.index,n=t+1,i=A.entries.slice(0);i.length>n?i.splice(n,i.length-n,r):i.push(r),m({action:"PUSH",location:r,index:n,entries:i})}})},k=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(A.entries[A.index]=r,m({action:"REPLACE",location:r}))})},E=function(e){var n=c(A.index+e,0,A.entries.length-1),r=A.entries[n];v.confirmTransitionTo(r,"POP",t,function(e){e?m({action:"POP",location:r,index:n}):m()})},_=function(){return E(-1)},P=function(){return E(1)},C=function(e){var t=A.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return v.setPrompt(e)},S=function(e){return v.appendListener(e)},A={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:w,push:x,replace:k,go:E,goBack:_,goForward:P,canGo:C,block:T,listen:S};return A};t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(10),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,getUserConfirmation:f.a.func,hashType:f.a.oneOf(["hashbang","noslash","slash"]),children:f.a.node},t.a=d},function(e,t,n){"use strict";var r=n(59);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(11),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={initialEntries:f.a.array,initialIndex:f.a.number,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node},t.a=d},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(23),u=n(22),c=Object.assign||function(e){for(var t=1;t outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);p.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},p.defaultProps={when:!0},p.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired},t.a=p},function(e,t,n){"use strict";var r=n(65);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(4),v=n(26),m=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.c)(e.to),n=Object(d.c)(this.props.to);if(Object(d.f)(t,n))return void f()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"===typeof n?Object(v.a)(n,t.params):m({},n,{pathname:Object(v.a)(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";var r=n(67);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(3),l=n.n(s),u=n(2),c=n.n(u),f=n(0),p=n.n(f),h=n(1),d=n.n(h),v=n(4),m=n(11),y=Object.assign||function(e){for(var t=1;t",e)}},E=function(){},_=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),i=r(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:w(t,Object(v.c)(n)),push:this.handlePush,replace:this.handleReplace,go:k("go"),goBack:k("goBack"),goForward:k("goForward"),listen:this.handleListen,block:this.handleBlock};return p.a.createElement(m.a,y({},i,{history:o}))},t}(p.a.Component);_.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},_.defaultProps={basename:"",location:"/"},_.childContextTypes={router:d.a.object.isRequired},t.a=_},function(e,t,n){"use strict";var r=n(69);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(12),v=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){f()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),f()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return s.a.Children.forEach(t,function(t){if(null==r&&s.a.isValidElement(t)){var o=t.props,a=o.path,l=o.exact,u=o.strict,c=o.sensitive,f=o.from,p=a||f;i=t,r=Object(d.a)(n.pathname,{path:p,exact:l,strict:u,sensitive:c},e.match)}}),r?s.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(s.a.Component);v.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},v.propTypes={children:u.a.node,location:u.a.object},t.a=v},function(e,t,n){"use strict";var r=n(26);r.a},function(e,t,n){"use strict";var r=n(12);r.a},function(e,t,n){"use strict";var r=n(73);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(74),u=n.n(l),c=n(24),f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"other";this.globalStopEditingMode(),this.addCursorPoint();var t=this.state.polylines,n=new c.a({points:[],id:this.id,type:e,selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});t.push(n),this.id++,this.setState({polylines:t,active_polyline:n})}},{key:"selectLayer",value:function(e){var t=this;this.state.active_polyline&&this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"}),this.setState({active_polyline:this.getPolylineById(e)},function(){t.state.polylines.forEach(function(e){e.el.classList.remove("active")}),t.state.active_polyline.el.classList.toggle("active")})}},{key:"unselect_polyline",value:function(e){console.log(e.code),"Escape"!==e.code&&"KeyQ"!==e.code||(this.state.active_polyline&&(this.state.active_polyline.el.classList.remove("active"),this.state.active_polyline.stopEditing({code:"Escape"}),this.state.active_polyline.editing&&this.state.active_polyline.stopEditingPoints({code:"Escape"}),this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"})),this.setState({active_polyline:void 0}),Object(m.g)(this.state.polylines),this.checkProfile("int_prof"),this.checkProfile("out_prof"),this.new_point.added&&this.removeCursorPoint(),this.state.polylines.forEach(function(e){e.points.length<2&&(this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.id})}),this.canvas.removeChild(e.el))}.bind(this)))}},{key:"globalStopEditingMode",value:function(){this.state.polylines.forEach(function(e){e.el.classList.remove("active")}),this.state.active_polyline&&this.state.active_polyline.stopEditing({code:"Escape"})}},{key:"addNotification",value:function(e){this.setState({notification:{id:this.not_id,message:e}}),this.not_id++}},{key:"getPolylineById",value:function(e){return this.state.polylines.filter(function(t){return t.id===e})[0]}},{key:"addCursorPoint",value:function(){this.canvas.appendChild(this.new_point.el),this.new_point.added=!0,this.new_point.select()}},{key:"removeCursorPoint",value:function(){this.canvas.removeChild(this.new_point.el),this.new_point.added=!1}},{key:"updateToDo",value:function(e,t){var n=this.state.toDo;n[e]=t,this.setState({toDo:n})}},{key:"checkProfile",value:function(e){var t=this.state.polylines.filter(function(t){return t.type===e});if(0===t.length)this.updateToDo(e,!1),"int_prof"===e&&this.inner_poly&&(this.canvas.removeChild(this.inner_poly),this.inner_poly=null,this.setState({vessel_capacity:null})),this.vessel_poly&&(this.canvas.removeChild(this.vessel_poly),this.vessel_poly=null,this.setState({vessel_volume:null}));else if(1===t.length)this.updateToDo(e,!0);else{this.updateToDo(e,!1);var n="int_prof"===e?"internal profile":"outer profile";this.addNotification("There should be only one "+n)}}},{key:"joinIntExt",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type})[0],t=this.state.polylines.filter(function(e){return"out_prof"===e.type})[0];if(!e||!t)return void this.addNotification("To calculate vessel volume you need both internal and outer profiles");if(this.vesselVolume=Object(m.f)(e,t),!this.vesselVolume)return void this.addNotification("To calculate vessel volume internal and outer profiles have to share at least one vertex");this.vessel_poly&&this.canvas.removeChild(this.vessel_poly),this.vessel_poly=Object(m.d)(this.vesselVolume,"rgba(170, 170, 170, 0.6)");var n=Object(m.b)(this.vesselVolume,this.scale);this.setState({vessel_volume:n}),this.canvas.appendChild(this.vessel_poly)}},{key:"create_inner_polygon",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(0===e.length)return void this.addNotification("To calculate vessel capacity you need an internal profile");if(this.inner_poly&&this.canvas.removeChild(this.inner_poly),this.innerPolygon=Object(m.e)(e[0].points.slice()),this.inner_poly=Object(m.d)(this.innerPolygon,"rgba(210, 204, 78, 0.28)"),this.scale){var t=Object(m.b)(this.innerPolygon,this.scale);this.setState({vessel_capacity:t})}else this.addNotification("Can't measure, define scale first");this.canvas.appendChild(this.inner_poly)}},{key:"metricForm",value:function(e){var t=this;e.ref_unit?(this.updateToDo("ref_unit",!0),this.setState({metric_value:e.value,metric_unit:e.unit},function(){t.metric&&2===t.metric.points.length&&(t.scale=Object(m.a)(t.metric,t.state.metric_value,t.state.metric_unit),t.innerPolygon&&t.setState({vessel_capacity:Object(m.b)(t.innerPolygon,t.scale)}),t.vesselVolume&&t.setState({vessel_volume:Object(m.b)(t.vesselVolume,t.scale)}))})):(this.updateToDo("ref_unit",!1),this.scale=null)}},{key:"defineMaxFill",value:function(){this.maxFill&&(this.canvas.removeChild(this.maxFill.el),this.updateToDo("maxFill",!1)),this.maxFill=new c.a({points:[],id:"max_fill",type:"max_fill",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"})}},{key:"addMaxFill",value:function(e){this.maxFill.stroke="rgb(0, 255, 21)",this.maxFill.add_point(e),this.canvas.appendChild(this.maxFill.el),this.maxFill.draw(),this.maxFill.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.maxFill=this.maxFill.points[0].cy,this.updateToDo("maxFill",!0)}},{key:"defineMetric",value:function(){this.unselect_polyline({code:"Escape"}),this.metric&&(this.canvas.removeChild(this.metric.el),this.updateToDo("metric",!1)),this.metric=new c.a({points:[],id:"metric",type:"metric",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMetric),this.metric.stopEditing({code:"Escape"})}},{key:"addMetric",value:function(e){0===this.metric.points.length?this.metric.add_point(e):1===this.metric.points.length&&(this.metric.add_point(e),this.metric.stroke="red",this.metric.stopEditing({code:"Escape"}),this.metric.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMetric),this.updateToDo("metric",!0),this.removeCursorPoint(),this.state.metric_value&&this.state.metric_unit&&(this.scale=Object(m.a)(this.metric,this.state.metric_value,this.state.metric_unit)),this.innerPolygon&&this.setState({vessel_capacity:Object(m.b)(this.innerPolygon,this.scale)}),this.vesselVolume&&this.setState({vessel_volume:Object(m.b)(this.vesselVolume,this.scale)}))}},{key:"definerotAxis",value:function(){this.rotAxis&&(this.canvas.removeChild(this.rotAxis.el),window.r_axis=null,this.updateToDo("rotAxis",!1)),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addRotAxis)}},{key:"addRotAxis",value:function(e){this.rotAxis=new c.a({points:[],id:this.id,type:"center",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.rotAxis.stroke="#ff5a00",this.rotAxis.add_point(e),this.canvas.appendChild(this.rotAxis.el),this.rotAxis.draw(),this.rotAxis.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addRotAxis),this.rotAxis.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.r_axis=this.rotAxis.points[0].cx,this.updateToDo("rotAxis",!0)}},{key:"colorChange",value:function(e,t){var n=this.getPolylineById(e);n.stroke=t,n.draw()}},{key:"typeChange",value:function(e,t){var n=this;this.setState({polylines:this.state.polylines.map(function(n){return n.id===e?(n.type=t,n):n})},function(){n.checkProfile("int_prof"),n.checkProfile("out_prof")})}},{key:"delete_line",value:function(){var e=this;if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.state.active_polyline.id}),active_polyline:void 0},function(){e.checkProfile("int_prof"),e.checkProfile("out_prof"),Object(m.g)(e.state.polylines)})}},{key:"edit_line",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.state.active_polyline.editLine()}},{key:"enterBreakLineMode",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");if(this.state.active_polyline.points.length<=2)return void this.addNotification("Line has two or less vertices and can't be subdivided");var e=this.state.active_polyline;e.breaking_mode=!0,this.setState({active_polyline:e});var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.breakLine)),t++}.bind(this))}},{key:"exitBreakLineMode",value:function(e){if(("Escape"===e.code||"KeyQ"===e.code)&&this.state.active_polyline.breaking_mode){var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(e.el.removeEventListener("click",this.breakLine),this.canvas.removeChild(e.el)),t++}.bind(this));var n=this.state.active_polyline;n.breaking_mode=!1,this.setState({active_polyline:n})}}},{key:"breakLine",value:function(e){var t=this,n=[e.target.getAttribute("cx"),e.target.getAttribute("cy")];this.exitBreakLineMode({code:"Escape"});var r=this.state.polylines,i=new c.a({points:[],id:this.id,type:"other",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.state.active_polyline.points.forEach(function(e){i.appendPoint([e.cx,e.cy]),e.cx===parseFloat(n[0])&&e.cy===parseFloat(n[1])&&(i.el.classList.remove("active"),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),i=new c.a({points:[],id:this.id,type:"other",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),i.appendPoint([e.cx,e.cy]))}.bind(this)),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),this.state.active_polyline.stopEditing({code:"Escape"}),this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:r.filter(function(e){return e.id!==t.state.active_polyline.id}),active_polyline:i})}},{key:"image_rotate",value:function(e){this.bck_image.style.transform="rotate("+e.target.value+"deg)"}},{key:"fileChangedHandler",value:function(e){var t=e.target.value.split("\\");t=t[t.length-1],this.setState({img_name:t});var n=new Image;n.src=window.URL.createObjectURL(e.target.files[0]),n.onload=function(){var e=n.naturalWidth,t=n.naturalHeight,r=this.state.toDo;r.image=!0,this.setState({img_w:e,img_h:t,selectedFile:n.src,toDo:r})}.bind(this)}},{key:"download_svg",value:function(){var e=this;if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");var t=this.state.selectedFile;this.state.img_name?this.setState({selectedFile:this.state.img_name.replace("href")},function(){b(e.svg.outerHTML,"dlText.svg","text/plain"),e.setState({selectedFile:t})}):b(this.svg.outerHTML,"myVessel.svg","text/plain")}},{key:"download_dxf",value:function(){if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");if(!this.scale)return void this.addNotification("You need to define a reference scale before export");var e=n(97),t={models:{}},r=1;this.state.polylines.forEach(function(n){var i=n.el.getAttribute("points"),o=e.model.mirror(new e.models.ConnectTheDots(!1,i),!1,!0);o=e.model.scale(o,this.scale/10),t.models["my-"+r+"-line"]=o,r++}.bind(this)),t.units=e.units.Meter;var i=e.exporter.toDXF(t,{units:e.unitType.Meter});b(i,"myVessel.dxf","text/plain")}},{key:"download_json",value:function(){var e=void 0,t=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(!(t.length>0))return void this.addNotification("No inner profile to export");if(t=t[0],!this.scale)return void this.addNotification("You need to define a reference scale before export");e=[],t.points.forEach(function(t){e.push([t.cx*this.scale/10,t.cy*this.scale/10*-1])}.bind(this)),e=JSON.stringify(e);var n='{ "type": "Feature",\n "geometry": {\n "type": "LineString",\n "coordinates": '+e+'\n },\n "properties": {\n "title": "myVessel",\n "description": "",\n "author": "'+void 0+'"\n }\n }';this.addNotification("Export completed"),b(n,"myVessel.json","text/plain")}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{id:"container"},s.a.createElement(h.a,{notification:this.state.notification}),s.a.createElement("h2",null,"Draw"),s.a.createElement("section",{id:"drawing"},s.a.createElement("svg",{id:"drawing-canvas",height:"500",width:"100%",ref:function(t){e.svg=t}},s.a.createElement("g",{className:"svg-pan-zoom_viewport",id:"canvas"},s.a.createElement("image",{ref:function(t){e.bck_image=t},id:"bck-img",href:this.state.selectedFile,x:"0",y:"0",height:this.state.img_h,width:this.state.img_w}))),s.a.createElement("div",{className:"tools"},s.a.createElement("div",{id:"actions-title"},"Actions:"),s.a.createElement("div",{className:"interface-button",onClick:this.create_new_polyline.bind(this),title:"Create new line",alt:"Create new line"},"New"),s.a.createElement("div",{className:"interface-button",onClick:this.enterBreakLineMode.bind(this),title:"Break selected line",alt:"Break selected line"},"Break"),s.a.createElement("div",{className:"interface-button",onClick:this.delete_line.bind(this),title:"Delete selected line",alt:"Delete selected line"},"Delete"),s.a.createElement("div",{className:"interface-button",onClick:this.edit_line.bind(this),title:"Edit selected line",alt:"Edit selected line"},"Edit"),s.a.createElement("div",{id:"actions-title2"},"Export:"),s.a.createElement("div",{className:"interface-button",onClick:this.download_svg.bind(this),title:"Download SVG (no scaling)",alt:"Download SVG (no scaling)"},"SVG"),s.a.createElement("div",{className:"interface-button",onClick:this.download_dxf.bind(this),title:"Download all-lines as DXF (scaled: 1 unit = 1 meter)",alt:"Download all-lines as DXF (scaled: 1 unit = 1 meter)"},"DXF"),s.a.createElement("div",{className:"interface-button",onClick:this.download_json.bind(this),title:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)",alt:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)"},"JSON"))),s.a.createElement("section",{id:"polylines"},s.a.createElement("div",{id:"layer-title"},"Layers:"),this.state.toDo.image&&s.a.createElement("div",{id:"image-layer",className:"polyline-layer"},s.a.createElement("div",{className:"slidecontainer"},s.a.createElement("label",{htmlFor:"myRange"},"Rotate image"),s.a.createElement("input",{type:"number",min:"0",max:"360",defaultValue:"0",className:"slider",id:"myRange",step:"0.01",onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(t){return s.a.createElement(p.a,{key:t.id,name:t.name,type:t.type,id:t.id,delete_line:e.delete_line.bind(e),edit_line:e.edit_line.bind(e),colorChange:e.colorChange.bind(e),typeChange:e.typeChange.bind(e),selectLayer:e.selectLayer.bind(e),selectedPoly:e.state.active_polyline?e.state.active_polyline.id:""})})),s.a.createElement("div",{className:"basic-info"},"Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ",s.a.createElement("code",null,"Esc")," or ",s.a.createElement("code",null,"q")," to quit editing mode and deselect."),s.a.createElement(d.a,{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),s.a.createElement(v.a,{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}))}}]),t}(a.Component);t.a=w},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(29),o=n(79),a=n(30),s=function(){function e(e,t){for(var n=0;n0&&this.points.length>e&&t.cx!==this.points[e-1].cx&&t.cy!==this.points[e-1].cy){var n=new o.a([(t.cx+this.points[e-1].cx)/2,(t.cy+this.points[e-1].cy)/2],e,this.zoom);this.midpoints.push(n)}e++}.bind(this)),this.midpoints.forEach(function(e){this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.create)}.bind(this))}},{key:"create",value:function(e){var t=e.target.getAttribute("index"),n=new i.a([parseFloat(e.target.getAttribute("cx")),parseFloat(e.target.getAttribute("cy"))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(t,n)}},{key:"addPointInMiddle",value:function(e,t){this.points.splice(e,0,t),this.canvas.appendChild(t.el),t.draw(),t.edit(),t.select(),this.draw()}},{key:"pointsTo",value:function(){var e="";return this.points.forEach(function(t){e+=t.cx+", "+t.cy+" "}),e}},{key:"add_point",value:function(e){var t=this.get_point(e);if("max_fill"===this.type){var n=[-1e6,t[1]];return this.appendPoint(n),n=[1e6,t[1]],void this.appendPoint(n)}if("center"===this.type){var r=[t[0],-1e6];return this.appendPoint(r),r=[t[0],1e6],void this.appendPoint(r)}this.appendPoint(t)}},{key:"appendPoint",value:function(e){window.snapping_points.push([e[0],e[1]]);var t=new i.a([e[0],e[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(t),this.draw(),1===this.points.length&&(window.addEventListener("mousemove",this.previewPoint),window.addEventListener("keyup",this.stopEditing))}},{key:"get_point",value:function(e){var t=this.canvas.transform.baseVal[0].matrix,n=[(e.pageX-t.e-this.x)/t.a,(e.pageY-t.f-this.y)/t.a];return this.snapPoint(n)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1&&Object(o.a)(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var o=n(84);t.a=function(e){if((n=e.length)<3)return null;var t,n,o=new Array(n),a=new Array(n);for(t=0;t=0;--t)f.push(e[o[s[t]][2]]);for(t=+u;ts!==u>s&&a<(l-n)*(s-r)/(u-r)+n&&(c=!c),l=n,u=r;return c}},function(e,t,n){"use strict";t.a=function(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],s=o[1],l=0;++r=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(t){return e.handleMouseWheel(t)},r.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(r.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!1)},l.prototype.handleMouseWheel=function(e){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&0===e.deltaMode&&e.wheelDelta&&(t=0===e.deltaY?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var i=this.svg.getScreenCTM().inverse(),o=a.getEventPoint(e,this.svg).matrixTransform(i),s=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(s,o)}},l.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e/=this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var i=this.viewport.getCTM(),o=t.matrixTransform(i.inverse()),a=this.svg.createSVGMatrix().translate(o.x,o.y).scale(e).translate(-o.x,-o.y),s=i.multiply(a);s.a!==i.a&&this.viewport.setCTM(s)},l.prototype.zoom=function(e,t){this.zoomAtPoint(e,a.getSvgCenterPoint(this.svg,this.width,this.height),t)},l.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)},l.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),"SVGPoint"!==o.getType(t)){if(!("x"in t&&"y"in t))throw new Error("Given point is invalid");t=a.createSVGPoint(this.svg,t.x,t.y)}this.zoomAtPoint(e,t,n)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){if((e.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control")>-1)return!1}var t;t=e.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=a.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(t,n)},l.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),o.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&o.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var t=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}},l.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.center=function(){var e=this.viewport.getViewBox(),t=.5*(this.width-(e.width+2*e.x)*this.getZoom()),n=.5*(this.height-(e.height+2*e.y)*this.getZoom());this.getPublicInstance().pan({x:t,y:n})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)},l.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)},l.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}},l.prototype.resize=function(){var e=a.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=null===t?null:o.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,i.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,i.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=null===t?null:o.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var c=[],f=function(e,t){var n=o.getSvg(e);if(null===n)return null;for(var r=c.length-1;r>=0;r--)if(c[r].svg===n)return c[r].instance.getPublicInstance();return c.push({svg:n,instance:new l(n,t)}),c[c.length-1].instance.getPublicInstance()};e.exports=f},function(e,t){e.exports=function(){function e(e,t,n){var r=function(e){!e&&(e=window.event);var n={originalEvent:e,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,delatZ:0,preventDefault:function(){e.preventDefault?e.preventDefault():e.returnValue=!1}};return"mousewheel"==u?(n.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(n.deltaX=-.025*e.wheelDeltaX)):n.deltaY=e.detail,t(n)};return f.push({element:e,fn:r,capture:n}),r}function t(e,t){for(var n=0;n2096103.424&&v!==d))return navigator.msSaveBlob?navigator.msSaveBlob(i(f),m):o(f);f=i(f),c=f.type||u}else if(/([\x80-\xff])/.test(f)){var g=0,b=new Uint8Array(f.length),w=b.length;for(g;g0?[e.substr(0,n),e.substr(n+1)]:["",e]}function splitDecimal(e){var t=e.toString();return t.indexOf("e")>0&&(t=e.toFixed(20).match(/.*[^(0+$)]/)[0]),split(t,".")}function round(e,t){if(void 0===t&&(t=1e-7),e%1===0)return e;var n=1-String(Math.ceil(1/t)).length;if("undefined"===typeof n||0===+n)return Math.round(e);if(e=+e,n=+n,isNaN(e)||"number"!==typeof n||n%1!==0)return NaN;if(e<0)return-round(-e,t);var r=split(e.toString(),"e");return e=Math.round(+(r[0]+"e"+(r[1]?+r[1]-n:-n))),r=split(e.toString(),"e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}function createRouteKey(e){for(var t=[],n=0;n0?".":"")+i:JSON.stringify([i]),t.push(r)}return t.join("")}function travel(e,t){if(!e||!t)return null;var n;n=Array.isArray(t)?t:JSON.parse(t);for(var r=n.slice(),i=e,o=e.origin||[0,0];r.length;){if(!(i=i[r.shift()]))return null;i.origin&&r.length&&(o=MakerJs.point.add(o,i.origin))}return{result:i,offset:o}}function cloneObject(e){return clone(e)}function extendObject(e,t){if(e&&t)for(var n in t)"undefined"!==typeof t[n]&&(e[n]=t[n]);return e}function isFunction(e){return"function"===typeof e}function isNumber(e){return"number"===typeof e}function isObject(e){return"object"===typeof e}function isPoint(e){return e&&Array.isArray(e)&&2==e.length&&isNumber(e[0])&&isNumber(e[1])}function isPath(e){return e&&e.type&&isPoint(e.origin)}function isPathLine(e){return isPath(e)&&e.type==MakerJs.pathType.Line&&isPoint(e.end)}function isPathCircle(e){return isPath(e)&&e.type==MakerJs.pathType.Circle&&isNumber(e.radius)}function isPathArc(e){return isPath(e)&&e.type==MakerJs.pathType.Arc&&isNumber(e.radius)&&isNumber(e.startAngle)&&isNumber(e.endAngle)}function isPathArcInBezierCurve(e){return isPathArc(e)&&isObject(e.bezierData)&&isNumber(e.bezierData.startT)&&isNumber(e.bezierData.endT)}function isModel(e){return e&&(e.paths||e.models)}function isChain(e){var t=e;return t&&t.links&&Array.isArray(t.links)&&isNumber(t.pathLength)}function $(e){return isModel(e)?new Cascade(MakerJs.model,e):isPath(e)?new Cascade(MakerJs.path,e):isPoint(e)?new Cascade(MakerJs.point,e):void 0}MakerJs.version="debug",MakerJs.environmentTypes={BrowserUI:"browser",NodeJs:"node",WebWorker:"worker",Unknown:"unknown"},MakerJs.environment=detectEnvironment(),MakerJs.unitType={Centimeter:"cm",Foot:"foot",Inch:"inch",Meter:"m",Millimeter:"mm"},MakerJs.splitDecimal=splitDecimal,MakerJs.round=round,MakerJs.createRouteKey=createRouteKey,MakerJs.travel=travel;var clone=__webpack_require__(98);MakerJs.cloneObject=cloneObject,MakerJs.extendObject=extendObject,MakerJs.isFunction=isFunction,MakerJs.isNumber=isNumber,MakerJs.isObject=isObject,MakerJs.isPoint=isPoint,MakerJs.isPath=isPath,MakerJs.isPathLine=isPathLine,MakerJs.isPathCircle=isPathCircle,MakerJs.isPathArc=isPathArc,MakerJs.isPathArcInBezierCurve=isPathArcInBezierCurve,MakerJs.pathType={Line:"line",Circle:"circle",Arc:"arc",BezierSeed:"bezier-seed"},MakerJs.isModel=isModel,MakerJs.isChain=isChain;var Cascade=function(){function e(e,t){this._module=e,this.$initial=t;for(var n in this._module)this._shadow(n);this.$result=t}return e.prototype._shadow=function(e){var t=this;this[e]=function(){return t._apply(t._module[e],arguments)}},e.prototype._apply=function(e,t){var n=[].slice.call(t);return n.unshift(this.$result),this.$result=e.apply(void 0,n),this},e.prototype.$reset=function(){return this.$result=this.$initial,this},e}();MakerJs.$=$}(MakerJs||(MakerJs={})),module.exports=MakerJs;var MakerJs;!function(e){!function(t){function n(t){return e.splitDecimal(t)[1]}function r(t,n){return n?+(e.splitDecimal(t)[0]+"."+n):t}function i(e,t){return e<0&&t<0||e>0&&t>0?r(t,n(e)):t}function o(e){var t=Math.floor(e/360);return 0===t?e:i(e,e-360*t)}function a(e){return o(e)*Math.PI/180}function s(e){return 180*e/Math.PI}function l(e){if(e.endAngle360?o(i):i}function f(e){return o(s(h(e.origin,e.end)))}function p(e,t){return s(h(e,t))}function h(t,n){var r=e.point.subtract(n,t),i=r[0],o=r[1];return Math.atan2(-o,-i)+Math.PI}function d(e,t,n){return n&&(e=360-e),t&&(e=(e<180?180:540)-e),e}function v(e,t){if(e){var n=e.walkedPath.pathContext,r=y[n.type];if(r)return r(n,t,e.reversed)}}function m(e,t){if(arguments.length<2)return null;var n=[e,t].map(function(e,t){return v(e,0===t)}),r=o(f(n[1])-f(n[0]));return r>180&&(r-=360),r}t.noRevolutions=o,t.toRadians=a,t.toDegrees=s,t.ofArcEnd=l,t.ofArcMiddle=u,t.ofArcSpan=c,t.ofLineInDegrees=f,t.ofPointInDegrees=p,t.ofPointInRadians=h,t.mirror=d;var y={};y[e.pathType.Arc]=function(t,n,r){var i=n!=r,o=i?t.endAngle-90:t.startAngle+90,a=e.point.fromArc(t)[i?1:0],s=e.point.rotate(e.point.add(a,[t.radius,0]),o,a);return new e.paths.Line(n?[s,a]:[a,s])},y[e.pathType.Line]=function(t,n,r){return r?new e.paths.Line(t.end,t.origin):t},t.ofChainLinkJoint=m}(e.angle||(e.angle={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=i(e);if(!t)return r;for(var o=2;o--;)n?r[o]-=t[o]:r[o]+=t[o];return r}function r(e,t){function n(n){return(e[n]+t[n])/2}return[n(0),n(1)]}function i(e){return e?[e[0],e[1]]:t.zero()}function o(t,n){for(var r={index:0,distance:-1},i=0;i=o?null:(i(t,o,n,r),t)}return null}function m(t,n){if(1==n)return[e.point.middle(t)];var r=[],i=n;t.type!=e.pathType.Circle&&i--;for(var o=0;op[0].size?p.push(s):p.unshift(s);s=p[l?1:0]}this.origin=s.origin,this.startAngle=s.startAngle,this.endAngle=s.endAngle;break;case 4:this.origin=n[0],this.radius=n[1],this.startAngle=n[2],this.endAngle=n[3];break;case 3:if(e.isPoint(n[2])){r.apply(this,n);for(var d=[],h=0;h<3;h++)d.push(e.angle.ofPointInDegrees(this.origin,n[h]));this.startAngle=d[0],this.endAngle=d[2],e.measure.isBetweenArcAngles(d[1],this,!1)||(this.startAngle=d[2],this.endAngle=d[0]);break}case 2:var u=n[2];r.call(this,n[0],n[1]),this.startAngle=e.angle.ofPointInDegrees(this.origin,n[u?1:0]),this.endAngle=e.angle.ofPointInDegrees(this.origin,n[u?0:1])}this.type=e.pathType.Arc}return t}();t.Arc=n;var r=function(){function t(){for(var t=[],n=0;n0){for(var m=null,y=0;!m&&y1&&e(n.key,n.items)}},e}();e.Collector=t;var n=__webpack_require__(103),r=function(){function t(){this.reset()}return t.prototype.reset=function(){this.insertedCount=0,this.graph={},this.index={},this.merged={},this.values=[]},t.prototype.insertValue=function(e){return this.values.push(e),this.values.length-1},t.prototype.insertValueIdAtPoint=function(e,t){var n=t[0],r=t[1];this.graph[n]||(this.graph[n]={});var i,o,a=this.graph[n],s=r in a;return s?(o=a[r],o in this.merged&&(o=this.merged[o]),i=this.index[o],i.valueIds.push(e)):(a[r]=o=this.insertedCount++,i={pointId:o,point:t,valueIds:[e]},this.index[o]=i),{existed:s,pointId:o}},t.prototype.mergePoints=function(e){var t=this,r=[],i=[];for(var o in this.index){var a=this.index[o],s=a.point;a.kdId=r.length,r.push(s),i.push(a)}this.kdbush=n(r);var l=this;for(var o in this.index)!function(n){if(n in l.merged)return"continue";var r=l.index[n];l.kdbush.within(r.point[0],r.point[1],e).forEach(function(e){e!==r.kdId&&t.mergeIndexElements(r,i[e])})}(o)},t.prototype.mergeNearestSinglePoints=function(t){var r=this,i=[];for(var o in this.index){var a=this.index[o];1===a.valueIds.length&&i.push(a)}this.kdbush=n(i.map(function(e){return e.point})),i.forEach(function(n){if(!(n.pointId in r.merged)){var o=r.kdbush.within(n.point[0],n.point[1],t),a=[];o.forEach(function(t){var r=i[t];r.pointId!==n.pointId&&a.push({el:r,distance:e.measure.pointDistance(r.point,n.point)})}),a.sort(function(e,t){return e.distance-t.distance});for(var s=0;s0?r.mergeIndexElements(l,n):r.mergeIndexElements(n,l))}}})},t.prototype.mergeIndexElements=function(e,t){return e.merged=e.merged||[],e.merged.push(t.pointId),this.merged[t.pointId]=e.pointId,e.valueIds.push.apply(e.valueIds,t.valueIds),delete this.index[t.pointId],e.pointId},t.prototype.forEachPoint=function(e){for(var t=this,n=0;n0&&e(r.point,r.valueIds.map(function(e){return t.values[e]}),n,r)}}},t.prototype.getIdOfPoint=function(e){var t=this.graph[e[0]];if(t){var n=t[e[1]];if(n>=0)return n in this.merged?this.merged[n]:n}},t.prototype.getElementAtPoint=function(e){var t=this.getIdOfPoint(e);if(t>=0)return this.index[t]},t}();e.PointGraph=r}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=0;do{var i=e[r];do{for(var o=!1,a=r+1;a0?(n.origin=o.low,n.end=o.high):(n.origin[0]=o.low[0],n.end[0]=o.high[0]):(n.origin[1]=o.low[1],n.end[1]=o.high[1])})}),r}t.simplify=r}(e.model||(e.model={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){if(!e)return null;var r=null,o=i[e.type];return o&&(r=o(e,t,n),r.origin=e.origin),r}function r(t,n,r,i){var o=e.angle.ofArcSpan(t),a=1;o>=270?a=4:o>180?a=3:(o>150||n)&&(a=2);for(var s=e.angle.toRadians(o/a),l=e.models.Polygon.circumscribedRadius(t.radius,s),u=e.point.fromArc(t),c=[e.point.subtract(u[0],t.origin)],f=e.angle.toRadians(t.startAngle)+s/2,p=0;p=0))return!1;return!0}function v(t){var n=t.end[0]-t.origin[0];if(0==e.round(n,1e-6))return{line:t,hasSlope:!1};var r=t.end[1]-t.origin[1],i=r/n;return{line:t,hasSlope:!0,slope:i,yIntercept:t.origin[1]-i*t.origin[0]}}function m(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function y(e,t,n){return[n(e[0],t[0]),n(e[1],t[1])]}function g(t,n){if(t){var r=N[t.type];if(r){var i=r(t);return n&&(i.high=e.point.add(i.high,n),i.low=e.point.add(i.low,n)),i}}return{low:null,high:null}}function b(e){if(e){var t=I[e.type];if(t)return t(e)}return 0}function w(t){var n=0;return e.model.walk(t,{onPath:function(e){n+=b(e.pathContext)}}),n}function x(t){return{high:e.point.clone(t.high),low:e.point.clone(t.low)}}function k(t,r){function i(t,i){if(i){var o=t.slice(0,-2),a=e.createRouteKey(o);a in r.modelMap?n(r.modelMap[a],i):r.modelMap[a]=x(i)}}r||(r=new j(t));var o={onPath:function(e){e.routeKey in r.pathMap||(r.pathMap[e.routeKey]=g(e.pathContext,e.offset)),i(e.route,r.pathMap[e.routeKey])},afterChildWalk:function(e){i(e.route,r.modelMap[e.routeKey])}};e.model.walk(t,o),r.modelsMeasured=!0;var a=r.modelMap[""];return a?E(a):a}function E(t){var n=t;return n.center=e.point.average(n.high,n.low),n.width=n.high[0]-n.low[0],n.height=n.high[1]-n.low[1],n}function _(e,t){return t>=e?t-e:t<0?t+e:t}function P(e,t){return e.slope*t+e.yIntercept}function C(e,t){return[t,P(v(e),t)]}function T(n){for(var r=1;r<3;r++)if(!t.isPointEqual(n[0].center,n[r].center,1e-6)||0!==e.round(n[0].width-n[r].width))return!1;return!0}function S(t,n,r,i){e.model.rotate(n,r);var o=k(n),a={index:t,rotation:i,center:e.point.rotate(o.center,i),width:o.height,height:o.width,bottom:new e.paths.Line(o.low,[o.high[0],o.low[1]]),middle:new e.paths.Line([o.low[0],o.center[1]],[o.high[0],o.center[1]]),top:new e.paths.Line(o.high,[o.low[0],o.high[1]])};return[a.top,a.middle,a.bottom].forEach(function(t){return e.path.rotate(t,i)}),a}function A(t,n){var r=t[1].origin,i=r[0],o=t[3].origin[0],a=t[0].origin[0],s=i-a;if(a-o>2*s)return null;var l=(i-o)/3;if(sp[1]?0:1,d=p[h];if(d>c){var v=e.solvers.equilateralAltitude(d),m=i-2*v;if(a>m+v)return null;if(o=u.height)return n(c,u.center,"solved by bound "+o.length);o.push(u)}if(T(o))return n(e.solvers.equilateralSide(o[0].width/2),o[0].center,"solved as circular");var f=o.map(function(e){return e.top}).concat(o.map(function(e){return e.bottom}));f.forEach(function(t,n){a.paths[n]=t,e.path.converge(f[_(6,n+2)],t,!0)}),o.forEach(function(e,t){a.paths["m"+t]=e.middle});for(var p,h=o.slice(),d=0;d<6;d++){d>0&&(f.push(f.shift()),h.push(h.shift()),e.model.rotate(a,-60));var v=A(f,h);v&&(!p||v.radius=o+n.radius||n.radius>=o+t.radius)return null;if(r&&t.radius+n.radius>=o)return null;var a;if(r||0!=e.round(t.radius-n.radius)){var s=o/2,l=new e.paths.Circle([s,0],s),u=new e.paths.Circle(t.radius>n.radius?[0,0]:[o,0],r?t.radius+n.radius:Math.abs(t.radius-n.radius)),c=e.path.intersection(u,l);if(!c||!c.path1Angles)return null;a=c.path1Angles}else a=[90,270];var f=e.angle.ofLineInDegrees(i);return a.map(function(t){return e.angle.noRevolutions(t+f)})}var s=Math.sqrt(3)/2;t.equilateralAltitude=n,t.equilateralSide=r,t.solveTriangleSSS=i,t.solveTriangleASA=o,t.circleTangentAngles=a}(e.solvers||(e.solvers={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,n,r,i){var o=r?[n.path2Offset,n.path1Offset]:[n.path1Offset,n.path2Offset];t.moveTemporary(e,o,i)}function r(e){var t=e.path1Angles;return e.path2Angles?e.path1Angles=e.path2Angles:delete e.path1Angles,t&&(e.path2Angles=t),e}function i(e,t,n){if(void 0===n&&(n={}),e&&t){var r=c[e.type][t.type];if(r)return r(e,t,n)}return null}function o(e,t){for(var n=2;n--;)if(e[n]===t)return n}function a(t,n){for(var r=[],i=0;i=180?u-360:u;t.rotate(l,-c,e.point.zero());var f=e.round(l.origin[1]),p=Math.abs(f);if(p>s)return null;var h=[];if(p==s){if(i.excludeTangents)return null;h.push(o(f>0?90:270))}else{var d=Math.asin(f/s),v=e.angle.toDegrees(d),m=Math.cos(d)*s;a(-m,180-v),a(m,v)}return h.length>0?h:null}function u(n,r,i){function o(t){var n=t+u;return e.angle.noRevolutions(n)}function a(t){return[o(t),o(e.angle.mirror(t,!1,!0))]}if(n.radius<=0||r.radius<=0)return null;if(n.radius==r.radius&&e.measure.isPointEqual(n.origin,r.origin,1e-4))return i.out_AreOverlapped=!0,null;var s=(e.point.subtract(e.point.zero(),n.origin),new e.paths.Circle(e.point.zero(),n.radius)),l=new e.paths.Circle(e.point.subtract(r.origin,n.origin),r.radius),u=e.angle.ofPointInDegrees(e.point.zero(),l.origin);t.rotate(l,-u,e.point.zero());var c=l.origin[0];if(0==e.round(l.radius-c-s.radius))return i.excludeTangents?null:[[o(180)],[o(180)]];if(0==e.round(l.radius+c-s.radius))return i.excludeTangents?null:[[o(0)],[o(0)]];if(0==e.round(c-l.radius-s.radius))return i.excludeTangents?null:[[o(0)],[o(180)]];if(e.round(c-l.radius)>s.radius)return null;if(e.round(c+l.radius)1))return!1;i[s].shardPoint=l.intersectionPoints[1]}}return!0}function o(e,n){var r=t.clone(e);return[r,t.breakAtPoint(r,n)]}function a(e,t,n){var r=null,i=d[e.path.type];return i&&(r=i(e.path,t,n,e.shardPoint,e.isStart)),r}function s(e,t,n){var r=null,i=v[e.path.type];return i&&(r=i(e.path,e.propertyName,t,n)),u(e,r)||(r=null),r}function l(t,n){var r={filletAngle:e.angle.ofPointInDegrees(n,t.shardPoint),clipPath:function(){t.path[t.propertyName]=t.shardPoint}};return u(t,r)||(r=null),r}function u(t,n){var r=!1;if(n){var i=t.path[t.propertyName];n.clipPath(),e.measure.pathLength(t.path)>0&&(r=!0),t.path[t.propertyName]=i}return r}function c(t){for(var n=0,r=[],i=0;i0){var s={pointMatchingDistance:.005};e.extendObject(s,a);var u=r(t,n,a);if(u){var f=c([t,n]),p=new e.paths.Line(u[0].oppositePoint,u[1].oppositePoint),h=e.point.middle(p,f),d=e.angle.ofPointInDegrees(u[0].point,h),v=e.point.add(u[0].point,e.point.fromPolar(e.angle.toRadians(d),o));if(!i(o,v,u,s))return null;for(var m=[],y=0;y<2;y++){var g=l(u[y],v);if(!g)return null;m.push(g)}var b=new e.paths.Arc(v,o,m[0].filletAngle,m[1].filletAngle);return e.round(e.angle.noRevolutions(e.angle.ofArcMiddle(b)))==e.round(d)&&(b.startAngle=m[1].filletAngle,b.endAngle=m[0].filletAngle),m[0].clipPath(),m[1].clipPath(),b}}return null}function p(n,o,l,u){if(n&&o&&l&&l>0){var c={pointMatchingDistance:.005};e.extendObject(c,u);var f=r(n,o,u);if(f){if(!i(l,f[0].point,f,c))return null;for(var p=[],h=0;h<2;h++){var d=f[1-h].shardPoint;if(!d)return null;var v=a(f[h],l,d);p.push(v)}var m=t.intersection(p[0],p[1]);if(m){var y;y=1==m.intersectionPoints.length?m.intersectionPoints[0]:e.point.closest(f[0].point,m.intersectionPoints);for(var g=[],h=0;h<2;h++){var b=s(f[h],l,y);if(!b)return null;g.push(b)}if(0==e.round(g[0].filletAngle-g[1].filletAngle))return null;var w=new e.paths.Arc(y,l,g[0].filletAngle,g[1].filletAngle),x=e.angle.ofArcSpan(w);return 180==x?null:(x>180&&(w.startAngle=g[1].filletAngle,w.endAngle=g[0].filletAngle),g[0].clipPath(),g[1].clipPath(),w)}}}return null}var h={};h[e.pathType.Arc]=function(e){return["startAngle","endAngle"]},h[e.pathType.Line]=function(e){return["origin","end"]};var d={};d[e.pathType.Arc]=function(t,n,r,i,a){var s=t.radius,l=o(t,i)[a?0:1];return l?(e.measure.isArcConcaveTowardsPoint(l,r)?s-=n:s+=n,e.round(s)<=0?null:new e.paths.Arc(t.origin,s,t.startAngle,t.endAngle)):null},d[e.pathType.Line]=function(t,n,r,i,o){return new e.paths.Parallel(t,n,r)};var v={};v[e.pathType.Arc]=function(t,n,r,i){var o=new e.paths.Line(t.origin,i),a=e.angle.ofLineInDegrees(o),s=a;return e.measure.isArcConcaveTowardsPoint(t,i)||(s+=180),{filletAngle:e.angle.noRevolutions(s),clipPath:function(){t[n]=a}}},v[e.pathType.Line]=function(n,r,i,o){var a=new e.paths.Line([0,0],[0,1]),s=e.angle.ofLineInDegrees(n);t.rotate(a,s,[0,0]),t.moveRelative(a,o);var l=e.point.fromSlopeIntersection(n,a);return l?{filletAngle:e.angle.ofPointInDegrees(o,l),clipPath:function(){n[r]=l}}:null},t.dogbone=f,t.fillet=p}(e.path||(e.path={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){return i(!1,e,t)}function r(e,t){return i(!0,e,t)}function i(t,n,r){function i(n,i){var l=s[n].walkedPath,u=s[i].walkedPath;l.modelContext===u.modelContext&&l.modelContext.type==e.models.BezierCurve.typeName||e.path.moveTemporary([l.pathContext,u.pathContext],[l.offset,u.offset],function(){var c;if(e.isObject(r)){var f=e.angle.ofChainLinkJoint(s[n],s[i]);if(0===e.round(f))return;c=f>0?r.left:r.right}else c=r;if(c&&!(c<0)){var p;p=t?e.path.fillet(l.pathContext,u.pathContext,c):e.path.dogbone(l.pathContext,u.pathContext,c),p&&(o.paths["fillet"+a]=p,a++)}})}for(var o={paths:{}},a=0,s=n.links,l=1;l1&&(r.endless=!0);break}t=u}}e.forEachPoint(function(e,n,o,a){if(a.valueIds.length>0){var s={links:[],pathLength:0};if(i(n[0],s,n[0]),s.endless)t(s,!1);else{s.links.reverse();var l=s.links[0];s.links.map(function(e){e.reversed=!e.reversed}),s.pathLength-=s.links[s.links.length-1].pathLength;i(s.links.pop(),s,l),s.links.length>1?t(s,!0):r(s.links[0].walkedPath)}}})}function i(e){var t=null;return a(e,function(e,n,r){t=e[0]},{byLayers:!1}),t}function o(e,t){var n=t===e.reversed?1:0;return e.endPoints[n]}function a(n){for(var i=[],a=1;a0){r.tempPaths=r.paths;var s={};a.forEach(function(e,t){e.layer=o,s["seed_"+t]=e}),r.paths=s}}}else"tempPaths"in r&&(r.paths=r.tempPaths,delete r.tempPaths),"tempLayer"in r&&(void 0==r.tempLayer?delete r.layer:r.layer=r.tempLayer,delete r.tempLayer)})}t.findSingleChain=i,t.findChains=a}(e.model||(e.model={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){if(void 0===t&&(t=1),e.endless){for(var n=Math.abs(t),r=0;r0&&n(e,r),e}}function o(t,n){void 0===n&&(n=!1);for(var r={paths:{}},i=0;i0;){var h=l/p;if(c.reversed&&(h=1-h),o.push(e.point.add(e.point.middle(f.pathContext,h),f.offset)),r&&o.length>=r)return o;var d;if(i){if(d=i[s],++s>i.length)return o}else d=n;l+=d}l-=p}return a(t.endless,o),o}function l(t,n){for(var r=[],i=0;i0){o.reversed&&l.reverse(),i>0&&l.shift();var u=l.map(function(t){return e.point.add(t,s.offset)});r.push.apply(r,u)}}return a(t.endless,r),r}t.cycle=n,t.reverse=r,t.startAt=i,t.toNewModel=o,t.toPoints=s,t.toKeyPoints=l}(e.chain||(e.chain={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n,i){var o={pointMatchingDistance:t||.005,keep:n},a=new r(e,o),s=a.findDeadEnds();return s.length0&&this.appendQueue(o,n)},n.prototype.removeValue=function(e,t){var n=e.valueIds.indexOf(t);n>=0&&e.valueIds.splice(n,1)},n.prototype.appendQueue=function(e,t){var n=this.ordinals[e.pointId];n":">",'"':"""};for(var n in t)e=e.split(n).join(t[n]);return e},e.prototype.getOpeningTag=function(t){var n="";for(var r in this.attrs)!function(t,r){null!=r&&"undefined"!==typeof r&&((Array.isArray(r)||"object"===typeof r)&&(r=JSON.stringify(r)),"string"===typeof r&&(r=e.escapeString(r)),n+=" "+t+'="'+r+'"')}(r,this.attrs[r]);return"<"+this.name+n+(t?"/":"")+">"},e.prototype.getInnerText=function(){return this.innerTextEscaped?this.innerText:e.escapeString(this.innerText)},e.prototype.getClosingTag=function(){return""},e.prototype.toString=function(){return this.innerText||this.closingTags?this.getOpeningTag(!1)+this.getInnerText()+this.getClosingTag():this.getOpeningTag(!0)},e}();e.XmlTag=t}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){return n?e+"("+t+")":t}function r(t,n){if(n){var r=new e.paths.Circle([0,0],t.radius),i=e.measure.pathLength(r);if(i)return Math.ceil(i/n)}}function i(t,i,o){function a(e){f?l=e+l:l+=e}var s="",l="",u=!0,c=!1,f=!1,p={};p[e.pathType.Circle]=function(t,a){var l={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),resolution:r(t,i)};s=n("CAG.circle",JSON.stringify(l),!0),c=!0},p[e.pathType.Line]=function(t,r){var i=r.endPoints.map(function(t){return e.point.rounded(t,o)});r.reversed&&i.reverse(),s=n("new CSG.Path2D",JSON.stringify(i),!0)},p[e.pathType.Arc]=function(t,a){var l=e.angle.ofArcEnd(t);a.reversed&&(f=!0);var u={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),startangle:e.round(t.startAngle,o),endangle:e.round(l,o),resolution:r(t,i)};s=n("new CSG.Path2D.arc",JSON.stringify(u),!0)};var h={};h[e.pathType.Line]=function(t,r){var i=f!=r.reversed,s=e.point.rounded(r.endPoints[i?0:1],o);a(n(".appendPoint",JSON.stringify(s),!0))},h[e.pathType.Arc]=function(t,s){var l=f!=s.reversed,u=e.angle.ofArcEnd(t),c={radius:e.round(t.radius,o),clockwise:l,large:Math.abs(u-t.startAngle)>180,resolution:r(t,i)},p=e.point.rounded(s.endPoints[l?0:1],o);a(n(".appendArc",JSON.stringify(p)+","+JSON.stringify(c),!0))};for(var d=0;d0&&r.subtracts.push(i)}c.total++,e in u||(u[e]=[]),u[e].unshift(r)}})}void 0===o&&(o={});var u={},c={total:0,complete:0},f={pointMatchingDistance:o.pointMatchingDistance,byLayers:o.byLayers,contain:!0};o.statusCallback&&o.statusCallback({progress:25});var p=e.model.findChains(i,f);if(Array.isArray(p))l("",p);else for(var h in p)l(h,p[h]);o.statusCallback&&o.statusCallback({progress:50});var d=0;for(var h in u)d+=u[h].length;if(0===d)throw o.statusCallback&&o.statusCallback({progress:100}),"No closed geometries found.";var v={};for(var h in u){var m=u[h].map(function(e){var t=e.cag;return e.subtracts.forEach(function(e){var n=a(50,50,e);t=r(t,n)}),t});v[h]=a(50,50,m)}return o.statusCallback&&o.statusCallback({progress:100}),f.byLayers?v:v[""]}function l(e,t,n){function r(n){return a(e,t,n)}function i(e,t,n){var r=e.extrude({offset:[0,0,t]});return n&&(r=r.translate([0,0,n])),r}function o(e,t){return e.union(t)}return u(r,i,o,t,n)}function u(t,n,r,i,a){void 0===a&&(a={});var s=a.statusCallback;i.exporterOptions&&e.extendObject(a,i.exporterOptions.toJscadCSG),a.byLayers=a.byLayers||a.layerOptions&&!0,a.statusCallback=o(s,0,50);var l=t(a),u=[];if(a.byLayers)for(var c in l){var f=a.layerOptions[c],p=n(l[c],f.extrude||a.extrude,function(t,n){return e.isNumber(t)?t:n}(f.z,a.z));u.push(p)}else{var p=n(l,a.extrude,a.z);u.push(p)}a.statusCallback=o(s,50,100);var h={total:u.length-1,complete:0},d=u.shift();return u.forEach(function(e,t){d=r(d,e),h.complete++,a.statusCallback({progress:h.complete/h.total})}),d}function c(e,t){function n(e,n){return c(i(e,n,t.accuracy))}function r(e,t){return e+".union("+t+")"}function o(e,t){return e+".subtract("+t+")"}function a(i){return s(n,r,o,e,t)}function l(e,t,n){var r=e+".extrude({ offset: [0, 0, "+t+"] })";return n&&(r=r+".translate([0, 0, "+n+"])"),r}function c(e){return""+p+f+e+p}void 0===t&&(t={});var f=new Array((t.indent||0)+1).join(" "),p=t.indent?"\n":"",h=u(a,l,r,e,t).trim();return"function "+(t.functionName||"main")+"(){"+c("return "+h+";")+"}"+p}function f(e,t,n,r){var i=r.statusCallback;r.statusCallback=o(i,0,50);var a=l(e,n,r);return t.serialize(a,{binary:!1,statusCallback:o(i,50,50)})}t.toJscadCAG=a,t.toJscadCSG=l,t.toJscadScript=c,t.toJscadSTL=f}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(n,r,i){if(r){var o={origin:[0,0],stroke:"#000"};e.extendObject(o,i);var a=1,s=o.units||r.units;a=s?e.units.conversionScale(s,e.unitType.Inch):.01,a*=72;var l=e.model.scale(e.cloneObject(r),a),u=e.measure.modelExtents(l),c=-u.low[0],f=[c,u.high[1]];f=e.point.add(f,i.origin),e.model.findChains(l,function(r,i,a){function s(e){var r=t.pathToSVGPathData(e.pathContext,e.offset,f);n.path(r).stroke(o.stroke)}r.map(function(r){if(r.links.length>1){var i=t.chainToSVGPathData(r,f);n.path(i).stroke(o.stroke)}else{var a=r.links[0].walkedPath;if(a.pathContext.type===e.pathType.Circle){var l;e.path.moveTemporary([a.pathContext],[a.offset],function(){l=e.path.mirror(a.pathContext,!1,!0)}),e.path.moveRelative(l,f),n.circle(l.origin[0],l.origin[1],a.pathContext.radius).stroke(o.stroke)}else s(a)}}),i.map(s)},{byLayers:!1})}}t.toPDF=n}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(t){return e.point.mirror(t,!1,!0)}function r(t){var n=e.angle.ofArcSpan(t);t.startAngle=e.angle.noRevolutions(t.startAngle),t.endAngle=t.startAngle+n}function i(t,r,i){function o(t){return e.point.add(t,r)}for(var a=t.links[0],s=o(n(a.endPoints[a.reversed?1:0])),l=["M",e.round(s[0],i),e.round(s[1],i)],u=0;u1){var a=i(e,n,o);s[r].push(a)}else l(e.links[0].walkedPath,t);e.contains&&u(e.contains,!t)})}s[r]=[],u(e,!0),t.forEach(function(e){return l(e)})},r),s}function l(t){for(var n=[],r=1;r0?(t in T||(T[t]=[]),T[t].push(e)):C.push(e)}function l(e){function t(e,t){void 0!==t&&n.push(e+":"+t)}var n=[];return t("stroke",e.stroke),t("stroke-width",e.strokeWidth),t("fill",e.fill),n.join(";")}function u(t,n){n&&e.extendObject(t,{stroke:n.stroke,"stroke-width":n.strokeWidth,fill:n.fill,style:n.cssStyle||l(n)})}function h(e){return E.layerOptions&&E.layerOptions[e]?E.layerOptions[e]:e in t.colors?{stroke:e}:void 0}function d(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=!1),"text"!==e&&u(n,h(r)),E.scalingStroke||(n["vector-effect"]="non-scaling-stroke");var s=new t.XmlTag(e,n);s.closingTags=E.closingTags,i&&(s.innerText=i),a(s.toString(),r,o)}function v(t){var r=n(t);return e.point.scale(r,E.scale)}function m(t,n){var r=e.path.mirror(t,!1,!0);return e.path.moveRelative(e.path.scale(r,E.scale),n)}function y(t,n,r){d("text",{id:t+"_text",x:e.round(n[0],E.accuracy),y:e.round(n[1],E.accuracy)},r,t)}function g(t,n,r,i,o,a,s,l,u){d("path",{id:t,"data-route":a,d:["M",e.round(n,E.accuracy),e.round(r,E.accuracy)].concat(i).join(" ")},o),l&&y(t,s,o)}function b(e,t,n,r,i,o,a){var s=c(n,E.accuracy);g(e,t[0],t[1],s,r,i,t,o,a)}function w(t,n,r,i,o){Z[e.pathType.Circle]("",new e.paths.Circle(r,t.size/2),n,"flow",null,!1,null);var a=[-1*t.size,t.size/2];[a,e.point.mirror(a,!1,!0)].map(function(t){return new e.paths.Line(e.point.add(e.point.rotate(t,o),i),i)}).forEach(function(t){return Z[e.pathType.Line]("",t,n,"flow",null,!1,null)})}function x(e,t){H.attrs={id:e},a(H.getOpeningTag(!1),t.layer)}function k(e){a(H.getClosingTag(),e.layer)}var E={accuracy:.001,annotate:!1,origin:null,scale:1,stroke:"#000",strokeLineCap:"round",strokeWidth:"0.25mm",fill:"none",fillRule:"evenodd",fontSize:"9pt",useSvgPathOnly:!0,viewBox:!0};e.extendObject(E,o);var _,P=e.isModel(i);P&&(_=i,_.exporterOptions&&e.extendObject(E,_.exporterOptions.toSVG));var C=[],T={};if(P)_=i;else if(Array.isArray(i)){var S={};i.forEach(function(e,t){S[t]=e}),_={paths:S}}else e.isPath(i)&&(_={paths:{modelToMeasure:i}});var A=e.measure.modelExtents(_);if(!E.units){var M=t.tryGetModelUnits(i);M&&(E.units=M)}var O=t.svgUnit[E.units];if(O&&E.viewBox&&(E.scale*=O.scaleConversion),A&&!E.origin){var R=-A.low[0]*E.scale;E.origin=[R,A.high[1]*E.scale]}e.extendObject(o,E);var z;if(A&&E.viewBox){var L=e.round(A.width*E.scale,E.accuracy),N=e.round(A.height*E.scale,E.accuracy),I=[0,0,L,N],j=O?O.svgUnitType:"";z={width:L+j,height:N+j,viewBox:I.join(" ")}}var D=new t.XmlTag("svg",e.extendObject(z||{},E.svgAttrs));a(D.getOpeningTag(!1));var B={id:"svgGroup","stroke-linecap":E.strokeLineCap,"fill-rule":E.fillRule,"font-size":E.fontSize};u(B,E);var U=new t.XmlTag("g",B);if(a(U.getOpeningTag(!1)),E.useSvgPathOnly){var F={byLayers:!0};"nonzero"===E.fillRule&&(F.contain={alternateDirection:!0});var J=s(_,E.origin,F,E.accuracy);for(var V in J){var q=J[V].join(" "),W={d:q};V.length>0&&(W.id=V),d("path",W,V,null,!0)}}else{var Z={};Z[e.pathType.Line]=function(t,n,r,i,o,a,s){var l=n.origin,u=n.end;d("line",{id:t,class:i,"data-route":o,x1:e.round(l[0],E.accuracy),y1:e.round(l[1],E.accuracy),x2:e.round(u[0],E.accuracy),y2:e.round(u[1],E.accuracy)},r),a&&y(t,e.point.middle(n),r),s&&w(s,r,n.origin,n.end,e.angle.ofLineInDegrees(n))},Z[e.pathType.Circle]=function(t,n,r,i,o,a,s){var l=n.origin;d("circle",{id:t,class:i,"data-route":o,r:n.radius,cx:e.round(l[0],E.accuracy),cy:e.round(l[1],E.accuracy)},r),a&&y(t,l,r)},Z[e.pathType.Arc]=function(t,n,i,o,a,s,l){r(n);var u=e.point.fromArc(n);if(e.measure.isPointEqual(u[0],u[1]))b(t,n.origin,n.radius,i,a,s,l);else{var c=["A"];p(c,n.radius,u[1],E.accuracy,e.angle.ofArcSpan(n)>180,n.startAngle>n.endAngle),g(t,u[0][0],u[0][1],c,i,a,e.point.middle(n),s,l),l&&w(l,i,u[1],u[0],e.angle.noRevolutions(n.startAngle-90))}},Z[e.pathType.BezierSeed]=function(t,n,r,i,o,a,s){var l=[];f(l,n,E.accuracy),g(t,n.origin[0],n.origin[1],l,r,o,e.point.middle(n),a,s)};var H=new t.XmlTag("g"),Y={beforeChildWalk:function(e){return x(e.childId,e.childModel),!0},onPath:function(t){var n=Z[t.pathContext.type];if(n){var r=e.point.add(v(t.offset),E.origin);n(t.pathId,m(t.pathContext,r),t.layer,null,t.route,E.annotate,E.flow)}},afterChildWalk:function(e){k(e.childModel)}};x("0",_),e.model.walk(_,Y);for(var K in T){var X=new t.XmlTag("g",{id:K});u(X.attrs,h(K));for(var G=0;G180,r?t.startAngle>t.endAngle:t.startAngle180,t.startAngle>t.endAngle),o(i[0],a,n)},d[e.pathType.BezierSeed]=function(e,t){var n=[];return f(n,e,t),o(e.origin,n,t)},t.pathToSVGPathData=a,t.toSVGPathData=l,t.toSVG=u,t.svgUnit={},t.svgUnit[e.unitType.Inch]={svgUnitType:"in",scaleConversion:1},t.svgUnit[e.unitType.Millimeter]={svgUnitType:"mm",scaleConversion:1},t.svgUnit[e.unitType.Centimeter]={svgUnitType:"cm",scaleConversion:1},t.svgUnit[e.unitType.Foot]={svgUnitType:"in",scaleConversion:12},t.svgUnit[e.unitType.Meter]={svgUnitType:"cm",scaleConversion:100}}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(n,r){function i(e){l.paths||(l.paths={}),l.paths["p_"+ ++d]=e}function o(e){l.models||(l.models={}),l.models["p_"+ ++d]=e}function a(t,n){void 0===n&&(n=0);var r=e.point.mirror([t.data[0+n],t.data[1+n]],!1,!0);return t.absolute?r:e.point.add(r,t.from)}function s(t,n){return e.measure.isPointEqual(t.from,n)||i(new e.paths.Line(t.from,n)),n}void 0===r&&(r={});var l={},u={};u.M=function(e){return p=a(e)},u.Z=function(e){return s(e,p)},u.H=function(t){var n=e.point.clone(t.from);return t.absolute?n[0]=t.data[0]:n[0]+=t.data[0],s(t,n)},u.V=function(t){var n=e.point.clone(t.from);return t.absolute?n[1]=-t.data[0]:n[1]-=t.data[0],s(t,n)},u.L=function(e){return s(e,a(e))},u.A=function(t){var n=t.data[0],s=t.data[1],l=t.data[2],u=1===t.data[3],c=1===t.data[4],f=a(t,5),p=n!==s,h=new e.paths.Line(t.from,e.point.rotate(f,l,t.from));p&&(h=e.path.distort(h,1,n/s));var d=new e.paths.Arc(h.origin,h.end,n,u,c);if(p){if(n1&&t.push.apply(t,e.controls[1]),t.push.apply(t,e.end),n(),new Bezier(t)}function a(t){var n=t.extrema().values.map(function(t){return e.round(t)}).filter(function(e,t,n){return n.indexOf(e)===t}).sort();return 0===n.length?[0,1]:(0!==n[0]&&n.unshift(0),1!==n[n.length-1]&&n.push(1),n)}function s(e){return[e.x,e.y]}function l(t,n,r,i,o){function a(r){var a=n+l*r,u=s(t.get(a)),c=e.point.middle(i,o?1-r:r);return e.measure.pointDistance(c,u)}var l=r-n;return a(.25)+a(.75)}function u(t,n,r,i){for(var o,a,u,c=new v(t,n),f=new v(t,r),p=f,h=c,d=0,m=p;d<100;){var y=s(t.get((c.t+m.t)/2));try{o=new e.paths.Arc(c.point,y,m.point)}catch(e){if(a)return a;break}void 0===u&&(u=e.measure.isPointEqual(c.point,e.point.fromAngleOnCircle(o.endAngle,o)));if(l(t,n,m.t,o,u)<=i?(o.bezierData={startT:n,endT:m.t},h=m,a=o):p=m,h.t===p.t||a&&a!==o&&e.angle.ofArcSpan(o)-e.angle.ofArcSpan(a)<.5)return a;d++,m=new v(t,(h.t+p.t)/2)}var g=new e.paths.Line(c.point,m.point);return g.bezierData={startT:n,endT:m.t},g}function c(t,n,r,i,o,a){for(var s,l=0;iu[1]&&l.reverse();for(var c=2;c--;)if(!e.measure.isPointEqual(l[c],s[c].point))return null;return n.bezierData}function p(t,n,r,i){var o=[n.links[0],n.links[n.links.length-1]];o[0].walkedPath.pathContext.bezierData.startT>o[1].walkedPath.pathContext.bezierData.startT&&(e.chain.reverse(n),o.reverse());var a=o.map(function(e){return f(t,e.walkedPath.pathContext,e.endPoints,e.walkedPath.offset)}),s={startT:a[0]?a[0].startT:null,endT:a[1]?a[1].endT:null};return null!==s.startT&&null!==s.endT?s:n.links.length>2?(null===s.startT&&(i(n.links[0].walkedPath.pathContext,r,!0),s.startT=n.links[1].walkedPath.pathContext.bezierData.startT),null===s.endT&&(i(n.links[n.links.length-1].walkedPath.pathContext,r,!0),s.endT=n.links[n.links.length-2].walkedPath.pathContext.bezierData.endT),s):null}var h,d=!1,v=function(){function t(t,n,r){this.t=n,this.point=e.point.add(s(t.get(n)),r)}return t}(),m=function(){function t(){for(var t=[],n=0;n2&&s(a.length-1,0,!0)}return t}();t.ConnectTheDots=r,r.metaParameters=[{title:"closed",type:"bool",value:!0},{title:"points",type:"select",value:[[[0,0],[40,40],[60,20],[100,100],[60,60],[40,80]],[[0,0],[100,0],[50,87]],[-10,0,10,0,0,20],"-10 0 10 0 0 20"]}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function n(e,r,i,o){this.paths={},this.paths=new t.ConnectTheDots(!0,n.getPoints(e,r,i,o)).paths}return n.circumscribedRadius=function(e,t){return e/Math.cos(t/2)},n.getPoints=function(t,r,i,o){void 0===i&&(i=0),void 0===o&&(o=!1);var a=[],s=e.angle.toRadians(i),l=2*Math.PI/t;o&&(r=n.circumscribedRadius(r,l));for(var u=0;u0&&(this.paths.TopLeft=new e.paths.Arc([-a,s],r,90,180),this.paths.TopRight=new e.paths.Arc([a,s],r,0,90)),a&&(this.paths.Top=new e.paths.Line([-a,n],[a,n]))}return t}();t.Dome=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:25},{title:"bottomless",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(){for(var t=[],n=0;n0&&(this.paths.BottomLeft=new e.paths.Arc([o,o],o,180,270),this.paths.BottomRight=new e.paths.Arc([l,o],o,270,0),this.paths.TopRight=new e.paths.Arc([l,u],o,0,90),this.paths.TopLeft=new e.paths.Arc([o,u],o,90,180)),l-o>0&&(this.paths.Bottom=new e.paths.Line([o,0],[l,0]),this.paths.Top=new e.paths.Line([l,i],[o,i])),u-o>0&&(this.paths.Right=new e.paths.Line([r,o],[r,u]),this.paths.Left=new e.paths.Line([0,u],[0,o]))}return t}();t.RoundRectangle=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:11}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t,n){this.paths={},this.paths=new e.RoundRectangle(t,n,Math.min(n/2,t/2)).paths}return t}();e.Oval=t,t.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this;this.paths={};var l;if(a&&(l={models:{}},this.models={Caps:l}),!(i<=0||r<=0)&&(t=e.angle.noRevolutions(t),n=e.angle.noRevolutions(n),0!=e.round(t-n))){n0;f&&c("Inner",-i);var p=[];p.push(u("StartCap",t,180,0)),p.push(u("EndCap",n,0,180));if(e.measure.pointDistance(p[0].origin,p[1].origin)/2n?(i=r(l,u),o=270,a=360-e.angle.toDegrees(Math.acos(u/i)),s=[0,i]):(i=r(u,l),o=180-e.angle.toDegrees(Math.asin(l/i)),a=180,s=[i,0]);var c=new e.paths.Arc(s,i,o,a);this.paths.curve_start=c,this.paths.curve_end=e.path.moveRelative(e.path.mirror(c,!0,!0),[t,n])}return t}();t.SCurve=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i){void 0===i&&(i=!1);var o=this;this.paths={};var a;i&&(a={models:{}},this.models={Caps:a});var s=function(e,t){var n;i?(n={paths:{}},a.models[e]=n):n=o,n.paths[e]=t},l=e.angle.ofPointInDegrees(t,n),u=e.measure.pointDistance(t,n);this.paths.Top=new e.paths.Line([0,r],[u,r]),this.paths.Bottom=new e.paths.Line([0,-r],[u,-r]),s("StartCap",new e.paths.Arc([0,0],r,90,270)),s("EndCap",new e.paths.Arc([u,0],r,270,90)),e.model.rotate(this,l,[0,0]),this.origin=t}return t}();t.Slot=n,n.metaParameters=[{title:"origin",type:"select",value:[[0,0],[10,0],[10,10]]},{title:"end",type:"select",value:[[80,0],[0,30],[10,30]]},{title:"radius",type:"range",min:1,max:50,value:10}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t){this.paths={},this.paths=new e.Rectangle(t,t).paths}return t}();e.Square=t,t.metaParameters=[{title:"side",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(n,r,i,o){void 0===o&&(o=2),this.paths={},i||(i=r*t.InnerRadiusRatio(n,o));for(var a=e.Polygon.getPoints(n,r),s=e.Polygon.getPoints(n,i,180/n),l=[],u=0;u0&&t>1&&t0){var y,g={};y=c?{models:{deleted:c,char:f}}:f,e.model.combine(y,d,!1,!0,!1,!0,g),c=g.out_deleted[1]}u.models[p]=d,p++,f=d};t.forEachGlyph(r,0,0,i,l,h)}return n.glyphToModel=function(n,r,i){function o(e){u.paths||(u.paths={}),u.paths["p_"+ ++c]=e}function a(e){u.models||(u.models={}),u.models["p_"+ ++c]=e}var s,l,u={},c=0;return n.getPath(0,0,r).commands.map(function(n,r){var u=[[n.x,n.y],[n.x1,n.y1],[n.x2,n.y2]].map(function(t){if(void 0!==t[0])return e.point.mirror(t,!1,!0)});switch(n.type){case"M":s=u[0];break;case"Z":u[0]=s;case"L":e.measure.isPointEqual(l,u[0])||o(new e.paths.Line(l,u[0]));break;case"C":a(new t.BezierCurve(l,u[1],u[2],u[0],i));break;case"Q":a(new t.BezierCurve(l,u[1],u[0],i))}l=u[0]}),u},n}();t.Text=n,n.metaParameters=[{title:"font",type:"font",value:"*"},{title:"text",type:"text",value:"Hello"},{title:"font size",type:"range",min:10,max:200,value:72},{title:"combine",type:"bool",value:!1},{title:"center character origin",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={})),MakerJs.version="0.11.1";var Bezier=__webpack_require__(109)},function(e,t,n){(function(t){var n=function(){"use strict";function e(n,r,i,o){function s(n,i){if(null===n)return null;if(0==i)return n;var f,p;if("object"!=typeof n)return n;if(e.__isArray(n))f=[];else if(e.__isRegExp(n))f=new RegExp(n.source,a(n)),n.lastIndex&&(f.lastIndex=n.lastIndex);else if(e.__isDate(n))f=new Date(n.getTime());else{if(c&&t.isBuffer(n))return f=t.allocUnsafe?t.allocUnsafe(n.length):new t(n.length),n.copy(f),f;"undefined"==typeof o?(p=Object.getPrototypeOf(n),f=Object.create(p)):(f=Object.create(o),p=o)}if(r){var h=l.indexOf(n);if(-1!=h)return u[h];l.push(n),u.push(f)}for(var d in n){var v;p&&(v=Object.getOwnPropertyDescriptor(p,d)),v&&null==v.set||(f[d]=s(n[d],i-1))}return f}"object"===typeof r&&(i=r.depth,o=r.prototype,r.filter,r=r.circular);var l=[],u=[],c="undefined"!=typeof t;return"undefined"==typeof r&&(r=!0),"undefined"==typeof i&&(i=1/0),s(n,i)}function n(e){return Object.prototype.toString.call(e)}function r(e){return"object"===typeof e&&"[object Date]"===n(e)}function i(e){return"object"===typeof e&&"[object Array]"===n(e)}function o(e){return"object"===typeof e&&"[object RegExp]"===n(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=n,e.__isDate=r,e.__isArray=i,e.__isRegExp=o,e.__getRegExpFlags=a,e}();"object"===typeof e&&e.exports&&(e.exports=n)}).call(t,n(99).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"===typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function F(e){if(e=J(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function H(e){return X.toByteArray(F(e))}function Y(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var X=n(100),G=n(101),$=n(102);t.Buffer=o,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"===typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new p(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;c>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;oa?a:o+16383));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=u;for(var c=[],f=[],p="undefined"!==typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,v=h.length;d>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?p/l:p*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t,n,r,o){return new i(e,t,n,r,o)}function i(e,t,n,r,i){t=t||o,n=n||a,i=i||Array,this.nodeSize=r||64,this.points=e,this.ids=new i(e.length),this.coords=new i(2*e.length);for(var l=0;lr;){if(a-r>600){var l=a-r+1,u=n-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);i(e,t,n,Math.max(r,Math.floor(n-u*f/l+p)),Math.min(a,Math.floor(n+(l-u)*f/l+p)),s)}var h=t[2*n+s],d=r,v=a;for(o(e,t,r,n),t[2*a+s]>h&&o(e,t,r,a);dh;)v--}t[2*r+s]===h?o(e,t,r,v):(v++,o(e,t,v,a)),v<=n&&(r=v+1),n<=v&&(a=v-1)}}function o(e,t,n,r){a(e,n,r),a(t,2*n,2*r),a(t,2*n+1,2*r+1)}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var f=u.pop(),p=u.pop(),h=u.pop();if(p-h<=a)for(var d=h;d<=p;d++)s=t[2*d],l=t[2*d+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[d]);else{var v=Math.floor((h+p)/2);s=t[2*v],l=t[2*v+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[v]);var m=(f+1)%2;(0===f?n<=s:r<=l)&&(u.push(h),u.push(v-1),u.push(m)),(0===f?i>=s:o>=l)&&(u.push(v+1),u.push(p),u.push(m))}}return c}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a){for(var s=[0,e.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),f=s.pop(),p=s.pop();if(f-p<=a)for(var h=p;h<=f;h++)i(t[2*h],t[2*h+1],n,r)<=u&&l.push(e[h]);else{var d=Math.floor((p+f)/2),v=t[2*d],m=t[2*d+1];i(v,m,n,r)<=u&&l.push(e[d]);var y=(c+1)%2;(0===c?n-o<=v:r-o<=m)&&(s.push(p),s.push(d-1),s.push(y)),(0===c?n+o>=v:r+o>=m)&&(s.push(d+1),s.push(f),s.push(y))}}return l}function i(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}t.a=r},function(e,t,n){function r(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}var i;r.prototype={constructor:r,Point:function(e,t){this.x=e,this.y=t},_findPolarAngle:function(e,t){var n,r;if(!e||!t)return 0;if(n=t.x-e.x,r=t.y-e.y,0==n&&0==r)return 0;var i=57.295779513082*Math.atan2(r,n);return this.reverse?0>=i&&(i+=360):i>=0&&(i+=360),i},addPoint:function(e,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(e,t)):this.anchorPoint.y>t&&this.anchorPoint.x>e||this.anchorPoint.y===t&&this.anchorPoint.x>e||this.anchorPoint.y>t&&this.anchorPoint.x===e?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(e,t))):void this.points.push(new this.Point(e,t))},_sortPoints:function(){var e=this;return this.points.sort(function(t,n){var r=e._findPolarAngle(e.anchorPoint,t),i=e._findPolarAngle(e.anchorPoint,n);return i>r?-1:r>i?1:0})},_checkPoints:function(e,t,n){var r=this._findPolarAngle(e,t),i=this._findPolarAngle(e,n);return r>i?!(r-i>180):!(i>r)||i-r>180},getHull:function(){var e,t,n=[];if(this.reverse=this.points.every(function(e){return e.x<0&&e.y<0}),e=this._sortPoints(),3>(t=e.length))return e.unshift(this.anchorPoint),e;for(n.push(e.shift(),e.shift());;){var r,i,o;if(n.push(e.shift()),r=n[n.length-3],i=n[n.length-2],o=n[n.length-1],this._checkPoints(r,i,o)&&n.splice(n.length-2,1),0==e.length){if(t==n.length){var a=this.anchorPoint;return n=n.filter(function(e){return!!e}),n.some(function(e){return e.x==a.x&&e.y==a.y})||n.unshift(this.anchorPoint),n}e=n,t=e.length,n=[],n.push(e.shift(),e.shift())}}}},n(108)&&(void 0!==(i=function(){return r}.call(t,n,t,e))&&(e.exports=i)),"undefined"!=typeof e&&(e.exports=r)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){e.exports=n(31)},function(e,t,n){!function(){"use strict";var t=n(32),r=function(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)};r.prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map(function(e){return t.pointsToString(e.points)}).join(", ")+"]"},addCurve:function(e){this.curves.push(e),this._3d=this._3d||e._3d},length:function(){return this.curves.map(function(e){return e.length()}).reduce(function(e,t){return e+t})},curve:function(e){return this.curves[e]},bbox:function(){for(var e=this.curves,n=e[0].bbox(),r=1;r2)for(a=0;a","\"","getOpeningTag","selfClose","attrName","attrValue","getInnerText","innerTextEscaped","getClosingTag","closingTags","wrap","content","facetSizeToResolution","arcOrCircle","facetSize","chainToJscadScript","reverseTail","tail","head","exit","beginMap","circleOptions","resolution","arcOptions","startangle","endangle","appendMap","large","makePhasedCallback","originalCb","phaseStart","phaseSpan","progress","toJscadCAG","jscadCAG","jsCadCagOptions","chainToJscadCag","fromPoints","jscadCagUnion","augend","addend","union","jscadCagSubtraction","minuend","subtrahend","convertChainsTo2D","convertToT","subtraction","unionize","complete","statusCallback","subtractChains","cs","subtracts","addChains","cag","adds","chainsResult","closedCount","resultMap","flatAdds","toJscadCSG","to2D","to3D","extrude","csg","union3D","convert2Dto3D","result2D","csgs","toJscadScript","_chainToJscadScript","scriptUnion","scriptSubtraction","nl","indent","functionName","toJscadSTL","CAG","stlSerializer","serialize","binary","toPDF","exportUnits","scaledModel","single","pathData","pathToSVGPathData","chainToSVGPathData","fixedPath","svgCoords","correctArc","offsetPoint","firstPoint","chainLinkToPathDataMap","startSvgPathData","pathToExport","exportOffset","clockwiseCircle","svgPathDataMap","getPathDataByLayer","pathDataByLayer","doChains","toSVGPathData","fillRule","findChainsOptions","pathDataArrayByLayer","pathDataStringByLayer","forcePush","layers","elements","cssStyle","elOpts","addSvgAttrs","stroke-width","tagname","scalingStroke","fixPoint","pointToFix","pointMirroredY","fixPath","pathToFix","drawText","textPoint","drawPath","annotate","flow","data-route","circleInPaths","svgCircleData","addFlowMarks","arrowEnd","beginModel","modelGroup","endModel","strokeLineCap","fontSize","useSvgPathOnly","itemToExportIsModel","unitSystem","useSvgUnit","svgUnit","scaleConversion","svgAttrs","svgUnitType","svgTag","groupAttrs","stroke-linecap","fill-rule","font-size","svgGroup","layerId1","class","svgArcData","svgBezierData","layerId2","layerGroup","halfCircle","sign","final","increasing","fromSVGPathData","pathCount","getPoint","cmd","lineTo","rx","ry","decreasing","elliptic","xAxis","scaleUp","control1","control2","prevControl2","command","control","prevControl","prevCommand","commandMatches","currPoint","regexpCommands","dataString","currCmd","layout","getChildPlacement","baseline","measureParent","parentTop","cpa","xMap","childMeasure","xRatio","cp","firstX","lastX","moveAndRotate","childrenOnPath","chosenPath","onPathLength","miterAngles","childrenOnChain","onChain","rotated","chainLength","relatives","absolutes","endLink","cloneToRadial","itemToClone","rotateFn","cloneTo","dimension","margin","measureFn","moveFn","cloneToColumn","cloneToRow","cloneToGrid","xCount","yCount","margins","getMargins","cloneToAlternatingRows","spacingFn","0","spacing","xMargin","cloneToBrick","yMargin","cloneToHoneycomb","hex","ensureBezierLib","hasLib","getScratch","bezierJsPoints","BezierToSeed","getIPoint","parentRange","seedToBezier","getExtrema","getError","arcReversed","tSpan","bp","ap","getLargestArc","lastGoodArc","TPoint","upper","lower","getArcs","getActualBezierRange","endpoints","tPoints","endpointDistancetoStart","getChainBezierRange","addToLayer","endLinks","actualBezierRanges","isArrayArg0","extremaSpan","seedsByLayer","pathToAdd","piece","controlYForCircularCubic","arcSpanInRadians","controlPointsForCircularCubic","bezierSeedFromArc","maxBezierArcspan","isPointArgs0","realArgs","numArgs","distortX","distortY","subSpan","subArc","getPoints","isClosed","skipZeroDistance","numberOfSides","firstCornerAngleInDegrees","circumscribed","Holes","holeRadius","ids","BoltCircle","boltRadius","boltCount","firstBoltAngleInDegrees","BoltRectangle","Dogbone","bottomless","maxRadius","maxSide","SQRT2","ax","ay","apexes","Dome","w2","wt","RoundRectangle","wr","Oval","sweepRadius","slotRadius","selfIntersect","capRoot","Caps","addCap","tiltAngle","offsetStartAngle","offsetEndAngle","capModel","addSweep","offsetRadius","hasInner","Rectangle","outerRadius","innerRadius","radii","Ring_outer","Ring_inner","Belt","leftRadius","rightRadius","SCurve","findRadius","arcOrigin","h2","capPath","Square","Star","skipPoints","InnerRadiusRatio","outerPoints","innerPoints","allPoints","Text","font","centerCharacterOrigin","opentypeOptions","prevDeleted","prevChar","charIndex","glyph","_fontSize","charModel","glyphToModel","deleted","forEachGlyph","getPath","commands","Buffer","circular","depth","_clone","proto","__isArray","__isRegExp","__getRegExpFlags","__isDate","useBuffer","isBuffer","allocUnsafe","allParents","allChildren","__objToStr","ignoreCase","multiline","clonePrototype","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","encodingOrOffset","fromArrayBuffer","fromString","fromObject","assertSize","alloc","encoding","isEncoding","actual","write","fromArrayLike","byteOffset","isnan","SlowBuffer","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","read","indexSize","readUInt16BE","arrLength","valLength","foundIndex","hexWrite","strLen","parsed","parseInt","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","out","toHex","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","leadSurrogate","byteArray","lo","toByteArray","dst","INSPECT_MAX_BYTES","foo","subarray","poolSize","_augment","species","allocUnsafeSlow","_isBuffer","compare","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","getLens","b64","validLen","lens","placeHoldersLen","_byteLength","tmp","Arr","curByte","revLookup","tripletToBase64","num","lookup","encodeChunk","uint8","output","extraBytes","len2","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","LN2","getX","getY","nodeSize","ArrayType","KDBush","defaultGetX","defaultGetY","__WEBPACK_IMPORTED_MODULE_0__sort__","__WEBPACK_IMPORTED_MODULE_1__range__","__WEBPACK_IMPORTED_MODULE_2__within__","minX","minY","maxX","maxY","sortKD","inc","swapItem","axis","nextAxis","qx","qy","sqDist","bx","by","ConvexHullGrahamScan","anchorPoint","_findPolarAngle","_sortPoints","_checkPoints","__webpack_amd_options__","addCurve","makeBezier","term","cvalues","PreboundConstructor","convertPath","terms","normalise","matcher","ARGS","normalizePath","instruction","op","lop","instructions","instructionLength","sx","sy","cx2","cy2","normalized"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR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AGA,OAAAG,GAAAriG,OAGAx+B,EAAAD,QAAAogI","file":"static/js/main.b7eb699e.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 33);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nif (true) {\n module.exports = __webpack_require__(40);\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(50)();\n}\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = \"production\" !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(5);\n/* unused harmony reexport parsePath */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__[\"b\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return stripLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return hasBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return stripBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return stripTrailingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return parsePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createPath; });\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nvar createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (false) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return locationsAreEqual; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(5);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = Object(__WEBPACK_IMPORTED_MODULE_2__PathUtils__[\"d\" /* parsePath */])(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = Object(__WEBPACK_IMPORTED_MODULE_0_resolve_pathname__[\"a\" /* default */])(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nvar locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_1_value_equal__[\"a\" /* default */])(a.state, b.state);\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createTransitionManager);\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(11);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__[\"a\" /* default */]);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;\n };\n\n return Router;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRouter.propTypes = {\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node\n};\nRouter.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Router);\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (matchPath);\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Utils = __webpack_require__(14)\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar asap = __webpack_require__(36);\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (false) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (false) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(49);\n/* unused harmony reexport BrowserRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(58);\n/* unused harmony reexport MemoryRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(60);\n/* unused harmony reexport NavLink */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(62);\n/* unused harmony reexport Prompt */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(64);\n/* unused harmony reexport Redirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(10);\n/* unused harmony reexport Router */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(66);\n/* unused harmony reexport StaticRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(70);\n/* unused harmony reexport generatePath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(71);\n/* unused harmony reexport matchPath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(72);\n/* unused harmony reexport withRouter */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canUseDOM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return removeEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getConfirmation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return supportsHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return supportsPopStateOnHashChange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return supportsGoWithoutReloadUsingHash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isExtraneousPopstateEvent; });\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"c\" /* createLocation */])(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nLink.propTypes = {\n onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,\n innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Link);\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(24);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__[\"a\" /* default */]);\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRoute.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from \n path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRoute.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n })\n};\nRoute.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Route);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isarray = __webpack_require__(61)\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (generatePath);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i5&&arguments[5]!==undefined?arguments[5]:false;_classCallCheck(this,Point);this.cx=point[0];this.cy=point[1];this.fill='#2da7cf80';this.stroke='rgb(123, 207, 225)';this.selector=selector;this.canvas=canvas;this.x=x;this.y=y;this.zoom=zoom;this.el=document.createElementNS('http://www.w3.org/2000/svg','circle');this.select=this.select.bind(this);this.move=this.move.bind(this);this.stopEditing=this.stopEditing.bind(this);this.get_point=this.get_point.bind(this);this.old_cx=point[0];this.old_cy=point[1];this.base_size=10;this.base_stroke=5;this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;}_createClass(Point,[{key:'draw',value:function draw(){this.el.setAttribute('cx',this.cx);this.el.setAttribute('cy',this.cy);this.el.setAttribute('r',this.size);this.el.style.stroke=this.stroke;this.el.style.strokeWidth=this.strokeWidth;this.el.style.fill=this.fill;}},{key:'setSize',value:function setSize(zoom){this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;this.draw();}},{key:'edit',value:function edit(){this.el.addEventListener('click',this.select);}},{key:'clear',value:function clear(){window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);this.fill='#2da7cf80';this.cx=this.old_cx;this.cy=this.old_cy;this.draw();}},{key:'stopEditing',value:function stopEditing(){window.snapping_points.push([this.cx,this.cy]);this.old_cx=this.cx;this.old_cy=this.cy;this.fill='#2da7cf80';this.draw();window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis1||ub<0||ub>1){return false;}// Return a object with the x and y coordinates of the intersection\nvar x=x1+ua*(x2-x1);var y=y1+ua*(y2-y1);return{x:x,y:y};}function calc_vol(poly,scale){var measures=toD3(poly);var dist=(measures.centroid[0]-window.r_axis)*2*Math.PI;var vol=dist*measures.area*Math.pow(scale,3);return Math.abs(vol);}function distance(p1,p2){return Math.sqrt(Math.pow(p1[0]-p2[0],2)+Math.pow(p1[1]-p2[1],2));}function calcScale(poly,value,unit){if(!poly){return null;}var v1=[poly.points[0].cx,poly.points[0].cy];var v2=[poly.points[1].cx,poly.points[1].cy];var d=distance(v1,v2);var new_value=void 0;if(unit==='inch'){new_value=value*2.54;}else{new_value=value;}var pro=new_value/d/10;return pro;}function toD3(poly){var points_array=[];poly.forEach(function(point){points_array.push([point.cx,point.cy]);});return{centroid:d3.polygonCentroid(points_array),area:d3.polygonArea(points_array)};}function cleanedPoly(array){var points=[];var x=0;array.forEach(function(el){if(xend.cy&&window.maxFill=1){//message = \"Simple join\"\nif(points[0]==='start-start'){new_poly=poly1.points.reverse().concat(poly2.points);}else if(points[0]==='end-end'){new_poly=poly1.points.concat(poly2.points.reverse());}else if(points[0]==='start-end'){new_poly=poly2.points.concat(poly1.points);}else if(points[0]==='end-start'){new_poly=poly1.points.concat(poly2.points);}if(points.length===2){//message = \"closed line\"\n}return new_poly;}else{return;}}function polyPointsToPathData(points_string){return'M'+points_string.replace(/, /g,',').replace(/ $/,'').replace(/ /g,'L');}\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = __webpack_require__(32);\n\n // only used for outlines atm.\n var PolyBezier = __webpack_require__(110);\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = __webpack_require__(111);\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = __webpack_require__(31);\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(15);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(75);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__App__ = __webpack_require__(76);\n__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__[\"a\" /* HashRouter */],null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__App__[\"a\" /* default */],null)),document.getElementById('root'));\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar k=__webpack_require__(8),n=__webpack_require__(17),p=__webpack_require__(18),q=__webpack_require__(19),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"a\" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nBrowserRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (BrowserRouter);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(51);\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"g\" /* supportsHistory */])();\n var needsHashChangeListener = !Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"h\" /* supportsPopStateOnHashChange */])();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"d\" /* isExtraneousPopstateEvent */])(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createBrowserHistory);\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (resolvePathname);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (valueEqual);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */])(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n },\n slash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"f\" /* supportsGoWithoutReloadUsingHash */])();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"b\" /* locationsAreEqual */])(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location));\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createHashHistory);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(9);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, createKey()) : Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = __WEBPACK_IMPORTED_MODULE_1__PathUtils__[\"b\" /* createPath */];\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createMemoryHistory);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(10);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"b\" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nHashRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (HashRouter);\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(59);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(11);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"d\" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,\n initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (MemoryRouter);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(22);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__[\"a\" /* default */], {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */], _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: __WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */].propTypes.to,\n exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n \"aria-current\": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (NavLink);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(63);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__[\"a\" /* default */]);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPrompt.propTypes = {\n when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Prompt);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(65);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__[\"a\" /* default */]);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(26);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(prevProps.to);\n var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(this.props.to);\n\n if (Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"f\" /* locationsAreEqual */])(prevTo, nextTo)) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nRedirect.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from \n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Redirect);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(67);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"e\" /* createPath */])(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__[\"a\" /* default */], _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nStaticRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (StaticRouter);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(69);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__[\"a\" /* default */]);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {\n if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSwitch.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Switch);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(26);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__[\"a\" /* default */]);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(12);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__[\"a\" /* default */]);\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(73);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(24);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__[\"a\" /* default */], {\n children: function children(routeComponentProps) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (withRouter);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__responsive_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Draw__ = __webpack_require__(77);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:\"other\";this.globalStopEditingMode();this.addCursorPoint();var new_polylines=this.state.polylines;var polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:type,selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});new_polylines.push(polyline);this.id++;this.setState({polylines:new_polylines,active_polyline:polyline});}},{key:'selectLayer',value:function selectLayer(id){var _this2=this;if(this.state.active_polyline){if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:\"Escape\"});}}this.setState({active_polyline:this.getPolylineById(id)},function(){_this2.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});_this2.state.active_polyline.el.classList.toggle('active');});}//////////////////////////////////////////////////////////////////////////////\n// UTILITIES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'unselect_polyline',value:function unselect_polyline(e){console.log(e.code);if(e.code==='Escape'||e.code==='KeyQ'){if(this.state.active_polyline){this.state.active_polyline.el.classList.remove('active');this.state.active_polyline.stopEditing({'code':'Escape'});if(this.state.active_polyline.editing){this.state.active_polyline.stopEditingPoints({'code':'Escape'});}if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:'Escape'});}}this.setState({active_polyline:undefined});Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(this.state.polylines);this.checkProfile('int_prof');this.checkProfile('out_prof');if(this.new_point.added){this.removeCursorPoint();}//remove 0 or 1 vertex polyline\nthis.state.polylines.forEach(function(polyline){if(polyline.points.length<2){this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==polyline.id;})});this.canvas.removeChild(polyline.el);}}.bind(this));}}},{key:'globalStopEditingMode',value:function globalStopEditingMode(){this.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});if(this.state.active_polyline){this.state.active_polyline.stopEditing({'code':'Escape'});}}},{key:'addNotification',value:function addNotification(message){this.setState({notification:{id:this.not_id,message:message}});this.not_id++;}},{key:'getPolylineById',value:function getPolylineById(id){return this.state.polylines.filter(function(el){return el.id===id;})[0];}},{key:'addCursorPoint',value:function addCursorPoint(){this.canvas.appendChild(this.new_point.el);this.new_point.added=true;this.new_point.select();}},{key:'removeCursorPoint',value:function removeCursorPoint(){this.canvas.removeChild(this.new_point.el);this.new_point.added=false;}},{key:'updateToDo',value:function updateToDo(type,value){var toDo=this.state.toDo;toDo[type]=value;this.setState({toDo:toDo});}},{key:'checkProfile',value:function checkProfile(type){var poly1=this.state.polylines.filter(function(el){return el.type===type;});if(poly1.length===0){this.updateToDo(type,false);if(type==='int_prof'){if(this.inner_poly){this.canvas.removeChild(this.inner_poly);this.inner_poly=null;this.setState({vessel_capacity:null});}}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);this.vessel_poly=null;this.setState({vessel_volume:null});}}else if(poly1.length===1){this.updateToDo(type,true);}else{this.updateToDo(type,false);var profile=type==='int_prof'?'internal profile':'outer profile';this.addNotification('There should be only one '+profile);}}//////////////////////////////////////////////////////////////////////////////\n// JOIN POLYLINES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'joinIntExt',value:function joinIntExt(){var poly1=this.state.polylines.filter(function(el){return el.type==='int_prof';})[0];var poly2=this.state.polylines.filter(function(el){return el.type==='out_prof';})[0];if(!poly1||!poly2){this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\");return;}this.vesselVolume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"f\" /* join2Polylines */])(poly1,poly2);if(!this.vesselVolume){this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\");return;}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);}this.vessel_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.vesselVolume,'rgba(170, 170, 170, 0.6)');var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale);this.setState({vessel_volume:volume});this.canvas.appendChild(this.vessel_poly);}},{key:'create_inner_polygon',value:function create_inner_polygon(){var poly=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(poly.length===0){this.addNotification(\"To calculate vessel capacity you need an internal profile\");return;}if(this.inner_poly){this.canvas.removeChild(this.inner_poly);}//define inner polygon points based on inner profile and rotation axis\nthis.innerPolygon=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"e\" /* innerProfileToPolygon */])(poly[0].points.slice());//create svg polygon\nthis.inner_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.innerPolygon,'rgba(210, 204, 78, 0.28)');if(this.scale){var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale);this.setState({vessel_capacity:volume});}else{this.addNotification('Can\\'t measure, define scale first');}this.canvas.appendChild(this.inner_poly);}//////////////////////////////////////////////////////////////////////////////\n// ADD REFERENCE SCALE rotation axis AND MAX FILL //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'metricForm',value:function metricForm(obj){var _this3=this;if(obj.ref_unit){this.updateToDo('ref_unit',true);this.setState({metric_value:obj.value,metric_unit:obj.unit},function(){if(_this3.metric&&_this3.metric.points.length===2){_this3.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(_this3.metric,_this3.state.metric_value,_this3.state.metric_unit);//update volume info when metric info are updated\nif(_this3.innerPolygon){_this3.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.innerPolygon,_this3.scale)});}if(_this3.vesselVolume){_this3.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.vesselVolume,_this3.scale)});}}});}else{this.updateToDo('ref_unit',false);this.scale=null;}}},{key:'defineMaxFill',value:function defineMaxFill(){//remove maxFill if present\nif(this.maxFill){this.canvas.removeChild(this.maxFill.el);this.updateToDo('maxFill',false);}//create new maxFill polyline\nthis.maxFill=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'max_fill',type:'max_fill',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({code:'Escape'});}},{key:'addMaxFill',value:function addMaxFill(e){this.maxFill.stroke='rgb(0, 255, 21)';this.maxFill.add_point(e);this.canvas.appendChild(this.maxFill.el);this.maxFill.draw();//exit editing mode\nthis.maxFill.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.maxFill=this.maxFill.points[0].cy;this.updateToDo('maxFill',true);}},{key:'defineMetric',value:function defineMetric(){this.unselect_polyline({code:\"Escape\"});//remove metric if present\nif(this.metric){this.canvas.removeChild(this.metric.el);this.updateToDo('metric',false);}//create new metric polyline\nthis.metric=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'metric',type:'metric',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMetric);this.metric.stopEditing({code:'Escape'});}},{key:'addMetric',value:function addMetric(e){if(this.metric.points.length===0){this.metric.add_point(e);}else if(this.metric.points.length===1){//this is the 2nd point, add it and exit editing\nthis.metric.add_point(e);this.metric.stroke='red';this.metric.stopEditing({code:\"Escape\"});//set color\nthis.metric.el.classList.remove('active');//stop editing\nthis.canvas.removeEventListener('dblclick',this.addMetric);this.updateToDo('metric',true);this.removeCursorPoint();if(this.state.metric_value&&this.state.metric_unit){this.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(this.metric,this.state.metric_value,this.state.metric_unit);}//update volume info when metric info are updated\nif(this.innerPolygon){this.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale)});}if(this.vesselVolume){this.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale)});}}}},{key:'definerotAxis',value:function definerotAxis(){//remove if already present\nif(this.rotAxis){this.canvas.removeChild(this.rotAxis.el);window.r_axis=null;this.updateToDo('rotAxis',false);}//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addRotAxis);}},{key:'addRotAxis',value:function addRotAxis(e){//create rotation axis polyline\nthis.rotAxis=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'center',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.rotAxis.stroke='#ff5a00';this.rotAxis.add_point(e);this.canvas.appendChild(this.rotAxis.el);this.rotAxis.draw();//exit editing mode\nthis.rotAxis.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addRotAxis);this.rotAxis.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.r_axis=this.rotAxis.points[0].cx;this.updateToDo('rotAxis',true);}//////////////////////////////////////////////////////////////////////////////\n// LAYER EDITING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'colorChange',value:function colorChange(id,color){var my_polyline=this.getPolylineById(id);my_polyline.stroke=color;my_polyline.draw();}},{key:'typeChange',value:function typeChange(id,type){var _this4=this;this.setState({polylines:this.state.polylines.map(function(el){if(el.id===id){el.type=type;return el;}return el;})},function(){_this4.checkProfile('int_prof');_this4.checkProfile('out_prof');});}},{key:'delete_line',value:function delete_line(){var _this5=this;this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.canvas.removeChild(this.state.active_polyline.el);this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==_this5.state.active_polyline.id;}),active_polyline:undefined},function(){_this5.checkProfile('int_prof');_this5.checkProfile('out_prof');Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(_this5.state.polylines);});}},{key:'edit_line',value:function edit_line(){this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.state.active_polyline.editLine();}//////////////////////////////////////////////////////////////////////////////\n// LAYER BREAKING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'enterBreakLineMode',value:function enterBreakLineMode(){this.globalStopEditingMode();//check if breaking selected line is possible\nif(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}if(this.state.active_polyline.points.length<=2){this.addNotification(\"Line has two or less vertices and can't be subdivided\");return;}//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=true;this.setState({active_polyline:active_polyline});//add breaking points to canvas\nvar x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){this.canvas.appendChild(point.el);point.draw();point.el.addEventListener('click',this.breakLine);}x++;}.bind(this));}},{key:'exitBreakLineMode',value:function exitBreakLineMode(e){//remove breaking points from canvas\nif((e.code==='Escape'||e.code==='KeyQ')&&this.state.active_polyline.breaking_mode){var x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){point.el.removeEventListener('click',this.breakLine);this.canvas.removeChild(point.el);}x++;}.bind(this));//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=false;this.setState({active_polyline:active_polyline});}}},{key:'breakLine',value:function breakLine(e){var _this6=this;var break_point=[e.target.getAttribute('cx'),e.target.getAttribute('cy')];this.exitBreakLineMode({code:'Escape'});//instantiate polyline list to edit\nvar new_polylines=this.state.polylines;//create a new polyline\nvar polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//loop over the polyine to break and add point to new polyline until you get to the breaking point\nthis.state.active_polyline.points.forEach(function(point){polyline.appendPoint([point.cx,point.cy]);if(point.cx===parseFloat(break_point[0])&&point.cy===parseFloat(break_point[1])){//save draw and exit editing mode\npolyline.el.classList.remove('active');new_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//create a new polyline with starting point the breaking point\npolyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});polyline.appendPoint([point.cx,point.cy]);}}.bind(this));//save draw and exit editing mode for sencond line\nnew_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//delete orignal broken line and exit editing mode\nthis.state.active_polyline.stopEditing({'code':'Escape'});this.canvas.removeChild(this.state.active_polyline.el);//update the state with the two new lines without the old one\nthis.setState({polylines:new_polylines.filter(function(el){return el.id!==_this6.state.active_polyline.id;}),active_polyline:polyline});}//////////////////////////////////////////////////////////////////////////////\n// HANDLE IMAGE //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'image_rotate',value:function image_rotate(e){this.bck_image.style.transform='rotate('+e.target.value+'deg)';}},{key:'fileChangedHandler',value:function fileChangedHandler(e){var img_name=e.target.value.split(\"\\\\\");img_name=img_name[img_name.length-1];this.setState({img_name:img_name});var img=new Image();img.src=window.URL.createObjectURL(e.target.files[0]);img.onload=function(){var width=img.naturalWidth;var height=img.naturalHeight;var toDo=this.state.toDo;toDo.image=true;this.setState({img_w:width,img_h:height,selectedFile:img.src,toDo:toDo});}.bind(this);}//////////////////////////////////////////////////////////////////////////////\n// DOWNLOAD //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'download_svg',value:function download_svg(){var _this7=this;if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}var saved_path=this.state.selectedFile;if(this.state.img_name){this.setState({selectedFile:this.state.img_name.replace('href')},function(){download(_this7.svg.outerHTML,\"dlText.svg\",\"text/plain\");_this7.setState({selectedFile:saved_path});});}else{download(this.svg.outerHTML,\"myVessel.svg\",\"text/plain\");}}},{key:'download_dxf',value:function download_dxf(){if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}var makerjs=__webpack_require__(97);var models={models:{}};var x=1;this.state.polylines.forEach(function(polyline){var points=polyline.el.getAttribute('points');var closed=false;//true for SVG polygon, false for SVG polyline\nvar model=makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed,points),false,true);model=makerjs.model.scale(model,this.scale/10);models.models['my-'+x+'-line']=model;x++;}.bind(this));models.units=makerjs.units.Meter;var file=makerjs.exporter.toDXF(models,{units:makerjs.unitType.Meter});download(file,\"myVessel.dxf\",\"text/plain\");}},{key:'download_json',value:function download_json(){var title='myVessel';var coordinates=void 0,author=void 0,description='';var int_prof=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(int_prof.length>0){int_prof=int_prof[0];}else{this.addNotification('No inner profile to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}coordinates=[];int_prof.points.forEach(function(point){// scale the point - unit will be dm - convert to cm - invert y axis\ncoordinates.push([point.cx*this.scale/10,point.cy*this.scale/10*-1]);}.bind(this));coordinates=JSON.stringify(coordinates);var json='{ \"type\": \"Feature\",\\n \"geometry\": {\\n \"type\": \"LineString\",\\n \"coordinates\": '+coordinates+'\\n },\\n \"properties\": {\\n \"title\": \"'+title+'\",\\n \"description\": \"'+description+'\",\\n \"author\": \"'+author+'\"\\n }\\n }';this.addNotification('Export completed');download(json,title+'.json',\"text/plain\");}//////////////////////////////////////////////////////////////////////////////\n// RENDER //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'render',value:function render(){var _this8=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'container'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__components_Notification__[\"a\" /* default */],{notification:this.state.notification}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2',null,'Draw'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'drawing'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('svg',{id:'drawing-canvas',height:'500',width:'100%',ref:function ref(svg){_this8.svg=svg;}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('g',{className:'svg-pan-zoom_viewport',id:'canvas'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('image',{ref:function ref(bck_image){_this8.bck_image=bck_image;},id:'bck-img',href:this.state.selectedFile,x:'0',y:'0',height:this.state.img_h,width:this.state.img_w}))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'tools'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title'},'Actions:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.create_new_polyline.bind(this),title:'Create new line',alt:'Create new line'},'New'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.enterBreakLineMode.bind(this),title:'Break selected line',alt:'Break selected line'},'Break'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.delete_line.bind(this),title:'Delete selected line',alt:'Delete selected line'},'Delete'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.edit_line.bind(this),title:'Edit selected line',alt:'Edit selected line'},'Edit'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title2'},'Export:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_svg.bind(this),title:'Download SVG (no scaling)',alt:'Download SVG (no scaling)'},'SVG'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_dxf.bind(this),title:'Download all-lines as DXF (scaled: 1 unit = 1 meter)',alt:'Download all-lines as DXF (scaled: 1 unit = 1 meter)'},'DXF'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_json.bind(this),title:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)',alt:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)'},'JSON'))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'polylines'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'layer-title'},'Layers:'),this.state.toDo.image&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'image-layer',className:'polyline-layer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'slidecontainer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label',{htmlFor:'myRange'},'Rotate image'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input',{type:'number',min:'0',max:'360',defaultValue:'0',className:'slider',id:'myRange',step:'0.01',onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(el){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__components_listPoly__[\"a\" /* default */],{key:el.id,name:el.name,type:el.type,id:el.id,delete_line:_this8.delete_line.bind(_this8),edit_line:_this8.edit_line.bind(_this8),colorChange:_this8.colorChange.bind(_this8),typeChange:_this8.typeChange.bind(_this8),selectLayer:_this8.selectLayer.bind(_this8),selectedPoly:_this8.state.active_polyline?_this8.state.active_polyline.id:''});})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'basic-info'},'Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'Esc'),' or ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'q'),' to quit editing mode and deselect.'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__components_Steps__[\"a\" /* default */],{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__components_Measures__[\"a\" /* default */],{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}));}}]);return Draw;}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);/* harmony default export */ __webpack_exports__[\"a\"] = (Draw);//get point coordinates from event\n//get_point(e){\n// const matrix = this.canvas.transform.baseVal[0].matrix\n// const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n// return newPoint\n//}\n//\n//\n//\n//joinTwoPolylines(poly1, poly2){\n// const new_poly = join2Polylines(poly1, poly2)\n//\n// if(!new_poly){\n// this.addNotification(\"Not joinable\")\n// return\n// }\n// return joined_poly\n//\n// //const joined_poly = new Polyline({\n// // points: cleanedPoly(new_poly),\n// // id: this.id,\n// // type: poly1.type,\n// // selected: true,\n// // canvas: this.canvas,\n// // offsetX: this.x,\n// // offsetY: this.y,\n// // currentZoom: this.panZoomTiger.getZoom()\n// //})\n// //joined_poly.stopEditing({code:'Escape'})\n// //this.canvas.removeChild(joined_poly.el)\n// //this.id++\n//\n// //this.canvas.removeChild(poly1.el)\n// //this.canvas.removeChild(poly2.el)\n// //this.canvas.appendChild(joined_poly.el)\n// //joined_poly.draw()\n////\n// //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n// //new_polylines.push(joined_poly)\n// //this.addNotification(message)\n// //this.setState(\n// // { polylines: new_polylines,\n// // notification:{ id:this.not_id, message: message },\n// // active_polyline: joined_poly\n// // }\n// //)\n// //this.not_id++\n//}\n//joinTwoLines(){\n// //TODO\n// this.addNotification(\"Select first line\")\n//}\n//\n// Join 2 lines\n//\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Point__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MidPoint__ = __webpack_require__(79);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calc_functions__ = __webpack_require__(30);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&this.points.length>index){if(point.cx!==this.points[index-1].cx&&point.cy!==this.points[index-1].cy){var midpoint=new __WEBPACK_IMPORTED_MODULE_1__MidPoint__[\"a\" /* default */]([(point.cx+this.points[index-1].cx)/2,(point.cy+this.points[index-1].cy)/2],index,this.zoom);this.midpoints.push(midpoint);}}index++;}.bind(this));//add midpoints to canvas\nthis.midpoints.forEach(function(midpoint){this.canvas.appendChild(midpoint.el);midpoint.draw();midpoint.el.addEventListener('click',this.create);}.bind(this));}},{key:'create',value:function create(e){var index=e.target.getAttribute('index');var new_point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([parseFloat(e.target.getAttribute('cx')),parseFloat(e.target.getAttribute('cy'))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(index,new_point);}},{key:'addPointInMiddle',value:function addPointInMiddle(index,new_point){this.points.splice(index,0,new_point);this.canvas.appendChild(new_point.el);new_point.draw();new_point.edit();new_point.select();this.draw();}},{key:'pointsTo',value:function pointsTo(){var str='';this.points.forEach(function(point){str+=point.cx+', '+point.cy+' ';});return str;}//add point\n},{key:'add_point',value:function add_point(e){var new_point=this.get_point(e);if(this.type==='max_fill'){var point=[-1000000,new_point[1]];this.appendPoint(point);point=[1000000,new_point[1]];this.appendPoint(point);return;}if(this.type==='center'){var _point=[new_point[0],-1000000];this.appendPoint(_point);_point=[new_point[0],1000000];this.appendPoint(_point);return;}this.appendPoint(new_point);}},{key:'appendPoint',value:function appendPoint(array){window.snapping_points.push([array[0],array[1]]);var point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([array[0],array[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(point);this.draw();if(this.points.length===1){window.addEventListener('mousemove',this.previewPoint);window.addEventListener('keyup',this.stopEditing);}}},{key:'get_point',value:function get_point(e){var matrix=this.canvas.transform.baseVal[0].matrix;var newPoint=[(e.pageX-matrix.e-this.x)/matrix.a,(e.pageY-matrix.f-this.y)/matrix.a];return this.snapPoint(newPoint);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && Object(__WEBPACK_IMPORTED_MODULE_0__cross__[\"a\" /* default */])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n});\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n});\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n});\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\n// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13);\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13)\n , Utils = __webpack_require__(14)\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = __webpack_require__(98);\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = __webpack_require__(103);\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = __webpack_require__(107);\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = __webpack_require__(109);\r\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(Buffer) {var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(99).Buffer))\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(100)\nvar ieee754 = __webpack_require__(101)\nvar isArray = __webpack_require__(102)\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"default\"] = kdbush;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sort__ = __webpack_require__(104);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range__ = __webpack_require__(105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__within__ = __webpack_require__(106);\n\n\n\n\n\nfunction kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n Object(__WEBPACK_IMPORTED_MODULE_0__sort__[\"a\" /* default */])(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__range__[\"a\" /* default */])(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__within__[\"a\" /* default */])(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = sortKD;\n\nfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = range;\n\nfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = within;\n\nfunction within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==\"function\"&&__webpack_require__(108)&&!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return ConvexHullGrahamScan}.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports) {\n\n/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(31);\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n var utils = __webpack_require__(32);\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar normalise = __webpack_require__(112);\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\n/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// static/js/main.b7eb699e.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap abfe1c8d28b8ab0fc77a","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react/index.js\n// module id = 0\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 1\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/invariant/browser.js\n// module id = 2\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/warning/warning.js\n// module id = 3\n// module chunks = 0","export var addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nexport var createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/PathUtils.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/node_modules/warning/browser.js\n// module id = 6\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/LocationUtils.js\n// module id = 7\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 8\n// module chunks = 0","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n warning(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\nexport default createTransitionManager;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createTransitionManager.js\n// module id = 9\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Router from \"react-router/es/Router\";\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Router.js\n// module id = 10\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n invariant(children == null || React.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? React.Children.only(children) : null;\n };\n\n return Router;\n}(React.Component);\n\nRouter.propTypes = {\n history: PropTypes.object.isRequired,\n children: PropTypes.node\n};\nRouter.contextTypes = {\n router: PropTypes.object\n};\nRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Router.js\n// module id = 11\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/matchPath.js\n// module id = 12\n// module chunks = 0","var Utils = require('./utilities')\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-utilities.js\n// module id = 13\n// module chunks = 0","module.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/utilities.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/core.js\n// module id = 15\n// module chunks = 0","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 16\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/invariant.js\n// module id = 17\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyObject.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyFunction.js\n// module id = 19\n// module chunks = 0","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/DOMUtils.js\n// module id = 21\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport { createLocation } from \"history\";\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n invariant(this.context.router, \"You should not use outside a \");\n\n invariant(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? createLocation(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return React.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(React.Component);\n\nLink.propTypes = {\n onClick: PropTypes.func,\n target: PropTypes.string,\n replace: PropTypes.bool,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired,\n createHref: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Link;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Link.js\n// module id = 22\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Route from \"react-router/es/Route\";\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Route.js\n// module id = 23\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Route.js\n// module id = 24\n// module chunks = 0","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/index.js\n// module id = 25\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = pathToRegexp.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/generatePath.js\n// module id = 26\n// module chunks = 0","export default class Point {\n\n constructor(point, canvas, x, y, zoom, selector = false) {\n this.cx = point[0]\n this.cy = point[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n\n this.selector = selector\n this.canvas = canvas\n this.x = x\n this.y = y\n this.zoom = zoom\n\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n this.select = this.select.bind(this)\n this.move = this.move.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.get_point = this.get_point.bind(this)\n\n this.old_cx = point[0]\n this.old_cy = point[1]\n\n this.base_size = 10\n this.base_stroke = 5\n this.size = this.base_size / zoom\n this.strokeWidth = this.base_stroke / zoom\n }\n\n draw() {\n this.el.setAttribute('cx', this.cx);\n this.el.setAttribute('cy', this.cy);\n this.el.setAttribute('r', this.size);\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.fill = this.fill;\n }\n\n setSize(zoom) {\n this.size = this.base_size/zoom\n this.strokeWidth = this.base_stroke / zoom\n this.draw()\n }\n\n edit() {\n this.el.addEventListener('click', this.select)\n }\n\n clear() {\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n this.fill = '#2da7cf80'\n this.cx = this.old_cx\n this.cy = this.old_cy\n this.draw()\n }\n\n stopEditing() {\n window.snapping_points.push([this.cx, this.cy])\n this.old_cx = this.cx\n this.old_cy = this.cy\n\n this.fill = '#2da7cf80'\n this.draw()\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n move(e) {\n this.cx = this.get_point(e)[0]\n this.cy = this.get_point(e)[1]\n this.draw()\n if(!this.selector){\n window.addEventListener('dblclick', this.stopEditing)\n }\n }\n\n select() {\n this.old_cx = this.cx\n this.old_cy = this.cy\n this.fill = 'yellow'\n this.draw()\n window.addEventListener('mousemove', this.move)\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Point.js","const d3 = require('d3-polygon')\n\n//http://paulbourke.net/geometry/pointlineplane/javascript.txt\n// line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/\n// Determine the intersection point of two line segments\n// Return FALSE if the lines don't intersect\nfunction intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n // Check if none of the lines are of length 0\n\tif ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n\t\treturn false\n\t}\n\tlet denominator = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1))\n // Lines are parallel\n\tif (denominator === 0) {\n\t\treturn false\n\t}\n\tlet ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator\n\tlet ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator\n // is the intersection along the segments\n\tif (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n\t\treturn false\n\t}\n // Return a object with the x and y coordinates of the intersection\n\tlet x = x1 + ua * (x2 - x1)\n\tlet y = y1 + ua * (y2 - y1)\n\n\treturn {x, y}\n}\n\nfunction calc_vol(poly, scale) {\n let measures = toD3(poly)\n let dist = (measures.centroid[0] - window.r_axis) * 2 * Math.PI\n let vol = dist * measures.area * Math.pow(scale, 3)\n return Math.abs(vol)\n}\n\nfunction distance(p1, p2) {\n return Math.sqrt(Math.pow((p1[0] - p2[0]), 2) + Math.pow((p1[1] - p2[1]), 2))\n}\n\nfunction calcScale(poly, value, unit) {\n if (!poly) {\n return null\n }\n const v1 = [\n poly.points[0].cx,\n poly.points[0].cy\n ]\n const v2 = [\n poly.points[1].cx,\n poly.points[1].cy\n ]\n const d = distance(v1, v2)\n let new_value\n if (unit === 'inch') {\n new_value = value * 2.54\n } else {\n new_value = value\n }\n const pro = (new_value / d) / 10\n return pro\n}\n\nfunction toD3(poly) {\n let points_array = []\n poly.forEach(function(point) {\n points_array.push([point.cx, point.cy])\n })\n return {centroid: d3.polygonCentroid(points_array), area: d3.polygonArea(points_array)}\n}\n\nfunction cleanedPoly(array) {\n let points = []\n let x = 0\n array.forEach(function(el) {\n if (x < array.length - 1) {\n if (el.cx !== array[x + 1].cx && el.cy !== array[x + 1].cy) {\n points.push(el)\n }\n x++\n } else {\n points.push(el)\n }\n })\n return points\n}\n\nfunction getCommonPoints(poly1, poly2) {\n let start1 = poly1[0]\n let end1 = poly1[poly1.length - 1]\n let start2 = poly2[0]\n let end2 = poly2[poly2.length - 1]\n let commons = []\n if (start1.cx === start2.cx && start1.cy === start2.cy) {\n commons.push('start-start')\n }\n if (start1.cx === end2.cx && start1.cy === end2.cy) {\n commons.push('start-end')\n }\n if (end1.cx === start2.cx && end1.cy === start2.cy) {\n commons.push('end-start')\n }\n if (end1.cx === end2.cx && end1.cy === end2.cy) {\n commons.push('end-end')\n }\n return commons\n}\n\nfunction innerProfileToPolygon(old_poly) {\n let poly = [];\n old_poly.forEach(function(point){\n poly.push(Object.assign({}, point))\n })\n let start = poly[0]\n let end = poly[poly.length - 1]\n //start polyline from bottom to top Y values are inverted topY < bottomY\n if (start.cy < end.cy) {\n poly.reverse()\n start = poly[0]\n end = poly[poly.length - 1]\n }\n let new_end = Object.assign({}, end);\n\n //set max fill\n if(window.maxFill && window.maxFill > end.cy && window.maxFill < start.cy){\n //recreate poly excluding vetices above maxFill\n let temp_poly = []\n let first_time = true\n poly.forEach(function(point){\n if(point.cy < window.maxFill){\n\t\t\t\t//this vertex is above maxFill skip\n\t\t\t\t//if this is the first vertex above add it otherwise ignore it\n\t\t\t\tif(first_time){\n temp_poly.push(point)\n first_time = false\n }\n }else{\n\t\t\t\t//this vertex is under maxFill\n\t\t\t\t//add vertex that is under maxFill limit\n temp_poly.push(point)\n }\n })\n\n poly = temp_poly\n\n start = poly[0]\n end = poly[poly.length - 1]\n end.cx = intersect(\n end.cx, end.cy, poly[poly.length-2].cx, poly[poly.length-2].cy,\n -10000000, window.maxFill, 10000000, window.maxFill\n ).x\n end.cy = window.maxFill\n new_end.cy = window.maxFill\n }\n\n\n //if not caxis use start x as center axis else use the defined center axis\n if (!window.r_axis || window.r_axis === start.cx) {\n window.r_axis = start.cx\n new_end.cx = start.cx\n poly.push(new_end)\n poly.push(start) //duplicated to close polygon\n } else {\n let new_start = Object.assign({}, start);\n new_start.cx = window.r_axis\n new_end.cx = window.r_axis\n poly.push(new_end)\n poly.push(new_start)\n poly.push(start) //duplicated to close polygon\n }\n return poly\n}\n\nfunction create_polygon(poly, color) {\n let str = ''\n poly.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n let new_poly = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n new_poly.setAttribute('points', str)\n new_poly.style.fill = color\n new_poly.style.strokeWidth = '0'\n return new_poly\n}\n\nfunction recreate_snapping_points(polylines) {\n window.snapping_points = []\n polylines.forEach(function(poly) {\n poly.points.forEach(function(point) {\n window.snapping_points.push([point.cx, point.cy])\n })\n })\n}\n\nfunction join2Polylines(poly1, poly2) {\n const points = getCommonPoints(poly1.points.slice(), poly2.points.slice())\n let new_poly = []\n\n if (points.length >= 1) {\n //message = \"Simple join\"\n if (points[0] === 'start-start') {\n new_poly = poly1.points.reverse().concat(poly2.points)\n } else if (points[0] === 'end-end') {\n new_poly = poly1.points.concat(poly2.points.reverse())\n } else if (points[0] === 'start-end') {\n new_poly = poly2.points.concat(poly1.points)\n } else if (points[0] === 'end-start') {\n new_poly = poly1.points.concat(poly2.points)\n }\n if (points.length === 2) {\n //message = \"closed line\"\n }\n return new_poly\n } else {\n return\n }\n}\n\nfunction polyPointsToPathData(points_string){\n\treturn 'M'+points_string.replace(/, /g, ',').replace(/ $/, '').replace(/ /g, 'L')\n}\n\nexport {\n calc_vol,\n distance,\n calcScale,\n toD3,\n cleanedPoly,\n getCommonPoints,\n create_polygon,\n recreate_snapping_points,\n join2Polylines,\n innerProfileToPolygon,\n\tpolyPointsToPathData\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/calc_functions.js","/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = require(\"./utils.js\");\n\n // only used for outlines atm.\n var PolyBezier = require(\"./poly-bezier.js\");\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = require(\"./svg-to-beziers\");\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/bezier.js\n// module id = 31\n// module chunks = 0","(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = require(\"./bezier\");\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 36\n// module chunks = 0","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/es6-extensions.js\n// module id = 37\n// module chunks = 0","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/whatwg-fetch/fetch.js\n// module id = 38\n// module chunks = 0","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HashRouter } from 'react-router-dom'\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(, document.getElementById('root'));\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var k=require(\"object-assign\"),n=require(\"fbjs/lib/invariant\"),p=require(\"fbjs/lib/emptyObject\"),q=require(\"fbjs/lib/emptyFunction\"),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n basename: PropTypes.string,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default BrowserRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/BrowserRouter.js\n// module id = 49\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 50\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 51\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + createPath(location);\n };\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createBrowserHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createBrowserHistory.js\n// module id = 52\n// module chunks = 0","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/resolve-pathname/index.js\n// module id = 53\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/value-equal/index.js\n// module id = 54\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + createPath(location));\n };\n\n var push = function push(path, state) {\n warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createHashHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createHashHistory.js\n// module id = 55\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = createPath;\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createMemoryHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createMemoryHistory.js\n// module id = 56\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createHashHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n basename: PropTypes.string,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: PropTypes.node\n};\n\n\nexport default HashRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/HashRouter.js\n// module id = 57\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from \"react-router/es/MemoryRouter\";\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/MemoryRouter.js\n// module id = 58\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/MemoryRouter.js\n// module id = 59\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Route from \"./Route\";\nimport Link from \"./Link\";\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return React.createElement(Route, {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return React.createElement(Link, _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: Link.propTypes.to,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n location: PropTypes.object,\n activeClassName: PropTypes.string,\n className: PropTypes.string,\n activeStyle: PropTypes.object,\n style: PropTypes.object,\n isActive: PropTypes.func,\n \"aria-current\": PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\nexport default NavLink;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/NavLink.js\n// module id = 60\n// module chunks = 0","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/node_modules/isarray/index.js\n// module id = 61\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Prompt from \"react-router/es/Prompt\";\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Prompt.js\n// module id = 62\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n when: PropTypes.bool,\n message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n block: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Prompt.js\n// module id = 63\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Redirect from \"react-router/es/Redirect\";\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Redirect.js\n// module id = 64\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = createLocation(prevProps.to);\n var nextTo = createLocation(this.props.to);\n\n if (locationsAreEqual(prevTo, nextTo)) {\n warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return generatePath(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n computedMatch: PropTypes.object, // private, from \n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired\n }).isRequired,\n staticContext: PropTypes.object\n }).isRequired\n};\n\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Redirect.js\n// module id = 65\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport StaticRouter from \"react-router/es/StaticRouter\";\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/StaticRouter.js\n// module id = 66\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n invariant(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return React.createElement(Router, _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object.isRequired,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/StaticRouter.js\n// module id = 67\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Switch from \"react-router/es/Switch\";\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Switch.js\n// module id = 68\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n React.Children.forEach(children, function (element) {\n if (match == null && React.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n router: PropTypes.shape({\n route: PropTypes.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n};\n\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Switch.js\n// module id = 69\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport generatePath from \"react-router/es/generatePath\";\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/generatePath.js\n// module id = 70\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport matchPath from \"react-router/es/matchPath\";\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/matchPath.js\n// module id = 71\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport withRouter from \"react-router/es/withRouter\";\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/withRouter.js\n// module id = 72\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: PropTypes.func\n };\n\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/withRouter.js\n// module id = 73\n// module chunks = 0","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\n// module id = 74\n// module chunks = 0","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport { Route, Switch, Link} from 'react-router-dom'\nimport Draw from './Draw'\n\nclass App extends Component {\n\n render() {\n return (\n
\n
\n

\n VMT Vessel Measuring Tool\n

\n\n About\n
\n\n \n\n \n\n {/* This switch handle 404 pages */}\n \n \n \n \n \n\n
\n );\n }\n}\n\nclass About extends Component{\n render(){\n return (\n
\n

About

\n

What is this?

\n

This is a simple webapp written in javascript using ReactJs Framework.\n It can be used to digitize archeological drawings of vessels in order to calculate their capacity and weight.\n

\n

How does it work?

\n

You can watch this youtube video that show how to use this app. If you have problems you can contact me or open an issue on github.

\n

\n

\n

Saving

\n

After you have digitized your drawing you can download your file in three differents formats:

\n
\n\n

Source code

\n

This is an open source project you can find the source code at this link\n on Github.\n You can download and use this webapp even without an internet connection, after you've downloded the source code\n you can open the index.html file in the build folder with any modern browser and start measuring\n your vessels.\n

\n\n

Alternatives

\n

\n There are many other projects that calculate vessel capacity, it this projects doesn't work for you you should\n check them out. You can find a list at\n this link.\n

\n\n

Limitations

\n

\n Although this webapp displays nicely on different devices, drawing capacity is currently available only using a mouse.\n

\n\n

Dependencies

\n

This app has been built using these javascript libraries:

\n \n

Back to main page

\n
\n )\n }\n}\n\nclass NoMatch extends Component{\n render(){\n return (\n
\n

404 - Not found

\n

Page not found

\n\n

Back to main page

\n
\n )\n }\n}\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.js","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport Polyline from './svg_classes/Polyline'\nimport Point from './svg_classes/Point'\nimport ListPoly from './components/listPoly'\nimport Notification from './components/Notification'\nimport Steps from './components/Steps'\nimport Measures from './components/Measures'\nimport { calc_vol, calcScale, join2Polylines, innerProfileToPolygon,\n create_polygon, recreate_snapping_points } from './calc_functions'\nconst svgPanZoom = require('svg-pan-zoom')\nconst download = require(\"downloadjs\")\n\nclass Draw extends Component {\n constructor(props){\n super(props)\n this.breakLine = this.breakLine.bind(this)\n this.exitBreakLineMode = this.exitBreakLineMode.bind(this)\n this.addRotAxis = this.addRotAxis.bind(this)\n this.addMetric = this.addMetric.bind(this)\n this.addMaxFill = this.addMaxFill.bind(this)\n this.resizeSvg = this.resizeSvg.bind(this)\n this.unselect_polyline = this.unselect_polyline.bind(this)\n }\n state = {\n polylines: [],\n active_polyline: undefined,\n selectedFile: '',\n img_w: 1000,\n img_h: 1000,\n notification:{id:-1,message:''},\n toDo:{image:false, rotAxis:false, metric:false,\n int_prof:false, out_prof:false, ref_unit:false, maxFill:false}\n }\n id = 0\n not_id = 0\n\n componentDidMount(){\n //init canvas\n this.canvas = document.getElementById('canvas')\n //initialize x,y needed to calculate svg coordinate in get_point()\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point = new Point([0,0], this.canvas, this.x, this.y, 1, true)\n window.addEventListener('resize', this.resizeSvg)\n\n //global vars\n window.snapping_points = []\n window.zoom = 1\n window.r_axis = null\n window.addEventListener('keyup', this.unselect_polyline)\n\n //init zoom canvas\n this.panZoomTiger = svgPanZoom('#drawing-canvas', {\n dblClickZoomEnabled: false,\n panEnabled: true,\n zoomScaleSensitivity: 0.8,\n maxZoom: 50,\n minZoom: 0.1,\n\n onZoom: function(e){\n window.zoom = e\n this.state.polylines.forEach(function(poly){\n poly.zoom = e\n poly.setSize( e )\n\n poly.points.forEach(function(point){\n point.setSize( e )\n })\n poly.midpoints.forEach(function(point){\n point.setSize( e )\n })\n })\n if(this.metric){\n this.metric.zoom = e\n this.metric.setSize( e )\n }\n if(this.rotAxis){\n this.rotAxis.zoom = e\n this.rotAxis.setSize( e )\n }\n if(this.maxFill){\n this.maxFill.zoom = e\n this.maxFill.setSize( e )\n }\n this.new_point.zoom = e\n this.new_point.setSize( e )\n }.bind(this)\n });\n }\n\n componentWillUnmount(){\n window.removeEventListener('resize', this.resizeSvg)\n window.removeEventListener('keyup', this.unselect_polyline)\n }\n\n resizeSvg(){\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point.x = this.x\n this.new_point.y = this.y\n this.state.polylines.forEach(function(el){\n el.y = this.y\n el.x = this.x\n }.bind(this))\n if(this.state.active_polyline){\n let a_p = this.state.active_polyline\n a_p.x = this.x\n a_p.y = this.y\n this.setState({active_polyline:a_p})\n this.state.active_polyline.points.forEach(function(p){\n p.x = this.x\n p.y = this.y\n }.bind(this))\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // CREATE, SELECT, DESELECT POLYLINE //\n //////////////////////////////////////////////////////////////////////////////\n\n create_new_polyline(type = \"other\"){\n this.globalStopEditingMode()\n\n this.addCursorPoint()\n const new_polylines = this.state.polylines\n const polyline = new Polyline({\n points: [],\n id: this.id,\n type: type,\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n new_polylines.push( polyline )\n this.id++\n this.setState(\n { polylines: new_polylines,\n active_polyline: polyline\n }\n )\n }\n\n selectLayer(id){\n if(this.state.active_polyline){\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code:\"Escape\"})\n }\n }\n this.setState({active_polyline: this.getPolylineById(id)},\n ()=> {\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n });\n this.state.active_polyline.el.classList.toggle('active')\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // UTILITIES //\n //////////////////////////////////////////////////////////////////////////////\n\n unselect_polyline(e){\n console.log(e.code)\n if( e.code === 'Escape' || e.code === 'KeyQ'){\n if(this.state.active_polyline){\n this.state.active_polyline.el.classList.remove('active')\n this.state.active_polyline.stopEditing({'code':'Escape'})\n if(this.state.active_polyline.editing){\n this.state.active_polyline.stopEditingPoints({'code':'Escape'})\n }\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code: 'Escape'})\n }\n }\n this.setState({active_polyline:undefined})\n recreate_snapping_points(this.state.polylines)\n\n this.checkProfile('int_prof')\n this.checkProfile('out_prof')\n if(this.new_point.added){\n this.removeCursorPoint()\n }\n //remove 0 or 1 vertex polyline\n this.state.polylines.forEach(function(polyline){\n if(polyline.points.length < 2){\n this.setState({polylines: this.state.polylines.filter(el => el.id !== polyline.id)})\n this.canvas.removeChild(polyline.el)\n }\n }.bind(this))\n }\n }\n\n globalStopEditingMode(){\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n })\n if(this.state.active_polyline){\n this.state.active_polyline.stopEditing({'code':'Escape'})\n }\n }\n\n addNotification(message){\n this.setState({notification:{ id:this.not_id, message: message }})\n this.not_id++\n }\n\n getPolylineById(id){\n return this.state.polylines.filter(el => el.id === id)[0]\n }\n\n addCursorPoint(){\n this.canvas.appendChild(this.new_point.el)\n this.new_point.added = true\n this.new_point.select()\n }\n\n removeCursorPoint(){\n this.canvas.removeChild(this.new_point.el)\n this.new_point.added = false\n }\n\n updateToDo(type, value){\n let toDo = this.state.toDo\n toDo[type] = value\n this.setState({toDo})\n }\n\n checkProfile(type){\n const poly1 = this.state.polylines.filter(el => el.type===type)\n if(poly1.length===0){\n this.updateToDo(type, false)\n if(type==='int_prof'){\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n this.inner_poly = null\n this.setState({vessel_capacity:null})\n }\n }\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n this.vessel_poly = null\n this.setState({vessel_volume:null})\n }\n }\n else if(poly1.length===1){\n this.updateToDo(type, true)\n }\n else{\n this.updateToDo(type, false)\n let profile = type === 'int_prof' ? 'internal profile' : 'outer profile'\n this.addNotification(`There should be only one ${profile}`)\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // JOIN POLYLINES //\n //////////////////////////////////////////////////////////////////////////////\n\n joinIntExt(){\n const poly1 = this.state.polylines.filter(el => el.type==='int_prof')[0]\n const poly2 = this.state.polylines.filter(el => el.type==='out_prof')[0]\n if(!poly1 || !poly2){\n this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\")\n return\n }\n this.vesselVolume = join2Polylines(poly1, poly2)\n if(!this.vesselVolume){\n this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\")\n return\n }\n\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n }\n this.vessel_poly = create_polygon(this.vesselVolume, 'rgba(170, 170, 170, 0.6)')\n const volume = calc_vol(this.vesselVolume, this.scale)\n this.setState({vessel_volume:volume})\n this.canvas.appendChild(this.vessel_poly)\n }\n\n create_inner_polygon(){\n let poly = this.state.polylines.filter(el => el.type==='int_prof')\n if(poly.length===0){\n this.addNotification(\"To calculate vessel capacity you need an internal profile\")\n return\n }\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n }\n //define inner polygon points based on inner profile and rotation axis\n this.innerPolygon = innerProfileToPolygon(poly[0].points.slice())\n //create svg polygon\n this.inner_poly = create_polygon(this.innerPolygon, 'rgba(210, 204, 78, 0.28)')\n\n if(this.scale){\n const volume = calc_vol(this.innerPolygon, this.scale)\n this.setState({vessel_capacity:volume})\n }else{\n this.addNotification('Can\\'t measure, define scale first')\n }\n this.canvas.appendChild(this.inner_poly)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // ADD REFERENCE SCALE rotation axis AND MAX FILL //\n //////////////////////////////////////////////////////////////////////////////\n\n metricForm(obj){\n if(obj.ref_unit){\n this.updateToDo('ref_unit', true)\n this.setState({metric_value:obj.value, metric_unit: obj.unit}, () => {\n if(this.metric && this.metric.points.length===2){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n }\n })\n }else{\n this.updateToDo('ref_unit', false)\n this.scale = null\n }\n }\n\n defineMaxFill(){\n //remove maxFill if present\n if(this.maxFill){\n this.canvas.removeChild(this.maxFill.el)\n this.updateToDo('maxFill', false)\n }\n //create new maxFill polyline\n this.maxFill = new Polyline({\n points: [],\n id: 'max_fill',\n type: 'max_fill',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({code:'Escape'})\n }\n\n addMaxFill(e){\n this.maxFill.stroke = 'rgb(0, 255, 21)'\n this.maxFill.add_point(e)\n this.canvas.appendChild(this.maxFill.el)\n this.maxFill.draw()\n //exit editing mode\n this.maxFill.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.maxFill = this.maxFill.points[0].cy\n this.updateToDo('maxFill', true)\n }\n\n defineMetric(){\n this.unselect_polyline({code:\"Escape\"})\n //remove metric if present\n if(this.metric){\n this.canvas.removeChild(this.metric.el)\n this.updateToDo('metric', false)\n }\n //create new metric polyline\n this.metric = new Polyline({\n points: [],\n id: 'metric',\n type: 'metric',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMetric)\n this.metric.stopEditing({code:'Escape'})\n }\n\n addMetric(e){\n if(this.metric.points.length === 0){\n this.metric.add_point(e)\n }\n else if(this.metric.points.length === 1){\n //this is the 2nd point, add it and exit editing\n this.metric.add_point(e)\n this.metric.stroke = 'red'\n this.metric.stopEditing({code:\"Escape\"})\n //set color\n this.metric.el.classList.remove('active')\n //stop editing\n this.canvas.removeEventListener('dblclick', this.addMetric)\n this.updateToDo('metric', true)\n this.removeCursorPoint()\n if(this.state.metric_value && this.state.metric_unit){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n }\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n\n }\n }\n\n definerotAxis(){\n //remove if already present\n if(this.rotAxis){\n this.canvas.removeChild(this.rotAxis.el)\n window.r_axis = null\n this.updateToDo('rotAxis', false)\n }\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addRotAxis)\n }\n\n addRotAxis(e){\n //create rotation axis polyline\n this.rotAxis = new Polyline({\n points: [],\n id: this.id,\n type: 'center',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n this.rotAxis.stroke = '#ff5a00'\n this.rotAxis.add_point(e)\n this.canvas.appendChild(this.rotAxis.el)\n this.rotAxis.draw()\n //exit editing mode\n this.rotAxis.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addRotAxis)\n this.rotAxis.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.r_axis = this.rotAxis.points[0].cx\n this.updateToDo('rotAxis', true)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER EDITING //\n //////////////////////////////////////////////////////////////////////////////\n\n colorChange(id, color){\n const my_polyline = this.getPolylineById(id)\n my_polyline.stroke = color\n my_polyline.draw()\n }\n\n typeChange(id, type){\n this.setState(\n {polylines: this.state.polylines.map(el =>\n {\n if(el.id===id){\n el.type = type\n return el\n }\n return el\n })\n }, ()=> { this.checkProfile('int_prof'); this.checkProfile('out_prof') }\n )\n }\n\n delete_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.canvas.removeChild(this.state.active_polyline.el)\n this.setState({\n polylines:this.state.polylines.filter(\n el => el.id !== this.state.active_polyline.id),\n active_polyline: undefined\n }, ()=> {\n this.checkProfile('int_prof');\n this.checkProfile('out_prof');\n recreate_snapping_points(this.state.polylines)\n }\n )\n }\n\n edit_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.state.active_polyline.editLine()\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER BREAKING //\n //////////////////////////////////////////////////////////////////////////////\n\n enterBreakLineMode(){\n this.globalStopEditingMode()\n //check if breaking selected line is possible\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n if(this.state.active_polyline.points.length <= 2){\n this.addNotification(\"Line has two or less vertices and can't be subdivided\")\n return\n }\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = true\n this.setState({active_polyline})\n //add breaking points to canvas\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!==this.state.active_polyline.points.length-1){\n this.canvas.appendChild(point.el)\n point.draw()\n point.el.addEventListener('click', this.breakLine)\n }\n x++\n }.bind(this))\n }\n\n exitBreakLineMode(e){\n //remove breaking points from canvas\n if ((e.code === 'Escape' || e.code === 'KeyQ') && this.state.active_polyline.breaking_mode) {\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!== this.state.active_polyline.points.length-1){\n point.el.removeEventListener('click', this.breakLine)\n this.canvas.removeChild(point.el)\n }\n x++\n }.bind(this))\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = false\n this.setState({active_polyline})\n }\n }\n\n breakLine(e){\n const break_point = [e.target.getAttribute('cx'), e.target.getAttribute('cy')]\n this.exitBreakLineMode({code: 'Escape'})\n //instantiate polyline list to edit\n const new_polylines = this.state.polylines\n //create a new polyline\n let polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n }\n )\n //loop over the polyine to break and add point to new polyline until you get to the breaking point\n this.state.active_polyline.points.forEach(function(point) {\n polyline.appendPoint([point.cx, point.cy])\n if(point.cx===parseFloat(break_point[0]) && point.cy===parseFloat(break_point[1])){\n //save draw and exit editing mode\n polyline.el.classList.remove('active')\n new_polylines.push( polyline )\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //create a new polyline with starting point the breaking point\n polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n polyline.appendPoint([point.cx, point.cy])\n }\n }.bind(this))\n //save draw and exit editing mode for sencond line\n new_polylines.push(polyline)\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //delete orignal broken line and exit editing mode\n this.state.active_polyline.stopEditing({'code':'Escape'})\n this.canvas.removeChild(this.state.active_polyline.el)\n //update the state with the two new lines without the old one\n this.setState(\n { polylines: new_polylines.filter(el=>el.id!==this.state.active_polyline.id),\n active_polyline: polyline\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // HANDLE IMAGE //\n //////////////////////////////////////////////////////////////////////////////\n\n image_rotate(e){\n this.bck_image.style.transform = `rotate(${e.target.value}deg)`\n }\n\n fileChangedHandler(e){\n let img_name = e.target.value.split(\"\\\\\")\n img_name = img_name[img_name.length-1]\n this.setState({img_name})\n var img = new Image();\n img.src = window.URL.createObjectURL( e.target.files[0] );\n img.onload = function() {\n var width = img.naturalWidth\n var height = img.naturalHeight\n let toDo = this.state.toDo\n toDo.image = true\n this.setState({\n img_w:width,\n img_h:height,\n selectedFile: img.src,\n toDo: toDo\n })\n }.bind(this)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // DOWNLOAD //\n //////////////////////////////////////////////////////////////////////////////\n\n download_svg(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n let saved_path = this.state.selectedFile\n if(this.state.img_name){\n this.setState({selectedFile:this.state.img_name.replace('href':'xlink:href')}, ()=> {\n download(this.svg.outerHTML, \"dlText.svg\", \"text/plain\");\n this.setState({selectedFile:saved_path})\n })\n }else{\n download(this.svg.outerHTML, \"myVessel.svg\", \"text/plain\");\n }\n }\n\n download_dxf(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n var makerjs = require('makerjs');\n let models = {models:{}}\n let x = 1\n this.state.polylines.forEach(function(polyline){\n let points = polyline.el.getAttribute('points');\n let closed = false; //true for SVG polygon, false for SVG polyline\n let model = makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed, points), false, true);\n model = makerjs.model.scale(model, this.scale/10)\n models.models[`my-${x}-line`] = model\n x++\n }.bind(this))\n models.units = makerjs.units.Meter;\n let file = makerjs.exporter.toDXF(models, {units:makerjs.unitType.Meter})\n download(file, \"myVessel.dxf\", \"text/plain\");\n }\n\n download_json(){\n let title = 'myVessel'\n let coordinates, author, description = ''\n\n let int_prof = this.state.polylines.filter(el=>el.type==='int_prof')\n if(int_prof.length > 0){\n int_prof = int_prof[0]\n }else{\n this.addNotification('No inner profile to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n coordinates = []\n int_prof.points.forEach(function(point){\n // scale the point - unit will be dm - convert to cm - invert y axis\n coordinates.push( [point.cx*this.scale/10, point.cy*this.scale/10*-1] )\n }.bind(this))\n coordinates = JSON.stringify(coordinates)\n let json = `{ \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": ${coordinates}\n },\n \"properties\": {\n \"title\": \"${title}\",\n \"description\": \"${description}\",\n \"author\": \"${author}\"\n }\n }`\n this.addNotification('Export completed')\n download(json, `${title}.json`, \"text/plain\");\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // RENDER //\n //////////////////////////////////////////////////////////////////////////////\n\n render() {\n return (\n
\n\n \n\n

Draw

\n
\n {this.svg = svg}}>\n \n {this.bck_image=bck_image}}\n id=\"bck-img\" href={this.state.selectedFile} x=\"0\" y=\"0\"\n height={this.state.img_h} width={this.state.img_w}/>\n \n \n
\n
Actions:
\n \n New\n
\n \n Break\n
\n \n Delete\n \n \n Edit\n \n\n
Export:
\n \n SVG\n \n \n DXF\n \n \n JSON\n \n \n \n\n
\n
Layers:
\n {this.state.toDo.image &&
\n
\n \n \n
\n
}\n {this.state.polylines.map(el =>\n \n )}\n
\n
\n Double-left-click to draw a point, single left-click and hold to pan the view,\n single left-click to select vertices (in edit and break mode),\n mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line.\n Press Esc or q to quit editing mode and deselect.\n
\n \n\n \n\n \n );\n }\n }\n\n export default Draw;\n\n //get point coordinates from event\n //get_point(e){\n // const matrix = this.canvas.transform.baseVal[0].matrix\n // const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n // return newPoint\n //}\n //\n //\n //\n //joinTwoPolylines(poly1, poly2){\n // const new_poly = join2Polylines(poly1, poly2)\n //\n // if(!new_poly){\n // this.addNotification(\"Not joinable\")\n // return\n // }\n // return joined_poly\n //\n // //const joined_poly = new Polyline({\n // // points: cleanedPoly(new_poly),\n // // id: this.id,\n // // type: poly1.type,\n // // selected: true,\n // // canvas: this.canvas,\n // // offsetX: this.x,\n // // offsetY: this.y,\n // // currentZoom: this.panZoomTiger.getZoom()\n // //})\n // //joined_poly.stopEditing({code:'Escape'})\n // //this.canvas.removeChild(joined_poly.el)\n // //this.id++\n //\n // //this.canvas.removeChild(poly1.el)\n // //this.canvas.removeChild(poly2.el)\n // //this.canvas.appendChild(joined_poly.el)\n // //joined_poly.draw()\n ////\n // //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n // //new_polylines.push(joined_poly)\n // //this.addNotification(message)\n // //this.setState(\n // // { polylines: new_polylines,\n // // notification:{ id:this.not_id, message: message },\n // // active_polyline: joined_poly\n // // }\n // //)\n // //this.not_id++\n //}\n //joinTwoLines(){\n // //TODO\n // this.addNotification(\"Select first line\")\n //}\n //\n // Join 2 lines\n //\n\n\n\n// WEBPACK FOOTER //\n// ./src/Draw.js","import Point from './Point'\nimport MidPoint from './MidPoint'\nimport {cleanedPoly} from './../calc_functions'\n\nexport default class Poly {\n\n constructor(obj) {\n this.points = obj.points\n this.fill = 'none'\n this.stroke = 'magenta'\n this.base_size = 5\n this.id = obj.id\n this.type = obj.type\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n this.el.classList.add('active')\n this.canvas = obj.canvas\n\n this.x = obj.offsetX\n this.y = obj.offsetY\n\n this.zoom = obj.currentZoom\n this.setSize(this.zoom)\n\n this.canvas.appendChild(this.el)\n\n this.draw = this.draw.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.stopEditingPoints = this.stopEditingPoints.bind(this)\n this.get_point = this.get_point.bind(this)\n this.previewPoint = this.previewPoint.bind(this)\n this.create = this.create.bind(this)\n this.add_point = this.add_point.bind(this)\n\n this.canvas.addEventListener('dblclick', this.add_point)\n\n this.editing = false\n this.breaking_mode = false\n\n this.midpoints = []\n }\n\n setSize(zoom){\n this.strokeWidth = this.base_size/zoom\n this.draw()\n }\n draw() {\n this.el.setAttribute('points', this.pointsTo())\n this.el.id = this.id\n this.el.style.fill = this.fill\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n if (this.editing) {\n this.draw_midpoints()\n }\n }\n\n draw_midpoints() {\n //remove from canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n //recreate midpoints\n let index = 0\n this.points.forEach(function(point) {\n if (index > 0 && this.points.length > index) {\n if(point.cx !== this.points[index - 1].cx && point.cy !== this.points[index - 1].cy){\n const midpoint = new MidPoint(\n [ (point.cx + this.points[index - 1].cx) / 2,\n (point.cy + this.points[index - 1].cy) / 2 ],\n index, this.zoom)\n this.midpoints.push(midpoint)\n }\n }\n index++\n }.bind(this))\n //add midpoints to canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.appendChild(midpoint.el)\n midpoint.draw()\n midpoint.el.addEventListener('click', this.create)\n }.bind(this))\n }\n\n create(e) {\n const index = e.target.getAttribute('index')\n const new_point = new Point( [parseFloat(e.target.getAttribute('cx')), parseFloat(e.target.getAttribute('cy'))],\n this.canvas, this.x, this.y, this.zoom\n )\n this.addPointInMiddle(index, new_point)\n }\n\n addPointInMiddle(index, new_point) {\n this.points.splice(index, 0, new_point)\n this.canvas.appendChild(new_point.el)\n new_point.draw()\n new_point.edit()\n new_point.select()\n this.draw()\n }\n\n pointsTo() {\n let str = ''\n this.points.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n return str\n }\n\n //add point\n add_point(e){\n let new_point = this.get_point(e)\n if(this.type==='max_fill'){\n let point = [-1000000, new_point[1]]\n this.appendPoint(point)\n point = [1000000, new_point[1]]\n this.appendPoint(point)\n return\n }\n if(this.type==='center'){\n let point = [new_point[0], -1000000]\n this.appendPoint(point)\n point = [new_point[0], 1000000]\n this.appendPoint(point)\n return\n }\n\n this.appendPoint(new_point)\n }\n\n appendPoint(array) {\n window.snapping_points.push([array[0], array[1]])\n const point = new Point([array[0], array[1]], this.canvas, this.x, this.y, this.zoom)\n this.points.push(point)\n this.draw()\n if (this.points.length === 1) {\n window.addEventListener('mousemove', this.previewPoint)\n window.addEventListener('keyup', this.stopEditing)\n }\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n\n }\n\n previewPoint(e) {\n const new_point = this.get_point(e)\n this.points.push(new Point([new_point[0], new_point[1]], this.canvas, this.x, this.y, this.zoom))\n this.draw()\n this.removeLastPoint()\n }\n\n editLine() {\n this.editing = true\n window.addEventListener('keyup', this.stopEditingPoints)\n this.points.forEach(function(point) {\n point.x = this.x\n point.y = this.y\n this.canvas.appendChild(point.el)\n point.draw()\n point.edit()\n }.bind(this))\n this.draw_midpoints()\n window.addEventListener('mousemove', this.draw)\n }\n\n stopEditingPoints(e) {\n this.editing = false\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n window.removeEventListener('mousemove', this.draw)\n }\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n this.points.forEach(function(point) {\n this.canvas.removeChild(point.el)\n point.clear()\n }.bind(this))\n this.points = cleanedPoly(this.points)\n this.draw()\n window.removeEventListener('keyup', this.stopEditingPoints)\n }\n\n removeLastPoint() {\n this.points.pop()\n }\n\n stopEditing(e) {\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n this.canvas.removeEventListener('dblclick', this.add_point)\n window.removeEventListener('mousemove', this.previewPoint)\n window.removeEventListener('keyup', this.stopEditing)\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Polyline.js","export default class MidPoint {\n\n constructor(points, index, zoom) {\n this.cx = points[0]\n this.cy = points[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n this.strokeWidth = '2'\n this.index = index\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n this.zoom = zoom\n\n this.base_size = 17\n this.size = this.base_size / zoom\n this.base_stroke = 5\n this.strokeWidth = this.base_stroke / zoom\n\n }\n\n setSize(zoom) {\n this.zoom = zoom\n this.strokeWidth = this.base_stroke / zoom\n this.size = this.base_size / zoom\n this.draw()\n }\n\n draw() {\n this.el.setAttribute('x', this.cx - (this.size/2))\n this.el.setAttribute('y', this.cy - (this.size/2))\n this.el.setAttribute('cx', this.cx)\n this.el.setAttribute('cy', this.cy)\n this.el.setAttribute('height', this.size)\n this.el.setAttribute('width', this.size)\n this.el.setAttribute('index', this.index)\n this.el.style.fill = this.fill\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.stroke = this.stroke\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/MidPoint.js","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/area.js\n// module id = 81\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/centroid.js\n// module id = 82\n// module chunks = 0","import cross from \"./cross\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/hull.js\n// module id = 83\n// module chunks = 0","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/cross.js\n// module id = 84\n// module chunks = 0","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/contains.js\n// module id = 85\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/length.js\n// module id = 86\n// module chunks = 0","import React, { Component } from 'react';\n\nexport default class ListPoly extends Component {\n state = {\n types : [\n {val: 'other', text: 'Other'},\n {val: 'int_prof', text: 'Inner profile'},\n {val: 'out_prof', text: 'Outer profile'},\n {val: 'handle', text: 'Handle'},\n ],\n colors : [\n {val: 'magenta', text: 'Magenta'},\n {val: '#1d47ff', text: 'Blue'},\n {val: '#ff3b30', text: 'Red'},\n {val: '#4bea4b', text: 'Green'},\n {val: 'black', text: 'Black'},\n {val: 'white', text: 'White'},\n ]\n }\n\n colorChange(e){\n this.props.colorChange(this.props.id, e.target.value)\n this.color.value = e.target.value\n }\n\n typeChange(e){\n this.props.typeChange(this.props.id, e.target.value)\n this.type.value = e.target.value\n }\n\n render(){\n return (\n this.props.selectLayer(this.props.id)}\n >\n
\n \n
\n
\n \n
\n
\n \n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/listPoly.js","import React, { Component } from 'react';\n\nexport default class Notification extends Component {\n state = {\n id: -1\n }\n componentWillReceiveProps(nextProps){\n if(nextProps.notification.id!==this.state.id){\n this.setState({id:nextProps.notification.id})\n this.notification.innerHTML = nextProps.notification.message\n this.notification.style.display = \"block\"\n setTimeout(()=>this.notification.style.display=\"none\", 1500)\n }\n }\n render(){\n return (\n
this.notification=notification}>
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Notification.js","import React, { Component } from 'react';\n\nexport default class Steps extends Component {\n metricForm(){\n const value = this.ref_val.value\n const unit = this.reference_unit.value\n if(value&&unit){\n this.props.handleForm({ref_unit: true, value:value, unit:unit})\n }else{\n this.props.handleForm({ref_unit: false, value:value, unit:unit})\n }\n }\n\n render(){\n return (\n
\n

Steps:

\n
    \n
  • \n
    \n
    \n
    \n 1. Select image\n
    \n
    \n \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 2. Draw rotation axis\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 3. Draw reference scale\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 4. Define reference scale length\n
    \n
    \n {this.ref_val = ref_val}}>\n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 5. Draw inner profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 6. Draw outer profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 7- Draw max fill limit\n
    \n
    \n \n
    \n
  • \n
\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Steps.js","import React, { Component } from 'react';\n\nexport default class Measures extends Component {\n state = {\n vessel_weight: 0,\n total_weight: 0,\n\n vessel_volume: 0,\n vessel_unit: 1,\n vessel_specific_weight: 2,\n\n content_specific_weight: 1,\n content_volume: 0,\n }\n\n componentWillReceiveProps(nProp){\n this.setState({content_volume:nProp.content_volume, vessel_volume:nProp.vessel_volume}, () => this.vesselWeightCalc())\n }\n\n vesselWeightCalc(){\n this.setState({ vessel_weight: this.state.vessel_unit * this.state.vessel_specific_weight * this.state.vessel_volume}, () => {\n this.contentWeightCalc()\n })\n }\n\n contentWeightCalc(){\n this.setState(\n { total_weight: this.state.vessel_weight + (this.state.content_volume * this.state.content_specific_weight)}\n )\n }\n\n contentWeightSetter(e){\n this.setState({content_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselUnitSetter(e){\n this.setState({vessel_unit:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselSpecWeightSetter(e){\n this.setState({vessel_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n render(){\n return (\n
\n

Measures:

\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n

Volume

\n }\n
\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n
\n \n Calculate capacity\n
\n\n { this.props.content_volume &&\n
\n Volume: {this.props.content_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n
\n }\n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n
\n \n Calculate vessel volume\n
\n\n { this.props.vessel_volume &&\n
\n Volume: {this.props.vessel_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n \n }\n \n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n this.props.vessel_volume && this.props.content_volume &&\n
\n

Weight

\n
\n

Insert specfic weight of vessel's material to calculate vessel weight:

\n \n \n
Vessel weight:\n {this.state.vessel_weight.toFixed(2)}\n Kg\n
\n
\n
\n

Insert type of content to calculate full weight:

\n \n
Full weight:\n {this.state.total_weight.toFixed(2)}\n Kg\n
\n
\n\n
\n }\n { (!this.props.toDo.int_prof || !this.props.toDo.ref_unit\n || !this.props.toDo.metric) &&\n
\n

No calculations available, follow the steps listed on the left

\n
\n }\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Measures.js","var SvgPanZoom = require('./svg-pan-zoom.js');\n\nmodule.exports = SvgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/browserify.js\n// module id = 91\n// module chunks = 0","var Wheel = require('./uniwheel')\n, ControlIcons = require('./control-icons')\n, Utils = require('./utilities')\n, SvgUtils = require('./svg-utilities')\n, ShadowViewport = require('./shadow-viewport')\n\nvar SvgPanZoom = function(svg, options) {\n this.init(svg, options)\n}\n\nvar optionsDefaults = {\n viewportSelector: '.svg-pan-zoom_viewport' // Viewport selector. Can be querySelector string or SVGElement\n, panEnabled: true // enable or disable panning (default enabled)\n, controlIconsEnabled: false // insert icons to give user an option in addition to mouse events to control pan/zoom (default disabled)\n, zoomEnabled: true // enable or disable zooming (default enabled)\n, dblClickZoomEnabled: true // enable or disable zooming by double clicking (default enabled)\n, mouseWheelZoomEnabled: true // enable or disable zooming by mouse wheel (default enabled)\n, preventMouseEventsDefault: true // enable or disable preventDefault for mouse events\n, zoomScaleSensitivity: 0.1 // Zoom sensitivity\n, minZoom: 0.5 // Minimum Zoom level\n, maxZoom: 10 // Maximum Zoom level\n, fit: true // enable or disable viewport fit in SVG (default true)\n, contain: false // enable or disable viewport contain the svg (default false)\n, center: true // enable or disable viewport centering in SVG (default true)\n, refreshRate: 'auto' // Maximum number of frames per second (altering SVG's viewport)\n, beforeZoom: null\n, onZoom: null\n, beforePan: null\n, onPan: null\n, customEventsHandler: null\n, eventsListenerElement: null\n, onUpdatedCTM: null\n}\n\nSvgPanZoom.prototype.init = function(svg, options) {\n var that = this\n\n this.svg = svg\n this.defs = svg.querySelector('defs')\n\n // Add default attributes to SVG\n SvgUtils.setupSvgAttributes(this.svg)\n\n // Set options\n this.options = Utils.extend(Utils.extend({}, optionsDefaults), options)\n\n // Set default state\n this.state = 'none'\n\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Init shadow viewport\n this.viewport = ShadowViewport(SvgUtils.getOrCreateViewport(this.svg, this.options.viewportSelector), {\n svg: this.svg\n , width: this.width\n , height: this.height\n , fit: this.options.fit\n , contain: this.options.contain\n , center: this.options.center\n , refreshRate: this.options.refreshRate\n // Put callbacks into functions as they can change through time\n , beforeZoom: function(oldScale, newScale) {\n if (that.viewport && that.options.beforeZoom) {return that.options.beforeZoom(oldScale, newScale)}\n }\n , onZoom: function(scale) {\n if (that.viewport && that.options.onZoom) {return that.options.onZoom(scale)}\n }\n , beforePan: function(oldPoint, newPoint) {\n if (that.viewport && that.options.beforePan) {return that.options.beforePan(oldPoint, newPoint)}\n }\n , onPan: function(point) {\n if (that.viewport && that.options.onPan) {return that.options.onPan(point)}\n }\n , onUpdatedCTM: function(ctm) {\n if (that.viewport && that.options.onUpdatedCTM) {return that.options.onUpdatedCTM(ctm)}\n }\n })\n\n // Wrap callbacks into public API context\n var publicInstance = this.getPublicInstance()\n publicInstance.setBeforeZoom(this.options.beforeZoom)\n publicInstance.setOnZoom(this.options.onZoom)\n publicInstance.setBeforePan(this.options.beforePan)\n publicInstance.setOnPan(this.options.onPan)\n publicInstance.setOnUpdatedCTM(this.options.onUpdatedCTM)\n\n if (this.options.controlIconsEnabled) {\n ControlIcons.enable(this)\n }\n\n // Init events handlers\n this.lastMouseWheelEventTime = Date.now()\n this.setupHandlers()\n}\n\n/**\n * Register event handlers\n */\nSvgPanZoom.prototype.setupHandlers = function() {\n var that = this\n , prevEvt = null // use for touchstart event to detect double tap\n ;\n\n this.eventListeners = {\n // Mouse down group\n mousedown: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n , touchstart: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n\n // Mouse up group\n , mouseup: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchend: function(evt) {\n return that.handleMouseUp(evt);\n }\n\n // Mouse move group\n , mousemove: function(evt) {\n return that.handleMouseMove(evt);\n }\n , touchmove: function(evt) {\n return that.handleMouseMove(evt);\n }\n\n // Mouse leave group\n , mouseleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchcancel: function(evt) {\n return that.handleMouseUp(evt);\n }\n }\n\n // Init custom events handler if available\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.init({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n\n // Custom event handler may halt builtin listeners\n var haltEventListeners = this.options.customEventsHandler.haltEventListeners\n if (haltEventListeners && haltEventListeners.length) {\n for (var i = haltEventListeners.length - 1; i >= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-pan-zoom.js\n// module id = 92\n// module chunks = 0","// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/uniwheel.js\n// module id = 93\n// module chunks = 0","var SvgUtils = require('./svg-utilities');\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/control-icons.js\n// module id = 94\n// module chunks = 0","var SvgUtils = require('./svg-utilities')\n , Utils = require('./utilities')\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/shadow-viewport.js\n// module id = 95\n// module chunks = 0","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = require('clone');\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = require('kdbush');\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = require('graham_scan');\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = require('bezier-js');\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/makerjs/dist/index.js\n// module id = 97\n// module chunks = 0","var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/clone/clone.js\n// module id = 98\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buffer/index.js\n// module id = 99\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/base64-js/index.js\n// module id = 100\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ieee754/index.js\n// module id = 101\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/isarray/index.js\n// module id = 102\n// module chunks = 0","\nimport sort from './sort';\nimport range from './range';\nimport within from './within';\n\nexport default function kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/index.js\n// module id = 103\n// module chunks = 0","\nexport default function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/sort.js\n// module id = 104\n// module chunks = 0","\nexport default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/range.js\n// module id = 105\n// module chunks = 0","\nexport default function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/within.js\n// module id = 106\n// module chunks = 0","/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==typeof define&&define.amd&&define(function(){return ConvexHullGrahamScan}),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/graham_scan/graham_scan.min.js\n// module id = 107\n// module chunks = 0","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 108\n// module chunks = 0","module.exports = require('./lib/bezier');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/index.js\n// module id = 109\n// module chunks = 0","(function() {\n \"use strict\";\n\n var utils = require(\"./utils.js\");\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/poly-bezier.js\n// module id = 110\n// module chunks = 0","var normalise = require(\"./normalise-svg.js\");\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/svg-to-beziers.js\n// module id = 111\n// module chunks = 0","/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/normalise-svg.js\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/asset-manifest.json b/docs/asset-manifest.json index 41cc608..50675ab 100644 --- a/docs/asset-manifest.json +++ b/docs/asset-manifest.json @@ -1,6 +1,6 @@ { "main.css": "static/css/main.1f97f8c6.css", "main.css.map": "static/css/main.1f97f8c6.css.map", - "main.js": "static/js/main.21b11d96.js", - "main.js.map": "static/js/main.21b11d96.js.map" + "main.js": "static/js/main.b7eb699e.js", + "main.js.map": "static/js/main.b7eb699e.js.map" } \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 273a993..3eb27ab 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -Vessel measuring tool
\ No newline at end of file +Vessel measuring tool
\ No newline at end of file diff --git a/docs/static/js/main.21b11d96.js b/docs/static/js/main.21b11d96.js deleted file mode 100644 index 37c367d..0000000 --- a/docs/static/js/main.21b11d96.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/Vessel-Measuring-Tool/",t(t.s=33)}([function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){e.exports=n(50)()},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(52);n.d(t,"a",function(){return r.a});var i=n(55);n.d(t,"b",function(){return i.a});var o=n(56);n.d(t,"d",function(){return o.a});var a=n(7);n.d(t,"c",function(){return a.a}),n.d(t,"f",function(){return a.b});var s=n(5);n.d(t,"e",function(){return s.b})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return u});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},i=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return o(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},l=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},u=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l});var r=n(53),i=n(54),o=n(5),a=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?f.a.Children.only(e):null},t}(f.a.Component);v.propTypes={history:h.a.object.isRequired,children:h.a.node},v.contextTypes={router:h.a.object},v.childContextTypes={router:h.a.object.isRequired},t.a=v},function(e,t,n){"use strict";var r=n(25),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];var s=[],l=i()(e,s,t),u={re:l,keys:s};return a<1e4&&(r[e]=u,a++),u},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"===typeof t&&(t={path:t});var r=t,i=r.path,o=r.exact,a=void 0!==o&&o,l=r.strict,u=void 0!==l&&l,c=r.sensitive,f=void 0!==c&&c;if(null==i)return n;var p=s(i,{end:a,strict:u,sensitive:f}),h=p.re,d=p.keys,v=h.exec(e);if(!v)return null;var m=v[0],y=v.slice(1),g=e===m;return a&&!g?null:{path:i,url:"/"===i&&""===m?"/":m,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=y[n],e},{})}};t.a=l},function(e,t,n){var r=n(14),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(e){if(e.clientWidth&&e.clientHeight)return{width:e.clientWidth,height:e.clientHeight};if(e.getBoundingClientRect())return e.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(e,t){var n=null;if(!(n=r.isElement(t)?t:e.querySelector(t))){var i=Array.prototype.slice.call(e.childNodes||e.children).filter(function(e){return"defs"!==e.nodeName&&"#text"!==e.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(n=i[0])}if(!n){var o="viewport-"+(new Date).toISOString().replace(/\D/g,"");n=document.createElementNS(this.svgNS,"g"),n.setAttribute("id",o);var a=e.childNodes||e.children;if(a&&a.length>0)for(var s=a.length;s>0;s--)"defs"!==a[a.length-s].nodeName&&n.appendChild(a[a.length-s]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==e.parentNode){var t=e.getAttribute("style")||"";-1===t.toLowerCase().indexOf("overflow")&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:r.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;nt?(clearTimeout(s),s=null,l=c,o=e.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(u,f)),o}},createRequestAnimationFrame:function(e){var t=null;return"auto"!==e&&e<60&&e>1&&(t=Math.floor(1e3/e)),null===t?window.requestAnimationFrame||n(33):n(t)}}},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return y=e,g}}function o(e,t){try{return e(t)}catch(e){return y=e,g}}function a(e,t,n){try{e(t,n)}catch(e){return y=e,g}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&v(e,this)}function l(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),u(e,new d(t,n,a))})}function u(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){m(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?f(t.promise,e._18):p(t.promise,e._18));var r=o(n,e._18);r===g?p(t.promise,y):f(t.promise,r)})}function f(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===g)return p(e,y);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void h(e);if("function"===typeof n)return void v(n.bind(t),e)}e._83=1,e._18=t,h(e)}function p(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),h(e)}function h(e){if(1===e._75&&(u(e,e._38),e._38=null),2===e._75){for(var t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),l=n.n(s),u=n(1),c=n.n(u),f=n(2),p=n.n(f),h=n(4),d=Object.assign||function(e){for(var t=1;t outside a "),p()(void 0!==t,'You must specify the "to" property');var o=this.context.router.history,a="string"===typeof t?Object(h.c)(t,null,null,o.location):t,s=o.createHref(a);return l.a.createElement("a",d({},i,{onClick:this.handleClick,href:s,ref:n}))},t}(l.a.Component);m.propTypes={onClick:c.a.func,target:c.a.string,replace:c.a.bool,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired,innerRef:c.a.oneOfType([c.a.string,c.a.func])},m.defaultProps={replace:!1},m.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired,createHref:c.a.func.isRequired}).isRequired}).isRequired},t.a=m},function(e,t,n){"use strict";var r=n(24);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(2),u=n.n(l),c=n(0),f=n.n(c),p=n(1),h=n.n(p),d=n(12),v=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,c=(r||l.location).pathname;return Object(d.a)(c,{path:i,strict:o,exact:a,sensitive:s},l.match)},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),s()(!(this.props.component&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored"),s()(!(this.props.render&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,a=o.history,s=o.route,l=o.staticContext,u=this.props.location||s.location,c={match:e,location:u,history:a,staticContext:l};return r?e?f.a.createElement(r,c):null:i?e?i(c):null:"function"===typeof n?n(c):n&&!m(n)?f.a.Children.only(n):null},t}(f.a.Component);y.propTypes={computedMatch:h.a.object,path:h.a.string,exact:h.a.bool,strict:h.a.bool,sensitive:h.a.bool,component:h.a.func,render:h.a.func,children:h.a.oneOfType([h.a.func,h.a.node]),location:h.a.object},y.contextTypes={router:h.a.shape({history:h.a.object.isRequired,route:h.a.object.isRequired,staticContext:h.a.object})},y.childContextTypes={router:h.a.object.isRequired},t.a=y},function(e,t,n){function r(e,t){for(var n,r=[],i=0,o=0,a="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var c=n[0],f=n[1],p=n.index;if(a+=e.slice(o,p),o=p+c.length,f)a+=f[1];else{var h=e[o],d=n[2],v=n[3],m=n[4],y=n[5],b=n[6],w=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,k="+"===b||"*"===b,E="?"===b||"*"===b,_=n[2]||s,P=m||y;r.push({name:v||i++,prefix:d||"",delimiter:_,optional:E,repeat:k,partial:x,asterisk:!!w,pattern:P?u(P):w?".*":"[^"+l(_)+"]+?"})}}return o0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:s(e)(t,{pretty:!0})};t.a=l},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n5&&void 0!==arguments[5]&&arguments[5];r(this,e),this.cx=t[0],this.cy=t[1],this.fill="#2da7cf80",this.stroke="rgb(123, 207, 225)",this.selector=s,this.canvas=n,this.x=i,this.y=o,this.zoom=a,this.el=document.createElementNS("http://www.w3.org/2000/svg","circle"),this.select=this.select.bind(this),this.move=this.move.bind(this),this.stopEditing=this.stopEditing.bind(this),this.get_point=this.get_point.bind(this),this.old_cx=t[0],this.old_cy=t[1],this.base_size=10,this.base_stroke=5,this.size=this.base_size/a,this.strokeWidth=this.base_stroke/a}return i(e,[{key:"draw",value:function(){this.el.setAttribute("cx",this.cx),this.el.setAttribute("cy",this.cy),this.el.setAttribute("r",this.size),this.el.style.stroke=this.stroke,this.el.style.strokeWidth=this.strokeWidth,this.el.style.fill=this.fill}},{key:"setSize",value:function(e){this.size=this.base_size/e,this.strokeWidth=this.base_stroke/e,this.draw()}},{key:"edit",value:function(){this.el.addEventListener("click",this.select)}},{key:"clear",value:function(){window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing),this.fill="#2da7cf80",this.cx=this.old_cx,this.cy=this.old_cy,this.draw()}},{key:"stopEditing",value:function(){window.snapping_points.push([this.cx,this.cy]),this.old_cx=this.cx,this.old_cy=this.cy,this.fill="#2da7cf80",this.draw(),window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1||c<0||c>1)&&{x:e+u*(n-e),y:t+u*(r-t)}}function i(e,t){var n=s(e),r=2*(n.centroid[0]-window.r_axis)*Math.PI,i=r*n.area*Math.pow(t,3);return Math.abs(i)}function o(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function a(e,t,n){if(!e)return null;var r=[e.points[0].cx,e.points[0].cy],i=[e.points[1].cx,e.points[1].cy],a=o(r,i);return("inch"===n?2.54*t:t)/a/10}function s(e){var t=[];return e.forEach(function(e){t.push([e.cx,e.cy])}),{centroid:d.polygonCentroid(t),area:d.polygonArea(t)}}function l(e){var t=[],n=0;return e.forEach(function(r){ni.cy&&window.maxFill=1?("start-start"===n[0]?r=e.points.reverse().concat(t.points):"end-end"===n[0]?r=e.points.concat(t.points.reverse()):"start-end"===n[0]?r=t.points.concat(e.points):"end-start"===n[0]&&(r=e.points.concat(t.points)),n.length,r):void 0}n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return f}),n.d(t,"g",function(){return p}),n.d(t,"f",function(){return h}),n.d(t,"e",function(){return c});var d=n(80)},function(e,t,n){!function(){"use strict";function t(e,t,n,r,i){"undefined"===typeof i&&(i=.5);var o=p.projectionratio(i,e),a=1-o,s={x:o*t.x+a*r.x,y:o*t.y+a*r.y},l=p.abcratio(i,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s}}var r=Math.abs,i=Math.min,o=Math.max,a=Math.cos,s=Math.sin,l=Math.acos,u=Math.sqrt,c=Math.PI,f={x:0,y:0,z:0},p=n(32),h=n(110),d=function(e){var t=e&&e.forEach?e:[].slice.call(arguments),n=!1;if("object"===typeof t[0]){n=t.length;var i=[];t.forEach(function(e){["x","y","z"].forEach(function(t){"undefined"!==typeof e[t]&&i.push(e[t])})}),t=i}var o=!1,a=t.length;if(n){if(n>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var s=!o&&(9===a||12===a)||e&&e[0]&&"undefined"!==typeof e[0].z;this._3d=s;for(var l=[],u=0,c=s?3:2;u1e-4)return void(e._linear=!1);e._linear=!0}(this),this._t1=0,this._t2=1,this.update()},v=n(111);d.SVGtoBeziers=function(e){return v(d,e)},d.quadraticFromPoints=function(e,n,r,i){if("undefined"===typeof i&&(i=.5),0===i)return new d(n,n,r);if(1===i)return new d(e,n,n);var o=t(2,e,n,r,i);return new d(e,o.A,r)},d.cubicFromPoints=function(e,n,r,i,o){"undefined"===typeof i&&(i=.5);var a=t(3,e,n,r,i);"undefined"===typeof o&&(o=p.dist(n,a.C));var s=o*(1-i)/i,l=p.dist(e,r),u=(r.x-e.x)/l,c=(r.y-e.y)/l,f=o*u,h=o*c,v=s*u,m=s*c,y={x:n.x-f,y:n.y-h},g={x:n.x+v,y:n.y+m},b=a.A,w={x:b.x+(y.x-b.x)/(1-i),y:b.y+(y.y-b.y)/(1-i)},x={x:b.x+(g.x-b.x)/i,y:b.y+(g.y-b.y)/i},k={x:e.x+(w.x-e.x)/i,y:e.y+(w.y-e.y)/i},E={x:r.x+(x.x-r.x)/(1-i),y:r.y+(x.y-r.y)/(1-i)};return new d(e,k,E,r)};var m=function(){return p};d.getUtils=m,d.PolyBezier=h,d.prototype={getUtils:m,valueOf:function(){return this.toString()},toString:function(){return p.pointsToString(this.points)},toSVG:function(e){if(this._3d)return!1;for(var t=this.points,n=t[0].x,r=t[0].y,i=["M",n,r,2===this.order?"Q":"C"],o=1,a=t.length;o1;t--,n--){for(var r,i=[],o=0;o0},length:function(){return p.length(this.derivative.bind(this))},_lut:[],getLUT:function(e){if(e=e||100,this._lut.length===e)return this._lut;this._lut=[],e--;for(var t=0;t<=e;t++)this._lut.push(this.compute(t/e));return this._lut},on:function(e,t){t=t||5;for(var n,r=this.getLUT(),i=[],o=0,a=0;a1;){for(var p=0;p1;){for(r=[],a=0,s=n.length-1;a=0&&e<=1}),i=i.concat(r[n].sort(p.numberSort))}.bind(this)),i=i.sort(p.numberSort).filter(function(e,t){return i.indexOf(e)===t}),r.values=i,r},bbox:function(){var e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=p.getminmax(this,n,e[n])}.bind(this)),t},overlaps:function(e){var t=this.bbox(),n=e.bbox();return p.bboxoverlap(t,n)},offset:function(e,t){if("undefined"!==typeof t){var n=this.get(e),r=this.normal(e),i={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(i.z=n.z+r.z*t),i}if(this._linear){var o=this.normal(0),a=this.points.map(function(t){var n={x:t.x+e*o.x,y:t.y+e*o.y};return t.z&&r.z&&(n.z=t.z+e*o.z),n});return[new d(a)]}return this.reduce().map(function(t){return t.scale(e)})},simple:function(){if(3===this.order){var e=p.angle(this.points[0],this.points[3],this.points[1]),t=p.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}var n=this.normal(0),i=this.normal(1),o=n.x*i.x+n.y*i.y;return this._3d&&(o+=n.z*i.z),r(l(o))1,s.endcap.virtual=o0&&(i=i.concat(t))}),i},arcs:function(e){e=e||.5;var t=[];return this._iterate(e,t)},_error:function(e,t,n,i){var o=(i-n)/4,a=this.get(n+o),s=this.get(i-o),l=p.dist(e,t),u=p.dist(e,a),c=p.dist(e,s);return r(u-l)+r(c-l)},_iterate:function(e,t){var n,r=0,i=1;do{n=0,i=1;var o,l,u,c,f,h=this.get(r),d=!1,v=!1,m=i,y=1,g=0;do{v=d,c=u,m=(r+i)/2,g++,o=this.get(m),l=this.get(i),u=p.getccenter(h,o,l),u.interval={start:r,end:i};if(d=this._error(u,h,r,i)<=e,f=v&&!d,f||(y=i),d){if(i>=1){if(u.interval.end=y=1,c=u,i>1){var b={x:u.x+u.r*a(u.e),y:u.y+u.r*s(u.e)};u.e+=p.angle({x:u.x,y:u.y},b,this.get(1))}break}i+=(i-r)/2}else i=m}while(!f&&n++<100);if(n>=100)break;c=c||u,t.push(c),r=y}while(i<1);return t}},e.exports=d}()},function(e,t,n){!function(){"use strict";var t=Math.abs,r=Math.cos,i=Math.sin,o=Math.acos,a=Math.atan2,s=Math.sqrt,l=Math.pow,u=function(e){return e<0?-l(-e,1/3):l(e,1/3)},c=Math.PI,f=2*c,p=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,d=Number.MIN_SAFE_INTEGER||-9007199254740991,v={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){var n=t(e),r=n.x*n.x+n.y*n.y;return"undefined"!==typeof n.z&&(r+=n.z*n.z),s(r)},between:function(e,t,n){return t<=e&&e<=n||v.approximately(e,t)||v.approximately(e,n)},approximately:function(e,n,r){return t(e-n)<=(r||1e-6)},length:function(e){var t,n,r=0,i=v.Tvalues.length;for(t=0;to.x.min&&(t=o.x.min),n>o.y.min&&(n=o.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,o.push(a))}})}),o},makeshape:function(e,t,n){var r=t.points.length,i=e.points.length,o=v.makeline(t.points[r-1],e.points[0]),a=v.makeline(e.points[i-1],t.points[0]),s={startcap:o,forward:e,back:t,endcap:a,bbox:v.findbbox([o,e,t,a])},l=v;return s.intersections=function(e){return l.shapeintersections(s,s.bbox,e,e.bbox,n)},s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};var r,i,o=h,a=d;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(var s=0,l=n.length;sa&&(a=i[t]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(e,t){var n=t.p1.x,o=t.p1.y,s=-a(t.p2.y-o,t.p2.x-n),l=function(e){return{x:(e.x-n)*r(s)-(e.y-o)*i(s),y:(e.x-n)*i(s)+(e.y-o)*r(s)}};return e.map(l)},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};var n=e.length-1,i=v.align(e,t),a=function(e){return 0<=e&&e<=1};if(2===n){var l=i[0].y,c=i[1].y,p=i[2].y,h=l-2*c+p;if(0!==h){var d=-s(c*c-l*p),m=-l+c,y=-(d+m)/h;return[y,-(-d+m)/h].filter(a)}return c!==p&&0===h?[(2*c-p)/2*(c-p)].filter(a):[]}var g=i[0].y,b=i[1].y,w=i[2].y,x=i[3].y,h=3*b-g-3*w+x,l=3*g-6*b+3*w,c=-3*g+3*b,p=g;if(v.approximately(h,0)){if(v.approximately(l,0))return v.approximately(c,0)?[]:[-p/c].filter(a);var k=s(c*c-4*l*p),E=2*l;return[(k-c)/E,(-c-k)/E].filter(a)}l/=h,c/=h,p/=h;var _,y,P,C,T,i=(3*c-l*l)/3,S=i/3,k=(2*l*l*l-9*l*c+27*p)/27,A=k/2,M=A*A+S*S*S;if(M<0){var O=-i/3,R=O*O*O,z=s(R),L=-k/(2*z),N=L<-1?-1:L>1?1:L,I=o(N),j=u(z),D=2*j;return P=D*r(I/3)-l/3,C=D*r((I+f)/3)-l/3,T=D*r((I+2*f)/3)-l/3,[P,C,T].filter(a)}if(0===M)return _=A<0?u(-A):-u(A),P=2*_-l/3,C=-_-l/3,[P,C].filter(a);var B=s(M);return _=u(-A+B),y=u(A+B),[_-y-l/3].filter(a)},droots:function(e){if(3===e.length){var t=e[0],n=e[1],r=e[2],i=t-2*n+r;if(0!==i){var o=-s(n*n-t*r),a=-t+n;return[-(o+a)/i,-(-o+a)/i]}return n!==r&&0===i?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){var t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}},inflections:function(e){if(e.length<4)return[];var t=v.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,i=t[1].x*t[2].y,o=t[3].x*t[2].y,a=18*(-3*n+2*r+3*i-o),s=18*(3*n-r-3*i),l=18*(i-n);if(v.approximately(a,0)){if(!v.approximately(s,0)){var u=-l/s;if(0<=u&&u<=1)return[u]}return[]}var c=s*s-4*a*l,f=Math.sqrt(c),o=2*a;return v.approximately(o,0)?[]:[(f-s)/o,-(s+f)/o].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){var r,i,o,a,s,l=["x","y"],u=l.length;for(r=0;r=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){var r=e.bbox(),i=t.bbox(),o=1e5,a=n||.5;if(r.x.size+r.y.sizeA||A>M)&&(S+=f),S>M&&(o=M,M=S,S=o)):Mu){for(var t=0,n=a.length-l;t-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function v(e){var t=new i;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];m.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=h,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var i=new h(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new m(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&y.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(41),a=n.n(o),s=n(20),l=n(75),u=(n.n(l),n(76));a.a.render(i.a.createElement(s.a,null,i.a.createElement(u.a,null)),document.getElementById("root"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rD.length&&D.push(e)}function p(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:a=!0}}if(a)return n(i,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function B(e){e.eventPool=[],e.getPooled=j,e.release=D}function U(e,t){switch(e){case"keyup":return-1!==ki.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function F(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function J(e,t){switch(e){case"compositionend":return F(t);case"keypress":return 32!==t.which?null:(Ai=!0,Ti);case"textInput":return e=t.data,e===Ti&&Ai?null:e;default:return null}}function V(e,t){if(Mi)return"compositionend"===e||!Ei&&U(e,t)?(e=L(),yi._root=null,yi._startText=null,yi._fallbackText=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function pe(e){return e[1].toUpperCase()}function he(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(null!==i?0===i.type:!r&&(2Oo.length&&Oo.push(e)}}}function Ze(e){return Object.prototype.hasOwnProperty.call(e,Io)||(e[Io]=No++,Lo[e[Io]]={}),Lo[e[Io]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ye(e,t){var n=He(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=He(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Xe(e,t){if(Jo||null==Bo||Bo!==Br())return null;var n=Bo;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Fo&&Ur(Fo,n)?null:(Fo=n,e=I.getPooled(Do.select,Uo,e,t),e.type="select",e.target=Bo,A(e),e)}function Ge(e){var t="";return Nr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function $e(e,t){return e=jr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Qe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function it(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function ot(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ot(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function st(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||va.hasOwnProperty(i)&&va[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function ut(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function ct(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ze(e);t=Kr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function ht(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function dt(e,t,n,r){var i=ct(t,n);switch(t){case"iframe":case"object":Je("load",e);var o=n;break;case"video":case"audio":for(o=0;oCa||(e.current=Pa[Ca],Pa[Ca]=null,Ca--)}function Pt(e,t){Ca++,Pa[Ca]=e.current,e.current=t}function Ct(e){return St(e)?Aa:Ta.current}function Tt(e,t){var n=e.type.contextTypes;if(!n)return Jr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function St(e){return 2===e.tag&&null!=e.type.childContextTypes}function At(e){St(e)&&(_t(Sa,e),_t(Ta,e))}function Mt(e){_t(Sa,e),_t(Ta,e)}function Ot(e,t,n){Ta.current!==Jr&&r("168"),Pt(Ta,t,e),Pt(Sa,n,e)}function Rt(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ae(e)||"Unknown",o);return jr({},t,n)}function zt(e){if(!St(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Jr,Aa=Ta.current,Pt(Ta,t,e),Pt(Sa,Sa.current,e),!0}function Lt(e,t){var n=e.stateNode;if(n||r("169"),t){var i=Rt(e,Aa);n.__reactInternalMemoizedMergedChildContext=i,_t(Sa,e),_t(Ta,e),Pt(Ta,i,e)}else _t(Sa,e);Pt(Sa,t,e)}function Nt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function It(e,t,n){var r=e.alternate;return null===r?(r=new Nt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function jt(e,t,n){var i=e.type,o=e.key;if(e=e.props,"function"===typeof i)var a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case Vi:return Dt(e.children,t,n,o);case Yi:a=11,t|=3;break;case qi:a=11,t|=2;break;case Wi:return i=new Nt(15,e,o,4|t),i.type=Wi,i.expirationTime=n,i;case Xi:a=16,t|=2;break;default:e:{switch("object"===typeof i&&null!==i?i.$$typeof:null){case Zi:a=13;break e;case Hi:a=12;break e;case Ki:a=14;break e;default:r("130",null==i?i:typeof i,"")}a=void 0}}return t=new Nt(a,e,o,t),t.type=i,t.expirationTime=n,t}function Dt(e,t,n,r){return e=new Nt(10,e,r,t),e.expirationTime=n,e}function Bt(e,t,n){return e=new Nt(6,e,null,t),e.expirationTime=n,e}function Ut(e,t,n){return t=new Nt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ft(e,t,n){return t=new Nt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Jt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ma=Jt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Jt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function qt(e){"function"===typeof Ma&&Ma(e)}function Wt(e){"function"===typeof Oa&&Oa(e)}function Zt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Kt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Xt(e,t,n){var r=e.alternate;if(null===r){var i=e.updateQueue,o=null;null===i&&(i=e.updateQueue=Zt(e.memoizedState))}else i=e.updateQueue,o=r.updateQueue,null===i?null===o?(i=e.updateQueue=Zt(e.memoizedState),o=r.updateQueue=Zt(r.memoizedState)):i=e.updateQueue=Ht(o):null===o&&(o=r.updateQueue=Ht(i));null===o||i===o?Kt(i,t,n):null===i.lastUpdate||null===o.lastUpdate?(Kt(i,t,n),Kt(o,t,n)):(Kt(i,t,n),o.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Zt(e.memoizedState):$t(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function $t(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ht(t)),t}function Qt(e,t,n,r,i,o){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(o,r,i):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(i="function"===typeof e?e.call(o,r,i):e)||void 0===i)break;return jr({},r,i);case 2:Ra=!0}return r}function en(e,t,n,r,i){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>i)){t=$t(e,t);for(var o=t.baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c>i?(null===a&&(a=l,o=u),(0===s||s>c)&&(s=c)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var f=l.expirationTime;f>i?(null===c&&(c=l,null===a&&(o=u)),(0===s||s>f)&&(s=f)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=s,e.memoizedState=u}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:se(t)}}function on(e){var t=e.type._context;Pt(Na,t._changedBits,e),Pt(La,t._currentValue,e),Pt(za,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Na.current,n=La.current;_t(za,e),_t(La,e),_t(Na,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function sn(e){return e===Ia&&r("174"),e}function ln(e,t){Pt(Ba,t,e),Pt(Da,e,e),Pt(ja,Ia,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}_t(ja,e),Pt(ja,t,e)}function un(e){_t(ja,e),_t(Da,e),_t(Ba,e)}function cn(e){Da.current===e&&(_t(ja,e),_t(Da,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:jr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function pn(e,t,n,r,i,o){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(t,n)||!Ur(r,i))}function hn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function dn(e,t){var n=e.type,r=e.stateNode,i=e.pendingProps,o=Ct(e);r.props=i,r.state=e.memoizedState,r.refs=Jr,r.context=Tt(e,o),o=e.updateQueue,null!==o&&(en(e,o,i,r,t),r.state=e.memoizedState),o=e.type.getDerivedStateFromProps,"function"===typeof o&&(fn(e,o,i),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Ua.enqueueReplaceState(r,r.state,null),null!==(o=e.updateQueue)&&(en(e,o,i,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function vn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===Jr?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function mn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=It(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rv?(m=f,f=null):m=f.sibling;var y=h(r,f,s[v],l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),o=a(y,o,v),null===c?u=y:c.sibling=y,c=y,f=m}if(v===s.length)return n(r,f),u;if(null===f){for(;vm?(y=v,v=null):y=v.sibling;var b=h(o,v,g.value,u);if(null===b){v||(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=a(b,s,m),null===f?c=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),c;if(null===v){for(;!g.done;m++,g=l.next())null!==(g=p(o,g.value,u))&&(s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return c}for(v=i(o,v);!g.done;m++,g=l.next())null!==(g=d(v,o,m,g.value,u))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach(function(e){return t(o,e)}),c}return function(e,i,a,l){var u="object"===typeof a&&null!==a&&a.type===Vi&&null===a.key;u&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case Fi:e:{for(c=a.key,u=i;null!==u;){if(u.key===c){if(10===u.tag?a.type===Vi:u.type===a.type){n(e,u.sibling),i=o(u,a.type===Vi?a.props.children:a.props,l),i.ref=vn(e,u,a),i.return=e,e=i;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===Vi?(i=Dt(a.props.children,e.mode,l,a.key),i.return=e,e=i):(l=jt(a,e.mode,l),l.ref=vn(e,i,a),l.return=e,e=l)}return s(e);case Ji:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],l),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=Ut(a,e.mode,l),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,l),i.return=e,e=i):(n(e,i),i=Bt(a,e.mode,l),i.return=e,e=i),s(e);if(Fa(a))return v(e,i,a,l);if(oe(a))return m(e,i,a,l);if(c&&mn(e,a),"undefined"===typeof a&&!u)switch(e.tag){case 2:case 1:l=e.type,r("152",l.displayName||l.name||"Component")}return n(e,i)}}function gn(e,t){var n=new Nt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if(Za){var t=Wa;if(t){var n=t;if(!bn(e,t)){if(!(t=xt(n))||!bn(e,t))return e.effectTag|=2,Za=!1,void(qa=e);gn(qa,n)}qa=e,Wa=kt(t)}else e.effectTag|=2,Za=!1,qa=e}}function xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;qa=e}function kn(e){if(e!==qa)return!1;if(!Za)return xn(e),Za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Wa;t;)gn(e,t),t=xt(t);return xn(e),Wa=qa?xt(e.stateNode):null,!0}function En(){Wa=qa=null,Za=!1}function _n(e,t,n){Pn(e,t,n,t.expirationTime)}function Pn(e,t,n,r){t.child=null===e?Va(t,null,n,r):Ja(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Tn(e,t,n,r,i){Cn(e,t);var o=0!==(64&t.effectTag);if(!n&&!o)return r&&Lt(t,!1),On(e,t);n=t.stateNode,Bi.current=t;var a=o?null:n.render();return t.effectTag|=1,o&&(Pn(e,t,null,i),t.child=null),Pn(e,t,a,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Lt(t,!0),t.child}function Sn(e){var t=e.stateNode;t.pendingContext?Ot(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(e,t.context,!1),ln(e,t.containerInfo)}function An(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Mn(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(o===i)return t.stateNode=0,on(t),On(e,t);var s=i.value;if(t.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else{var l=o.value;if(l===s&&(0!==l||1/l===1/s)||l!==l&&s!==s){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else if(s="function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,s):1073741823,0===(s|=0)){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t)}else An(t,r,s,n)}return t.stateNode=s,on(t),_n(e,t,i.children),t.child}function On(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=It(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=It(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Rn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Sn(t);break;case 2:zt(t);break;case 4:ln(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=Ct(t);return a=Tt(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,o),o=zt(t),i.updater=Ua,t.stateNode=i,i._reactInternalFiber=t,dn(t,n),e=Tn(e,t,!0,o,n)):(t.tag=1,_n(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(i=Ct(t),i=Tt(t,i),o=o(n,i),t.effectTag|=1,_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 2:if(o=zt(t),null===e)if(null===t.stateNode){var s=t.pendingProps,l=t.type;i=Ct(t);var u=2===t.tag&&null!=t.type.contextTypes;a=u?Tt(t,i):Jr,s=new l(s,a),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=Ua,t.stateNode=s,s._reactInternalFiber=t,u&&(u=t.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=i,u.__reactInternalMemoizedMaskedChildContext=a),dn(t,n),i=!0}else{l=t.type,i=t.stateNode,u=t.memoizedProps,a=t.pendingProps,i.props=u;var c=i.context;s=Ct(t),s=Tt(t,s);var f=l.getDerivedStateFromProps;(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(u!==a||c!==s)&&hn(t,i,a,s),Ra=!1;var p=t.memoizedState;c=i.state=p;var h=t.updateQueue;null!==h&&(en(t,h,a,i,n),c=t.memoizedState),u!==a||p!==c||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),c=t.memoizedState),(u=Ra||pn(t,u,a,p,c,s))?(l||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.effectTag|=4)):("function"===typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,i=u):("function"===typeof i.componentDidMount&&(t.effectTag|=4),i=!1)}else l=t.type,i=t.stateNode,a=t.memoizedProps,u=t.pendingProps,i.props=a,c=i.context,s=Ct(t),s=Tt(t,s),f=l.getDerivedStateFromProps,(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(a!==u||c!==s)&&hn(t,i,u,s),Ra=!1,c=t.memoizedState,p=i.state=c,h=t.updateQueue,null!==h&&(en(t,h,u,i,n),p=t.memoizedState),a!==u||c!==p||Sa.current||Ra?("function"===typeof f&&(fn(t,f,u),p=t.memoizedState),(f=Ra||pn(t,a,u,c,p,s))?(l||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(u,p,s),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(u,p,s)),"function"===typeof i.componentDidUpdate&&(t.effectTag|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),i.props=u,i.state=p,i.context=s,i=f):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),i=!1);return Tn(e,t,i,o,n);case 3:return Sn(t),o=t.updateQueue,null!==o?(i=t.memoizedState,i=null!==i?i.element:null,en(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(En(),e=On(e,t)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Wa=kt(t.stateNode.containerInfo),qa=t,i=Za=!0),i?(t.effectTag|=2,t.child=Va(t,null,o,n)):(En(),_n(e,t,o)),e=t.child)):(En(),e=On(e,t)),e;case 5:return sn(Ba.current),o=sn(ja.current),i=at(o,t.type),o!==i&&(Pt(Da,t,t),Pt(ja,i,t)),null===e&&wn(t),o=t.type,u=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||u!==i||((u=1&t.mode&&!!i.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=i.children,wt(o,i)?u=null:a&&wt(o,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(_n(e,t,u),t.memoizedProps=i,e=t.child)):e=On(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ln(t,t.stateNode.containerInfo),o=t.pendingProps,Sa.current||t.memoizedProps!==o?(null===e?t.child=Ja(t,null,o,n):_n(e,t,o),t.memoizedProps=o,e=t.child):e=On(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,i=t.ref,Sa.current||t.memoizedProps!==n||i!==(null!==e?e.ref:null)?(o=o(n,i),_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=On(e,t):(_n(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Mn(e,t,n);case 12:e:if(i=t.type,a=t.pendingProps,u=t.memoizedProps,o=i._currentValue,s=i._changedBits,Sa.current||0!==s||u!==a){if(t.memoizedProps=a,l=a.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(s&l))An(t,i,s,n);else if(u===a){e=On(e,t);break e}n=a.children,n=n(o),t.effectTag|=1,_n(e,t,n),e=t.child}else e=On(e,t);return e;default:r("156")}}function zn(e){e.effectTag|=4}function Ln(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return At(t),null;case 3:un(t),Mt(t);var i=t.stateNode;return i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),Ha(t),null;case 5:cn(t),i=sn(Ba.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,s=t.stateNode,l=sn(ja.current);s=vt(s,o,a,n,i),Ya(e,t,s,o,a,n,i,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=sn(ja.current),kn(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[ii]=t,n[oi]=a,i=yt(n,o,a,e,i),t.updateQueue=i,null!==i&&zn(t);else{e=pt(o,n,i,e),e[ii]=t,e[oi]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}dt(e,o,n,i),bt(o,n)&&zn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;i=sn(Ba.current),sn(ja.current),kn(t)?(i=t.stateNode,n=t.memoizedProps,i[ii]=t,gt(i,n)&&zn(t)):(i=ht(n,i),i[ii]=t,t.stateNode=i)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return un(t),Ha(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Nn(e,t){var n=t.source;null===t.stack&&null!==n&&se(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function In(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Xn(e,t)}else t.current=null}function jn(e){switch("function"===typeof Wt&&Wt(e),e.tag){case 2:In(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Xn(e,t)}break;case 5:In(e);break;case 4:Un(e)}}function Dn(e){return 5===e.tag||3===e.tag||4===e.tag}function Bn(e){e:{for(var t=e.return;null!==t;){if(Dn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(st(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Dn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(i){var a=t,s=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(s,l):a.insertBefore(s,l)}else t.insertBefore(o.stateNode,n);else i?(a=t,s=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(s,a):a.appendChild(s)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Un(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,s=a;;)if(jn(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}o?(a=i,s=t.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):i.removeChild(t.stateNode)}else if(4===t.tag?i=t.stateNode.containerInfo:jn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Fn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[oi]=i,mt(n,a,o,e,i))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Jn(e,t,n){n=Yt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dr(r),Nn(e,t)},n}function Vn(e,t,n){n=Yt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cs?cs=new Set([this]):cs.add(this);var n=t.value,r=t.stack;Nn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qn(e,t,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Jn(e,r,o),void Gt(e,r,o);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cs||!cs.has(n)))return e.effectTag|=1024,r=Vn(e,t,o),void Gt(e,r,o)}e=e.return}while(null!==e)}function Wn(e){switch(e.tag){case 2:At(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return un(e),Mt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return un(e),null;case 13:return an(e),null;default:return null}}function Zn(){if(null!==ns)for(var e=ns.return;null!==e;){var t=e;switch(t.tag){case 2:At(t);break;case 3:un(t),Mt(t);break;case 5:cn(t);break;case 4:un(t);break;case 13:an(t)}e=e.return}rs=null,is=0,os=-1,as=!1,ns=null,us=!1}function Hn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Ln(t,e,is);var i=e;if(1073741823===is||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1gs)&&(gs=e),e}function Qn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ts&&0!==is&&tTs&&r("185")}e=e.return}}function er(){return $a=ka()-Xa,Ga=2+($a/10|0)}function tr(e){var t=es;es=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{es=t}}function nr(e,t,n,r,i){var o=es;es=1;try{return e(t,n,r,i)}finally{es=o}}function rr(e){if(0!==hs){if(e>hs)return;null!==ds&&_a(ds)}var t=ka()-Xa;hs=e,ds=Ea(ar,{timeout:10*(e-2)-t})}function ir(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ps?(fs=ps=e,e.nextScheduledRoot=e):(ps=ps.nextScheduledRoot=e,ps.nextScheduledRoot=fs);else{var n=e.remainingExpirationTime;(0===n||t=ys)&&(!bs||er()>=ys);)er(),fr(ms,ys,!bs),or();else for(;null!==ms&&0!==ys&&(0===e||e>=ys);)fr(ms,ys,!1),or();null!==ks&&(hs=0,ds=null),0!==ys&&rr(ys),ks=null,bs=!1,cr()}function ur(e,t){vs&&r("253"),ms=e,ys=t,fr(e,t,!1),sr(),cr()}function cr(){if(Ss=0,null!==Cs){var e=Cs;Cs=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Ye(_,C),x=Ye(_,b),w&&x&&(1!==P.rangeCount||P.anchorNode!==w.node||P.anchorOffset!==w.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),P.removeAllRanges(),C>b?(P.addRange(k),P.extend(x.node,x.offset)):(k.setEnd(x.node,x.offset),P.addRange(k))))),P=[];for(C=_;C=C.parentNode;)1===C.nodeType&&P.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_As)&&(bs=!0)}function dr(e){null===ms&&r("246"),ms.remainingExpirationTime=0,ws||(ws=!0,xs=e)}function vr(e){null===ms&&r("246"),ms.remainingExpirationTime=e}function mr(e,t){var n=Es;Es=!0;try{return e(t)}finally{(Es=n)||vs||sr()}}function yr(e,t){if(Es&&!_s){_s=!0;try{return e(t)}finally{_s=!1}}return e(t)}function gr(e,t){vs&&r("187");var n=Es;Es=!0;try{return nr(e,t)}finally{Es=n,sr()}}function br(e,t,n){if(Ps)return e(t,n);Es||vs||0===gs||(lr(gs,!1,null),gs=0);var r=Ps,i=Es;Es=Ps=!0;try{return e(t,n)}finally{Ps=r,(Es=i)||vs||sr()}}function wr(e){var t=Es;Es=!0;try{nr(e)}finally{(Es=t)||vs||lr(1,!1,null)}}function xr(e,t,n,i,o){var a=t.current;if(n){n=n._reactInternalFiber;var s;e:{for(2===ze(n)&&2===n.tag||r("170"),s=n;3!==s.tag;){if(St(s)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}(s=s.return)||r("171")}s=s.stateNode.context}n=St(n)?Rt(n,s):s}else n=Jr;return null===t.context?t.context=n:t.pendingContext=n,t=o,o=Yt(i),o.payload={element:e},t=void 0===t?null:t,null!==t&&(o.callback=t),Xt(a,o,i),Qn(a,i),i}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Ie(t),null===e?null:e.stateNode}function Er(e,t,n,r){var i=t.current;return i=$n(er(),i),xr(e,t,n,i,r)}function _r(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Pr(e){var t=e.findFiberByHostInstance;return Vt(jr({},e,{findHostInstanceByFiber:function(e){return e=Ie(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=_i),Ti=String.fromCharCode(32),Si={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ai=!1,Mi=!1,Oi={eventTypes:Si,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Ei)e:{switch(e){case"compositionstart":i=Si.compositionStart;break e;case"compositionend":i=Si.compositionEnd;break e;case"compositionupdate":i=Si.compositionUpdate;break e}i=void 0}else Mi?U(e,n)&&(i=Si.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Si.compositionStart);return i?(Ci&&(Mi||i!==Si.compositionStart?i===Si.compositionEnd&&Mi&&(o=L()):(yi._root=r,yi._startText=N(),Mi=!0)),i=wi.getPooled(i,t,n,r),o?i.data=o:null!==(o=F(n))&&(i.data=o),A(i),o=i):o=null,(e=Pi?J(e,n):V(e,n))?(t=xi.getPooled(Si.beforeInput,t,n,r),t.data=e,A(t)):t=null,null===o?t:null===t?o:[o,t]}},Ri=null,zi={injectFiberControlledHostComponent:function(e){Ri=e}},Li=null,Ni=null,Ii={injection:zi,enqueueStateRestore:W,needsStateRestore:Z,restoreStateIfNeeded:H},ji=!1,Di={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Bi=Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ui="function"===typeof Symbol&&Symbol.for,Fi=Ui?Symbol.for("react.element"):60103,Ji=Ui?Symbol.for("react.portal"):60106,Vi=Ui?Symbol.for("react.fragment"):60107,qi=Ui?Symbol.for("react.strict_mode"):60108,Wi=Ui?Symbol.for("react.profiler"):60114,Zi=Ui?Symbol.for("react.provider"):60109,Hi=Ui?Symbol.for("react.context"):60110,Yi=Ui?Symbol.for("react.async_mode"):60111,Ki=Ui?Symbol.for("react.forward_ref"):60112,Xi=Ui?Symbol.for("react.timeout"):60113,Gi="function"===typeof Symbol&&Symbol.iterator,$i=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qi=Object.prototype.hasOwnProperty,eo={},to={},no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){no[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){no[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){no[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){no[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){no[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){no[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ro=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),no.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var io={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},oo=null,ao=null,so=!1;Ir.canUseDOM&&(so=ee("input")&&(!document.documentMode||9=document.documentMode,Do={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Bo=null,Uo=null,Fo=null,Jo=!1,Vo={eventTypes:Do,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ze(o),i=Kr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Qo;null!==r;){var i=r.timeoutTime;-1!==i&&i<=t?n.push(r):-1!==i&&(-1===e||it&&(t=8),aa=t"+t+"",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),va={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ma=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});var ya=jr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ga=Dr.thatReturns(""),ba={createElement:pt,createTextNode:ht,setInitialProperties:dt,diffProperties:vt,updateProperties:mt,diffHydratedProperties:yt,diffHydratedText:gt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,forceRefresh:f.a.bool,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node}},function(e,t,n){"use strict";function r(){}var i=n(51);e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Browser history needs a DOM");var t=window.history,n=Object(c.g)(),r=!Object(c.h)(),o=e.forceRefresh,d=void 0!==o&&o,v=e.getUserConfirmation,m=void 0===v?c.c:v,y=e.keyLength,g=void 0===y?6:y,b=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",w=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname,u=o.search,c=o.hash,f=a+u+c;return i()(!b||Object(l.c)(f,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+f+'" to begin with "'+b+'".'),b&&(f=Object(l.e)(f,b)),Object(s.a)(f,r,n)},x=function(){return Math.random().toString(36).substr(2,g)},k=Object(u.a)(),E=function(e){p(J,e),J.length=t.length,k.notifyListeners(J.location,J.action)},_=function(e){Object(c.d)(e)||T(w(e.state))},P=function(){T(w(h()))},C=!1,T=function(e){if(C)C=!1,E();else{k.confirmTransitionTo(e,"POP",m,function(t){t?E({action:"POP",location:e}):S(e)})}},S=function(e){var t=J.location,n=M.indexOf(t.key);-1===n&&(n=0);var r=M.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(C=!0,L(i))},A=w(h()),M=[A.key],O=function(e){return b+Object(l.b)(e)},R=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"PUSH",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.pushState({key:a,state:s},null,r),d)window.location.href=r;else{var l=M.indexOf(J.location.key),u=M.slice(0,-1===l?0:l+1);u.push(o.key),M=u,E({action:"PUSH",location:o})}else i()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},z=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"REPLACE",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.replaceState({key:a,state:s},null,r),d)window.location.replace(r);else{var l=M.indexOf(J.location.key);-1!==l&&(M[l]=o.key),E({action:"REPLACE",location:o})}else i()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},L=function(e){t.go(e)},N=function(){return L(-1)},I=function(){return L(1)},j=0,D=function(e){j+=e,1===j?(Object(c.a)(window,"popstate",_),r&&Object(c.a)(window,"hashchange",P)):0===j&&(Object(c.e)(window,"popstate",_),r&&Object(c.e)(window,"hashchange",P))},B=!1,U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=k.setPrompt(e);return B||(D(1),B=!0),function(){return B&&(B=!1,D(-1)),t()}},F=function(e){var t=k.appendListener(e);return D(1),function(){D(-1),t()}},J={length:t.length,action:"POP",location:A,createHref:O,push:R,replace:z,go:L,goBack:N,goForward:I,block:U,listen:F};return J};t.a=d},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),l=a||s;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var u=void 0;if(o.length){var c=o[o.length-1];u="."===c||".."===c||""===c}else u=!1;for(var f=0,p=o.length;p>=0;p--){var h=o[p];"."===h?i(o,p):".."===h?(i(o,p),f++):f&&(i(o,p),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}t.a=o},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":i(e);if(n!==("undefined"===typeof t?"undefined":i(t)))return!1;if("object"===n){var o=e.valueOf(),a=t.valueOf();if(o!==e||a!==t)return r(o,a);var s=Object.keys(e),l=Object.keys(t);return s.length===l.length&&s.every(function(n){return r(e[n],t[n])})}return!1}var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=r},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Hash history needs a DOM");var t=window.history,n=Object(c.f)(),r=e.getUserConfirmation,o=void 0===r?c.c:r,m=e.hashType,y=void 0===m?"slash":m,g=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",b=p[y],w=b.encodePath,x=b.decodePath,k=function(){var e=x(h());return i()(!g||Object(l.c)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=Object(l.e)(e,g)),Object(s.a)(e)},E=Object(u.a)(),_=function(e){f(W,e),W.length=t.length,E.notifyListeners(W.location,W.action)},P=!1,C=null,T=function(){var e=h(),t=w(e);if(e!==t)v(t);else{var n=k(),r=W.location;if(!P&&Object(s.b)(r,n))return;if(C===Object(l.b)(n))return;C=null,S(n)}},S=function(e){if(P)P=!1,_();else{E.confirmTransitionTo(e,"POP",o,function(t){t?_({action:"POP",location:e}):A(e)})}},A=function(e){var t=W.location,n=z.lastIndexOf(Object(l.b)(t));-1===n&&(n=0);var r=z.lastIndexOf(Object(l.b)(e));-1===r&&(r=0);var i=n-r;i&&(P=!0,j(i))},M=h(),O=w(M);M!==O&&v(O);var R=k(),z=[Object(l.b)(R)],L=function(e){return"#"+w(g+Object(l.b)(e))},N=function(e,t){i()(void 0===t,"Hash history cannot push state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"PUSH",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);if(h()!==r){C=t,d(r);var o=z.lastIndexOf(Object(l.b)(W.location)),a=z.slice(0,-1===o?0:o+1);a.push(t),z=a,_({action:"PUSH",location:n})}else i()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),_()}})},I=function(e,t){i()(void 0===t,"Hash history cannot replace state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"REPLACE",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);h()!==r&&(C=t,v(r));var i=z.indexOf(Object(l.b)(W.location));-1!==i&&(z[i]=t),_({action:"REPLACE",location:n})}})},j=function(e){i()(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},D=function(){return j(-1)},B=function(){return j(1)},U=0,F=function(e){U+=e,1===U?Object(c.a)(window,"hashchange",T):0===U&&Object(c.e)(window,"hashchange",T)},J=!1,V=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return J||(F(1),J=!0),function(){return J&&(J=!1,F(-1)),t()}},q=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},W={length:t.length,action:"POP",location:R,createHref:L,push:N,replace:I,go:j,goBack:D,goForward:B,block:V,listen:q};return W};t.a=m},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(5),a=n(7),s=n(9),l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,f=e.initialIndex,p=void 0===f?0:f,h=e.keyLength,d=void 0===h?6:h,v=Object(s.a)(),m=function(e){u(A,e),A.length=A.entries.length,v.notifyListeners(A.location,A.action)},y=function(){return Math.random().toString(36).substr(2,d)},g=c(p,0,r.length-1),b=r.map(function(e){return"string"===typeof e?Object(a.a)(e,void 0,y()):Object(a.a)(e,void 0,e.key||y())}),w=o.b,x=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=A.index,n=t+1,i=A.entries.slice(0);i.length>n?i.splice(n,i.length-n,r):i.push(r),m({action:"PUSH",location:r,index:n,entries:i})}})},k=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(A.entries[A.index]=r,m({action:"REPLACE",location:r}))})},E=function(e){var n=c(A.index+e,0,A.entries.length-1),r=A.entries[n];v.confirmTransitionTo(r,"POP",t,function(e){e?m({action:"POP",location:r,index:n}):m()})},_=function(){return E(-1)},P=function(){return E(1)},C=function(e){var t=A.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return v.setPrompt(e)},S=function(e){return v.appendListener(e)},A={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:w,push:x,replace:k,go:E,goBack:_,goForward:P,canGo:C,block:T,listen:S};return A};t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(10),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,getUserConfirmation:f.a.func,hashType:f.a.oneOf(["hashbang","noslash","slash"]),children:f.a.node},t.a=d},function(e,t,n){"use strict";var r=n(59);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(11),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={initialEntries:f.a.array,initialIndex:f.a.number,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node},t.a=d},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(23),u=n(22),c=Object.assign||function(e){for(var t=1;t outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);p.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},p.defaultProps={when:!0},p.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired},t.a=p},function(e,t,n){"use strict";var r=n(65);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(4),v=n(26),m=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.c)(e.to),n=Object(d.c)(this.props.to);if(Object(d.f)(t,n))return void f()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"===typeof n?Object(v.a)(n,t.params):m({},n,{pathname:Object(v.a)(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";var r=n(67);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(3),l=n.n(s),u=n(2),c=n.n(u),f=n(0),p=n.n(f),h=n(1),d=n.n(h),v=n(4),m=n(11),y=Object.assign||function(e){for(var t=1;t",e)}},E=function(){},_=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),i=r(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:w(t,Object(v.c)(n)),push:this.handlePush,replace:this.handleReplace,go:k("go"),goBack:k("goBack"),goForward:k("goForward"),listen:this.handleListen,block:this.handleBlock};return p.a.createElement(m.a,y({},i,{history:o}))},t}(p.a.Component);_.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},_.defaultProps={basename:"",location:"/"},_.childContextTypes={router:d.a.object.isRequired},t.a=_},function(e,t,n){"use strict";var r=n(69);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(12),v=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){f()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),f()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return s.a.Children.forEach(t,function(t){if(null==r&&s.a.isValidElement(t)){var o=t.props,a=o.path,l=o.exact,u=o.strict,c=o.sensitive,f=o.from,p=a||f;i=t,r=Object(d.a)(n.pathname,{path:p,exact:l,strict:u,sensitive:c},e.match)}}),r?s.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(s.a.Component);v.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},v.propTypes={children:u.a.node,location:u.a.object},t.a=v},function(e,t,n){"use strict";var r=n(26);r.a},function(e,t,n){"use strict";var r=n(12);r.a},function(e,t,n){"use strict";var r=n(73);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(74),u=n.n(l),c=n(24),f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"other";this.globalStopEditingMode(),this.addCursorPoint();var t=this.state.polylines,n=new c.a({points:[],id:this.id,type:e,selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});t.push(n),this.id++,this.setState({polylines:t,active_polyline:n})}},{key:"selectLayer",value:function(e){var t=this;this.state.active_polyline&&this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"}),this.setState({active_polyline:this.getPolylineById(e)},function(){t.state.polylines.forEach(function(e){e.el.classList.remove("active")}),t.state.active_polyline.el.classList.toggle("active")})}},{key:"unselect_polyline",value:function(e){console.log(e.code),"Escape"!==e.code&&"KeyQ"!==e.code||(this.state.active_polyline&&(this.state.active_polyline.el.classList.remove("active"),this.state.active_polyline.stopEditing({code:"Escape"}),this.state.active_polyline.editing&&this.state.active_polyline.stopEditingPoints({code:"Escape"}),this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"})),this.setState({active_polyline:void 0}),Object(m.g)(this.state.polylines),this.checkProfile("int_prof"),this.checkProfile("out_prof"),this.new_point.added&&this.removeCursorPoint(),this.state.polylines.forEach(function(e){e.points.length<2&&(this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.id})}),this.canvas.removeChild(e.el))}.bind(this)))}},{key:"globalStopEditingMode",value:function(){this.state.polylines.forEach(function(e){e.el.classList.remove("active")}),this.state.active_polyline&&this.state.active_polyline.stopEditing({code:"Escape"})}},{key:"addNotification",value:function(e){this.setState({notification:{id:this.not_id,message:e}}),this.not_id++}},{key:"getPolylineById",value:function(e){return this.state.polylines.filter(function(t){return t.id===e})[0]}},{key:"addCursorPoint",value:function(){this.canvas.appendChild(this.new_point.el),this.new_point.added=!0,this.new_point.select()}},{key:"removeCursorPoint",value:function(){this.canvas.removeChild(this.new_point.el),this.new_point.added=!1}},{key:"updateToDo",value:function(e,t){var n=this.state.toDo;n[e]=t,this.setState({toDo:n})}},{key:"checkProfile",value:function(e){var t=this.state.polylines.filter(function(t){return t.type===e});if(0===t.length)this.updateToDo(e,!1),"int_prof"===e&&this.inner_poly&&(this.canvas.removeChild(this.inner_poly),this.inner_poly=null,this.setState({vessel_capacity:null})),this.vessel_poly&&(this.canvas.removeChild(this.vessel_poly),this.vessel_poly=null,this.setState({vessel_volume:null}));else if(1===t.length)this.updateToDo(e,!0);else{this.updateToDo(e,!1);var n="int_prof"===e?"internal profile":"outer profile";this.addNotification("There should be only one "+n)}}},{key:"joinIntExt",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type})[0],t=this.state.polylines.filter(function(e){return"out_prof"===e.type})[0];if(!e||!t)return void this.addNotification("To calculate vessel volume you need both internal and outer profiles");if(this.vesselVolume=Object(m.f)(e,t),!this.vesselVolume)return void this.addNotification("To calculate vessel volume internal and outer profiles have to share at least one vertex");this.vessel_poly&&this.canvas.removeChild(this.vessel_poly),this.vessel_poly=Object(m.d)(this.vesselVolume,"rgba(170, 170, 170, 0.6)");var n=Object(m.b)(this.vesselVolume,this.scale);this.setState({vessel_volume:n}),this.canvas.appendChild(this.vessel_poly)}},{key:"create_inner_polygon",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(0===e.length)return void this.addNotification("To calculate vessel capacity you need an internal profile");if(this.inner_poly&&this.canvas.removeChild(this.inner_poly),this.innerPolygon=Object(m.e)(e[0].points.slice()),this.inner_poly=Object(m.d)(this.innerPolygon,"rgba(210, 204, 78, 0.28)"),this.scale){var t=Object(m.b)(this.innerPolygon,this.scale);this.setState({vessel_capacity:t})}else this.addNotification("Can't measure, define scale first");this.canvas.appendChild(this.inner_poly)}},{key:"metricForm",value:function(e){var t=this;e.ref_unit?(this.updateToDo("ref_unit",!0),this.setState({metric_value:e.value,metric_unit:e.unit},function(){t.metric&&2===t.metric.points.length&&(t.scale=Object(m.a)(t.metric,t.state.metric_value,t.state.metric_unit),t.innerPolygon&&t.setState({vessel_capacity:Object(m.b)(t.innerPolygon,t.scale)}),t.vesselVolume&&t.setState({vessel_volume:Object(m.b)(t.vesselVolume,t.scale)}))})):(this.updateToDo("ref_unit",!1),this.scale=null)}},{key:"defineMaxFill",value:function(){this.maxFill&&(this.canvas.removeChild(this.maxFill.el),this.updateToDo("maxFill",!1)),this.maxFill=new c.a({points:[],id:"max_fill",type:"max_fill",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"})}},{key:"addMaxFill",value:function(e){this.maxFill.stroke="rgb(0, 255, 21)",this.maxFill.add_point(e),this.canvas.appendChild(this.maxFill.el),this.maxFill.draw(),this.maxFill.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.maxFill=this.maxFill.points[0].cy,this.updateToDo("maxFill",!0)}},{key:"defineMetric",value:function(){this.unselect_polyline({code:"Escape"}),this.metric&&(this.canvas.removeChild(this.metric.el),this.updateToDo("metric",!1)),this.metric=new c.a({points:[],id:"metric",type:"metric",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMetric),this.metric.stopEditing({code:"Escape"})}},{key:"addMetric",value:function(e){0===this.metric.points.length?this.metric.add_point(e):1===this.metric.points.length&&(this.metric.add_point(e),this.metric.stroke="red",this.metric.stopEditing({code:"Escape"}),this.metric.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMetric),this.updateToDo("metric",!0),this.removeCursorPoint(),this.state.metric_value&&this.state.metric_unit&&(this.scale=Object(m.a)(this.metric,this.state.metric_value,this.state.metric_unit)),this.innerPolygon&&this.setState({vessel_capacity:Object(m.b)(this.innerPolygon,this.scale)}),this.vesselVolume&&this.setState({vessel_volume:Object(m.b)(this.vesselVolume,this.scale)}))}},{key:"definerotAxis",value:function(){this.rotAxis&&(this.canvas.removeChild(this.rotAxis.el),window.r_axis=null,this.updateToDo("rotAxis",!1)),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addRotAxis)}},{key:"addRotAxis",value:function(e){this.rotAxis=new c.a({points:[],id:this.id,type:"center",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.rotAxis.stroke="#ff5a00",this.rotAxis.add_point(e),this.canvas.appendChild(this.rotAxis.el),this.rotAxis.draw(),this.rotAxis.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addRotAxis),this.rotAxis.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.r_axis=this.rotAxis.points[0].cx,this.updateToDo("rotAxis",!0)}},{key:"colorChange",value:function(e,t){var n=this.getPolylineById(e);n.stroke=t,n.draw()}},{key:"typeChange",value:function(e,t){var n=this;this.setState({polylines:this.state.polylines.map(function(n){return n.id===e?(n.type=t,n):n})},function(){n.checkProfile("int_prof"),n.checkProfile("out_prof")})}},{key:"delete_line",value:function(){var e=this;if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.state.active_polyline.id}),active_polyline:void 0},function(){e.checkProfile("int_prof"),e.checkProfile("out_prof"),Object(m.g)(e.state.polylines)})}},{key:"edit_line",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.state.active_polyline.editLine()}},{key:"enterBreakLineMode",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");if(this.state.active_polyline.points.length<=2)return void this.addNotification("Line has two or less vertices and can't be subdivided");var e=this.state.active_polyline;e.breaking_mode=!0,this.setState({active_polyline:e});var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.breakLine)),t++}.bind(this))}},{key:"exitBreakLineMode",value:function(e){if(("Escape"===e.code||"KeyQ"===e.code)&&this.state.active_polyline.breaking_mode){var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(e.el.removeEventListener("click",this.breakLine),this.canvas.removeChild(e.el)),t++}.bind(this));var n=this.state.active_polyline;n.breaking_mode=!1,this.setState({active_polyline:n})}}},{key:"breakLine",value:function(e){var t=this,n=[e.target.getAttribute("cx"),e.target.getAttribute("cy")];this.exitBreakLineMode({code:"Escape"});var r=this.state.polylines,i=new c.a({points:[],id:this.id,type:"other",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.state.active_polyline.points.forEach(function(e){i.appendPoint([e.cx,e.cy]),e.cx===parseFloat(n[0])&&e.cy===parseFloat(n[1])&&(i.el.classList.remove("active"),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),i=new c.a({points:[],id:this.id,type:"other",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),i.appendPoint([e.cx,e.cy]))}.bind(this)),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),this.state.active_polyline.stopEditing({code:"Escape"}),this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:r.filter(function(e){return e.id!==t.state.active_polyline.id}),active_polyline:i})}},{key:"image_rotate",value:function(e){this.bck_image.style.transform="rotate("+e.target.value+"deg)"}},{key:"fileChangedHandler",value:function(e){var t=e.target.value.split("\\");t=t[t.length-1],this.setState({img_name:t});var n=new Image;n.src=window.URL.createObjectURL(e.target.files[0]),n.onload=function(){var e=n.naturalWidth,t=n.naturalHeight,r=this.state.toDo;r.image=!0,this.setState({img_w:e,img_h:t,selectedFile:n.src,toDo:r})}.bind(this)}},{key:"download_svg",value:function(){var e=this;if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");var t=this.state.selectedFile;this.state.img_name?this.setState({selectedFile:this.state.img_name.replace("href")},function(){b(e.svg.outerHTML,"dlText.svg","text/plain"),e.setState({selectedFile:t})}):b(this.svg.outerHTML,"myVessel.svg","text/plain")}},{key:"download_dxf",value:function(){if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");if(!this.scale)return void this.addNotification("You need to define a reference scale before export");var e=n(97),t={models:{}},r=1;this.state.polylines.forEach(function(n){var i=n.el.getAttribute("points"),o=e.model.mirror(new e.models.ConnectTheDots(!1,i),!1,!0);o=e.model.scale(o,this.scale/10),t.models["my-"+r+"-line"]=o,r++}.bind(this)),t.units=e.units.Meter;var i=e.exporter.toDXF(t,{units:e.unitType.Meter});b(i,"myVessel.dxf","text/plain")}},{key:"download_json",value:function(){var e=void 0,t=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(!(t.length>0))return void this.addNotification("No inner profile to export");if(t=t[0],!this.scale)return void this.addNotification("You need to define a reference scale before export");e=[],t.points.forEach(function(t){e.push([t.cx*this.scale/10,t.cy*this.scale/10*-1])}.bind(this)),e=JSON.stringify(e);var n='{ "type": "Feature",\n "geometry": {\n "type": "LineString",\n "coordinates": '+e+'\n },\n "properties": {\n "title": "myVessel",\n "description": "",\n "author": "'+void 0+'"\n }\n }';this.addNotification("Export completed"),b(n,"myVessel.json","text/plain")}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{id:"container"},s.a.createElement(h.a,{notification:this.state.notification}),s.a.createElement("h2",null,"Draw"),s.a.createElement("section",{id:"drawing"},s.a.createElement("svg",{id:"drawing-canvas",height:"500",width:"100%",ref:function(t){e.svg=t}},s.a.createElement("g",{className:"svg-pan-zoom_viewport",id:"canvas"},s.a.createElement("image",{ref:function(t){e.bck_image=t},id:"bck-img",href:this.state.selectedFile,x:"0",y:"0",height:this.state.img_h,width:this.state.img_w}))),s.a.createElement("div",{className:"tools"},s.a.createElement("div",{id:"actions-title"},"Actions:"),s.a.createElement("div",{className:"interface-button",onClick:this.create_new_polyline.bind(this),title:"Create new line",alt:"Create new line"},"New"),s.a.createElement("div",{className:"interface-button",onClick:this.enterBreakLineMode.bind(this),title:"Break selected line",alt:"Break selected line"},"Break"),s.a.createElement("div",{className:"interface-button",onClick:this.delete_line.bind(this),title:"Delete selected line",alt:"Delete selected line"},"Delete"),s.a.createElement("div",{className:"interface-button",onClick:this.edit_line.bind(this),title:"Edit selected line",alt:"Edit selected line"},"Edit"),s.a.createElement("div",{id:"actions-title2"},"Export:"),s.a.createElement("div",{className:"interface-button",onClick:this.download_svg.bind(this),title:"Download SVG (no scaling)",alt:"Download SVG (no scaling)"},"SVG"),s.a.createElement("div",{className:"interface-button",onClick:this.download_dxf.bind(this),title:"Download all-lines as DXF (scaled: 1 unit = 1 meter)",alt:"Download all-lines as DXF (scaled: 1 unit = 1 meter)"},"DXF"),s.a.createElement("div",{className:"interface-button",onClick:this.download_json.bind(this),title:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)",alt:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)"},"JSON"))),s.a.createElement("section",{id:"polylines"},s.a.createElement("div",{id:"layer-title"},"Layers:"),this.state.toDo.image&&s.a.createElement("div",{id:"image-layer",className:"polyline-layer"},s.a.createElement("div",{className:"slidecontainer"},s.a.createElement("label",{htmlFor:"myRange"},"Rotate image"),s.a.createElement("input",{type:"number",min:"0",max:"360",defaultValue:"0",className:"slider",id:"myRange",step:"0.01",onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(t){return s.a.createElement(p.a,{key:t.id,name:t.name,type:t.type,id:t.id,delete_line:e.delete_line.bind(e),edit_line:e.edit_line.bind(e),colorChange:e.colorChange.bind(e),typeChange:e.typeChange.bind(e),selectLayer:e.selectLayer.bind(e),selectedPoly:e.state.active_polyline?e.state.active_polyline.id:""})})),s.a.createElement("div",{className:"basic-info"},"Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ",s.a.createElement("code",null,"Esc")," or ",s.a.createElement("code",null,"q")," to quit editing mode and deselect."),s.a.createElement(d.a,{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),s.a.createElement(v.a,{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}))}}]),t}(a.Component);t.a=w},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(29),o=n(79),a=n(30),s=function(){function e(e,t){for(var n=0;n0&&this.points.length>e&&t.cx!==this.points[e-1].cx&&t.cy!==this.points[e-1].cy){var n=new o.a([(t.cx+this.points[e-1].cx)/2,(t.cy+this.points[e-1].cy)/2],e,this.zoom);this.midpoints.push(n)}e++}.bind(this)),this.midpoints.forEach(function(e){this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.create)}.bind(this))}},{key:"create",value:function(e){var t=e.target.getAttribute("index"),n=new i.a([parseFloat(e.target.getAttribute("cx")),parseFloat(e.target.getAttribute("cy"))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(t,n)}},{key:"addPointInMiddle",value:function(e,t){this.points.splice(e,0,t),this.canvas.appendChild(t.el),t.draw(),t.edit(),t.select(),this.draw()}},{key:"pointsTo",value:function(){var e="";return this.points.forEach(function(t){e+=t.cx+", "+t.cy+" "}),e}},{key:"add_point",value:function(e){var t=this.get_point(e);if("max_fill"===this.type){var n=[-1e6,t[1]];return this.appendPoint(n),n=[1e6,t[1]],void this.appendPoint(n)}if("center"===this.type){var r=[t[0],-1e6];return this.appendPoint(r),r=[t[0],1e6],void this.appendPoint(r)}this.appendPoint(t)}},{key:"appendPoint",value:function(e){window.snapping_points.push([e[0],e[1]]);var t=new i.a([e[0],e[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(t),this.draw(),1===this.points.length&&(window.addEventListener("mousemove",this.previewPoint),window.addEventListener("keyup",this.stopEditing))}},{key:"get_point",value:function(e){var t=this.canvas.transform.baseVal[0].matrix,n=[(e.pageX-t.e-this.x)/t.a,(e.pageY-t.f-this.y)/t.a];return this.snapPoint(n)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1&&Object(o.a)(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var o=n(84);t.a=function(e){if((n=e.length)<3)return null;var t,n,o=new Array(n),a=new Array(n);for(t=0;t=0;--t)f.push(e[o[s[t]][2]]);for(t=+u;ts!==u>s&&a<(l-n)*(s-r)/(u-r)+n&&(c=!c),l=n,u=r;return c}},function(e,t,n){"use strict";t.a=function(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],s=o[1],l=0;++r=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(t){return e.handleMouseWheel(t)},r.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(r.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!1)},l.prototype.handleMouseWheel=function(e){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&0===e.deltaMode&&e.wheelDelta&&(t=0===e.deltaY?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var i=this.svg.getScreenCTM().inverse(),o=a.getEventPoint(e,this.svg).matrixTransform(i),s=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(s,o)}},l.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e/=this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var i=this.viewport.getCTM(),o=t.matrixTransform(i.inverse()),a=this.svg.createSVGMatrix().translate(o.x,o.y).scale(e).translate(-o.x,-o.y),s=i.multiply(a);s.a!==i.a&&this.viewport.setCTM(s)},l.prototype.zoom=function(e,t){this.zoomAtPoint(e,a.getSvgCenterPoint(this.svg,this.width,this.height),t)},l.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)},l.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),"SVGPoint"!==o.getType(t)){if(!("x"in t&&"y"in t))throw new Error("Given point is invalid");t=a.createSVGPoint(this.svg,t.x,t.y)}this.zoomAtPoint(e,t,n)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){if((e.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control")>-1)return!1}var t;t=e.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=a.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(t,n)},l.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),o.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&o.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var t=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}},l.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.center=function(){var e=this.viewport.getViewBox(),t=.5*(this.width-(e.width+2*e.x)*this.getZoom()),n=.5*(this.height-(e.height+2*e.y)*this.getZoom());this.getPublicInstance().pan({x:t,y:n})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)},l.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)},l.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}},l.prototype.resize=function(){var e=a.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=null===t?null:o.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,i.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,i.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=null===t?null:o.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var c=[],f=function(e,t){var n=o.getSvg(e);if(null===n)return null;for(var r=c.length-1;r>=0;r--)if(c[r].svg===n)return c[r].instance.getPublicInstance();return c.push({svg:n,instance:new l(n,t)}),c[c.length-1].instance.getPublicInstance()};e.exports=f},function(e,t){e.exports=function(){function e(e,t,n){var r=function(e){!e&&(e=window.event);var n={originalEvent:e,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,delatZ:0,preventDefault:function(){e.preventDefault?e.preventDefault():e.returnValue=!1}};return"mousewheel"==u?(n.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(n.deltaX=-.025*e.wheelDeltaX)):n.deltaY=e.detail,t(n)};return f.push({element:e,fn:r,capture:n}),r}function t(e,t){for(var n=0;n2096103.424&&v!==d))return navigator.msSaveBlob?navigator.msSaveBlob(i(f),m):o(f);f=i(f),c=f.type||u}else if(/([\x80-\xff])/.test(f)){var g=0,b=new Uint8Array(f.length),w=b.length;for(g;g0?[e.substr(0,n),e.substr(n+1)]:["",e]}function splitDecimal(e){var t=e.toString();return t.indexOf("e")>0&&(t=e.toFixed(20).match(/.*[^(0+$)]/)[0]),split(t,".")}function round(e,t){if(void 0===t&&(t=1e-7),e%1===0)return e;var n=1-String(Math.ceil(1/t)).length;if("undefined"===typeof n||0===+n)return Math.round(e);if(e=+e,n=+n,isNaN(e)||"number"!==typeof n||n%1!==0)return NaN;if(e<0)return-round(-e,t);var r=split(e.toString(),"e");return e=Math.round(+(r[0]+"e"+(r[1]?+r[1]-n:-n))),r=split(e.toString(),"e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}function createRouteKey(e){for(var t=[],n=0;n0?".":"")+i:JSON.stringify([i]),t.push(r)}return t.join("")}function travel(e,t){if(!e||!t)return null;var n;n=Array.isArray(t)?t:JSON.parse(t);for(var r=n.slice(),i=e,o=e.origin||[0,0];r.length;){if(!(i=i[r.shift()]))return null;i.origin&&r.length&&(o=MakerJs.point.add(o,i.origin))}return{result:i,offset:o}}function cloneObject(e){return clone(e)}function extendObject(e,t){if(e&&t)for(var n in t)"undefined"!==typeof t[n]&&(e[n]=t[n]);return e}function isFunction(e){return"function"===typeof e}function isNumber(e){return"number"===typeof e}function isObject(e){return"object"===typeof e}function isPoint(e){return e&&Array.isArray(e)&&2==e.length&&isNumber(e[0])&&isNumber(e[1])}function isPath(e){return e&&e.type&&isPoint(e.origin)}function isPathLine(e){return isPath(e)&&e.type==MakerJs.pathType.Line&&isPoint(e.end)}function isPathCircle(e){return isPath(e)&&e.type==MakerJs.pathType.Circle&&isNumber(e.radius)}function isPathArc(e){return isPath(e)&&e.type==MakerJs.pathType.Arc&&isNumber(e.radius)&&isNumber(e.startAngle)&&isNumber(e.endAngle)}function isPathArcInBezierCurve(e){return isPathArc(e)&&isObject(e.bezierData)&&isNumber(e.bezierData.startT)&&isNumber(e.bezierData.endT)}function isModel(e){return e&&(e.paths||e.models)}function isChain(e){var t=e;return t&&t.links&&Array.isArray(t.links)&&isNumber(t.pathLength)}function $(e){return isModel(e)?new Cascade(MakerJs.model,e):isPath(e)?new Cascade(MakerJs.path,e):isPoint(e)?new Cascade(MakerJs.point,e):void 0}MakerJs.version="debug",MakerJs.environmentTypes={BrowserUI:"browser",NodeJs:"node",WebWorker:"worker",Unknown:"unknown"},MakerJs.environment=detectEnvironment(),MakerJs.unitType={Centimeter:"cm",Foot:"foot",Inch:"inch",Meter:"m",Millimeter:"mm"},MakerJs.splitDecimal=splitDecimal,MakerJs.round=round,MakerJs.createRouteKey=createRouteKey,MakerJs.travel=travel;var clone=__webpack_require__(98);MakerJs.cloneObject=cloneObject,MakerJs.extendObject=extendObject,MakerJs.isFunction=isFunction,MakerJs.isNumber=isNumber,MakerJs.isObject=isObject,MakerJs.isPoint=isPoint,MakerJs.isPath=isPath,MakerJs.isPathLine=isPathLine,MakerJs.isPathCircle=isPathCircle,MakerJs.isPathArc=isPathArc,MakerJs.isPathArcInBezierCurve=isPathArcInBezierCurve,MakerJs.pathType={Line:"line",Circle:"circle",Arc:"arc",BezierSeed:"bezier-seed"},MakerJs.isModel=isModel,MakerJs.isChain=isChain;var Cascade=function(){function e(e,t){this._module=e,this.$initial=t;for(var n in this._module)this._shadow(n);this.$result=t}return e.prototype._shadow=function(e){var t=this;this[e]=function(){return t._apply(t._module[e],arguments)}},e.prototype._apply=function(e,t){var n=[].slice.call(t);return n.unshift(this.$result),this.$result=e.apply(void 0,n),this},e.prototype.$reset=function(){return this.$result=this.$initial,this},e}();MakerJs.$=$}(MakerJs||(MakerJs={})),module.exports=MakerJs;var MakerJs;!function(e){!function(t){function n(t){return e.splitDecimal(t)[1]}function r(t,n){return n?+(e.splitDecimal(t)[0]+"."+n):t}function i(e,t){return e<0&&t<0||e>0&&t>0?r(t,n(e)):t}function o(e){var t=Math.floor(e/360);return 0===t?e:i(e,e-360*t)}function a(e){return o(e)*Math.PI/180}function s(e){return 180*e/Math.PI}function l(e){if(e.endAngle360?o(i):i}function f(e){return o(s(h(e.origin,e.end)))}function p(e,t){return s(h(e,t))}function h(t,n){var r=e.point.subtract(n,t),i=r[0],o=r[1];return Math.atan2(-o,-i)+Math.PI}function d(e,t,n){return n&&(e=360-e),t&&(e=(e<180?180:540)-e),e}function v(e,t){if(e){var n=e.walkedPath.pathContext,r=y[n.type];if(r)return r(n,t,e.reversed)}}function m(e,t){if(arguments.length<2)return null;var n=[e,t].map(function(e,t){return v(e,0===t)}),r=o(f(n[1])-f(n[0]));return r>180&&(r-=360),r}t.noRevolutions=o,t.toRadians=a,t.toDegrees=s,t.ofArcEnd=l,t.ofArcMiddle=u,t.ofArcSpan=c,t.ofLineInDegrees=f,t.ofPointInDegrees=p,t.ofPointInRadians=h,t.mirror=d;var y={};y[e.pathType.Arc]=function(t,n,r){var i=n!=r,o=i?t.endAngle-90:t.startAngle+90,a=e.point.fromArc(t)[i?1:0],s=e.point.rotate(e.point.add(a,[t.radius,0]),o,a);return new e.paths.Line(n?[s,a]:[a,s])},y[e.pathType.Line]=function(t,n,r){return r?new e.paths.Line(t.end,t.origin):t},t.ofChainLinkJoint=m}(e.angle||(e.angle={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=i(e);if(!t)return r;for(var o=2;o--;)n?r[o]-=t[o]:r[o]+=t[o];return r}function r(e,t){function n(n){return(e[n]+t[n])/2}return[n(0),n(1)]}function i(e){return e?[e[0],e[1]]:t.zero()}function o(t,n){for(var r={index:0,distance:-1},i=0;i=o?null:(i(t,o,n,r),t)}return null}function m(t,n){if(1==n)return[e.point.middle(t)];var r=[],i=n;t.type!=e.pathType.Circle&&i--;for(var o=0;op[0].size?p.push(s):p.unshift(s);s=p[l?1:0]}this.origin=s.origin,this.startAngle=s.startAngle,this.endAngle=s.endAngle;break;case 4:this.origin=n[0],this.radius=n[1],this.startAngle=n[2],this.endAngle=n[3];break;case 3:if(e.isPoint(n[2])){r.apply(this,n);for(var d=[],h=0;h<3;h++)d.push(e.angle.ofPointInDegrees(this.origin,n[h]));this.startAngle=d[0],this.endAngle=d[2],e.measure.isBetweenArcAngles(d[1],this,!1)||(this.startAngle=d[2],this.endAngle=d[0]);break}case 2:var u=n[2];r.call(this,n[0],n[1]),this.startAngle=e.angle.ofPointInDegrees(this.origin,n[u?1:0]),this.endAngle=e.angle.ofPointInDegrees(this.origin,n[u?0:1])}this.type=e.pathType.Arc}return t}();t.Arc=n;var r=function(){function t(){for(var t=[],n=0;n0){for(var m=null,y=0;!m&&y1&&e(n.key,n.items)}},e}();e.Collector=t;var n=__webpack_require__(103),r=function(){function t(){this.reset()}return t.prototype.reset=function(){this.insertedCount=0,this.graph={},this.index={},this.merged={},this.values=[]},t.prototype.insertValue=function(e){return this.values.push(e),this.values.length-1},t.prototype.insertValueIdAtPoint=function(e,t){var n=t[0],r=t[1];this.graph[n]||(this.graph[n]={});var i,o,a=this.graph[n],s=r in a;return s?(o=a[r],o in this.merged&&(o=this.merged[o]),i=this.index[o],i.valueIds.push(e)):(a[r]=o=this.insertedCount++,i={pointId:o,point:t,valueIds:[e]},this.index[o]=i),{existed:s,pointId:o}},t.prototype.mergePoints=function(e){var t=this,r=[],i=[];for(var o in this.index){var a=this.index[o],s=a.point;a.kdId=r.length,r.push(s),i.push(a)}this.kdbush=n(r);var l=this;for(var o in this.index)!function(n){if(n in l.merged)return"continue";var r=l.index[n];l.kdbush.within(r.point[0],r.point[1],e).forEach(function(e){e!==r.kdId&&t.mergeIndexElements(r,i[e])})}(o)},t.prototype.mergeNearestSinglePoints=function(t){var r=this,i=[];for(var o in this.index){var a=this.index[o];1===a.valueIds.length&&i.push(a)}this.kdbush=n(i.map(function(e){return e.point})),i.forEach(function(n){if(!(n.pointId in r.merged)){var o=r.kdbush.within(n.point[0],n.point[1],t),a=[];o.forEach(function(t){var r=i[t];r.pointId!==n.pointId&&a.push({el:r,distance:e.measure.pointDistance(r.point,n.point)})}),a.sort(function(e,t){return e.distance-t.distance});for(var s=0;s0?r.mergeIndexElements(l,n):r.mergeIndexElements(n,l))}}})},t.prototype.mergeIndexElements=function(e,t){return e.merged=e.merged||[],e.merged.push(t.pointId),this.merged[t.pointId]=e.pointId,e.valueIds.push.apply(e.valueIds,t.valueIds),delete this.index[t.pointId],e.pointId},t.prototype.forEachPoint=function(e){for(var t=this,n=0;n0&&e(r.point,r.valueIds.map(function(e){return t.values[e]}),n,r)}}},t.prototype.getIdOfPoint=function(e){var t=this.graph[e[0]];if(t){var n=t[e[1]];if(n>=0)return n in this.merged?this.merged[n]:n}},t.prototype.getElementAtPoint=function(e){var t=this.getIdOfPoint(e);if(t>=0)return this.index[t]},t}();e.PointGraph=r}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=0;do{var i=e[r];do{for(var o=!1,a=r+1;a0?(n.origin=o.low,n.end=o.high):(n.origin[0]=o.low[0],n.end[0]=o.high[0]):(n.origin[1]=o.low[1],n.end[1]=o.high[1])})}),r}t.simplify=r}(e.model||(e.model={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){if(!e)return null;var r=null,o=i[e.type];return o&&(r=o(e,t,n),r.origin=e.origin),r}function r(t,n,r,i){var o=e.angle.ofArcSpan(t),a=1;o>=270?a=4:o>180?a=3:(o>150||n)&&(a=2);for(var s=e.angle.toRadians(o/a),l=e.models.Polygon.circumscribedRadius(t.radius,s),u=e.point.fromArc(t),c=[e.point.subtract(u[0],t.origin)],f=e.angle.toRadians(t.startAngle)+s/2,p=0;p=0))return!1;return!0}function v(t){var n=t.end[0]-t.origin[0];if(0==e.round(n,1e-6))return{line:t,hasSlope:!1};var r=t.end[1]-t.origin[1],i=r/n;return{line:t,hasSlope:!0,slope:i,yIntercept:t.origin[1]-i*t.origin[0]}}function m(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function y(e,t,n){return[n(e[0],t[0]),n(e[1],t[1])]}function g(t,n){if(t){var r=N[t.type];if(r){var i=r(t);return n&&(i.high=e.point.add(i.high,n),i.low=e.point.add(i.low,n)),i}}return{low:null,high:null}}function b(e){if(e){var t=I[e.type];if(t)return t(e)}return 0}function w(t){var n=0;return e.model.walk(t,{onPath:function(e){n+=b(e.pathContext)}}),n}function x(t){return{high:e.point.clone(t.high),low:e.point.clone(t.low)}}function k(t,r){function i(t,i){if(i){var o=t.slice(0,-2),a=e.createRouteKey(o);a in r.modelMap?n(r.modelMap[a],i):r.modelMap[a]=x(i)}}r||(r=new j(t));var o={onPath:function(e){e.routeKey in r.pathMap||(r.pathMap[e.routeKey]=g(e.pathContext,e.offset)),i(e.route,r.pathMap[e.routeKey])},afterChildWalk:function(e){i(e.route,r.modelMap[e.routeKey])}};e.model.walk(t,o),r.modelsMeasured=!0;var a=r.modelMap[""];return a?E(a):a}function E(t){var n=t;return n.center=e.point.average(n.high,n.low),n.width=n.high[0]-n.low[0],n.height=n.high[1]-n.low[1],n}function _(e,t){return t>=e?t-e:t<0?t+e:t}function P(e,t){return e.slope*t+e.yIntercept}function C(e,t){return[t,P(v(e),t)]}function T(n){for(var r=1;r<3;r++)if(!t.isPointEqual(n[0].center,n[r].center,1e-6)||0!==e.round(n[0].width-n[r].width))return!1;return!0}function S(t,n,r,i){e.model.rotate(n,r);var o=k(n),a={index:t,rotation:i,center:e.point.rotate(o.center,i),width:o.height,height:o.width,bottom:new e.paths.Line(o.low,[o.high[0],o.low[1]]),middle:new e.paths.Line([o.low[0],o.center[1]],[o.high[0],o.center[1]]),top:new e.paths.Line(o.high,[o.low[0],o.high[1]])};return[a.top,a.middle,a.bottom].forEach(function(t){return e.path.rotate(t,i)}),a}function A(t,n){var r=t[1].origin,i=r[0],o=t[3].origin[0],a=t[0].origin[0],s=i-a;if(a-o>2*s)return null;var l=(i-o)/3;if(sp[1]?0:1,d=p[h];if(d>c){var v=e.solvers.equilateralAltitude(d),m=i-2*v;if(a>m+v)return null;if(o=u.height)return n(c,u.center,"solved by bound "+o.length);o.push(u)}if(T(o))return n(e.solvers.equilateralSide(o[0].width/2),o[0].center,"solved as circular");var f=o.map(function(e){return e.top}).concat(o.map(function(e){return e.bottom}));f.forEach(function(t,n){a.paths[n]=t,e.path.converge(f[_(6,n+2)],t,!0)}),o.forEach(function(e,t){a.paths["m"+t]=e.middle});for(var p,h=o.slice(),d=0;d<6;d++){d>0&&(f.push(f.shift()),h.push(h.shift()),e.model.rotate(a,-60));var v=A(f,h);v&&(!p||v.radius=o+n.radius||n.radius>=o+t.radius)return null;if(r&&t.radius+n.radius>=o)return null;var a;if(r||0!=e.round(t.radius-n.radius)){var s=o/2,l=new e.paths.Circle([s,0],s),u=new e.paths.Circle(t.radius>n.radius?[0,0]:[o,0],r?t.radius+n.radius:Math.abs(t.radius-n.radius)),c=e.path.intersection(u,l);if(!c||!c.path1Angles)return null;a=c.path1Angles}else a=[90,270];var f=e.angle.ofLineInDegrees(i);return a.map(function(t){return e.angle.noRevolutions(t+f)})}var s=Math.sqrt(3)/2;t.equilateralAltitude=n,t.equilateralSide=r,t.solveTriangleSSS=i,t.solveTriangleASA=o,t.circleTangentAngles=a}(e.solvers||(e.solvers={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,n,r,i){var o=r?[n.path2Offset,n.path1Offset]:[n.path1Offset,n.path2Offset];t.moveTemporary(e,o,i)}function r(e){var t=e.path1Angles;return e.path2Angles?e.path1Angles=e.path2Angles:delete e.path1Angles,t&&(e.path2Angles=t),e}function i(e,t,n){if(void 0===n&&(n={}),e&&t){var r=c[e.type][t.type];if(r)return r(e,t,n)}return null}function o(e,t){for(var n=2;n--;)if(e[n]===t)return n}function a(t,n){for(var r=[],i=0;i=180?u-360:u;t.rotate(l,-c,e.point.zero());var f=e.round(l.origin[1]),p=Math.abs(f);if(p>s)return null;var h=[];if(p==s){if(i.excludeTangents)return null;h.push(o(f>0?90:270))}else{var d=Math.asin(f/s),v=e.angle.toDegrees(d),m=Math.cos(d)*s;a(-m,180-v),a(m,v)}return h.length>0?h:null}function u(n,r,i){function o(t){var n=t+u;return e.angle.noRevolutions(n)}function a(t){return[o(t),o(e.angle.mirror(t,!1,!0))]}if(n.radius<=0||r.radius<=0)return null;if(n.radius==r.radius&&e.measure.isPointEqual(n.origin,r.origin,1e-4))return i.out_AreOverlapped=!0,null;var s=(e.point.subtract(e.point.zero(),n.origin),new e.paths.Circle(e.point.zero(),n.radius)),l=new e.paths.Circle(e.point.subtract(r.origin,n.origin),r.radius),u=e.angle.ofPointInDegrees(e.point.zero(),l.origin);t.rotate(l,-u,e.point.zero());var c=l.origin[0];if(0==e.round(l.radius-c-s.radius))return i.excludeTangents?null:[[o(180)],[o(180)]];if(0==e.round(l.radius+c-s.radius))return i.excludeTangents?null:[[o(0)],[o(0)]];if(0==e.round(c-l.radius-s.radius))return i.excludeTangents?null:[[o(0)],[o(180)]];if(e.round(c-l.radius)>s.radius)return null;if(e.round(c+l.radius)1))return!1;i[s].shardPoint=l.intersectionPoints[1]}}return!0}function o(e,n){var r=t.clone(e);return[r,t.breakAtPoint(r,n)]}function a(e,t,n){var r=null,i=d[e.path.type];return i&&(r=i(e.path,t,n,e.shardPoint,e.isStart)),r}function s(e,t,n){var r=null,i=v[e.path.type];return i&&(r=i(e.path,e.propertyName,t,n)),u(e,r)||(r=null),r}function l(t,n){var r={filletAngle:e.angle.ofPointInDegrees(n,t.shardPoint),clipPath:function(){t.path[t.propertyName]=t.shardPoint}};return u(t,r)||(r=null),r}function u(t,n){var r=!1;if(n){var i=t.path[t.propertyName];n.clipPath(),e.measure.pathLength(t.path)>0&&(r=!0),t.path[t.propertyName]=i}return r}function c(t){for(var n=0,r=[],i=0;i0){var s={pointMatchingDistance:.005};e.extendObject(s,a);var u=r(t,n,a);if(u){var f=c([t,n]),p=new e.paths.Line(u[0].oppositePoint,u[1].oppositePoint),h=e.point.middle(p,f),d=e.angle.ofPointInDegrees(u[0].point,h),v=e.point.add(u[0].point,e.point.fromPolar(e.angle.toRadians(d),o));if(!i(o,v,u,s))return null;for(var m=[],y=0;y<2;y++){var g=l(u[y],v);if(!g)return null;m.push(g)}var b=new e.paths.Arc(v,o,m[0].filletAngle,m[1].filletAngle);return e.round(e.angle.noRevolutions(e.angle.ofArcMiddle(b)))==e.round(d)&&(b.startAngle=m[1].filletAngle,b.endAngle=m[0].filletAngle),m[0].clipPath(),m[1].clipPath(),b}}return null}function p(n,o,l,u){if(n&&o&&l&&l>0){var c={pointMatchingDistance:.005};e.extendObject(c,u);var f=r(n,o,u);if(f){if(!i(l,f[0].point,f,c))return null;for(var p=[],h=0;h<2;h++){var d=f[1-h].shardPoint;if(!d)return null;var v=a(f[h],l,d);p.push(v)}var m=t.intersection(p[0],p[1]);if(m){var y;y=1==m.intersectionPoints.length?m.intersectionPoints[0]:e.point.closest(f[0].point,m.intersectionPoints);for(var g=[],h=0;h<2;h++){var b=s(f[h],l,y);if(!b)return null;g.push(b)}if(0==e.round(g[0].filletAngle-g[1].filletAngle))return null;var w=new e.paths.Arc(y,l,g[0].filletAngle,g[1].filletAngle),x=e.angle.ofArcSpan(w);return 180==x?null:(x>180&&(w.startAngle=g[1].filletAngle,w.endAngle=g[0].filletAngle),g[0].clipPath(),g[1].clipPath(),w)}}}return null}var h={};h[e.pathType.Arc]=function(e){return["startAngle","endAngle"]},h[e.pathType.Line]=function(e){return["origin","end"]};var d={};d[e.pathType.Arc]=function(t,n,r,i,a){var s=t.radius,l=o(t,i)[a?0:1];return l?(e.measure.isArcConcaveTowardsPoint(l,r)?s-=n:s+=n,e.round(s)<=0?null:new e.paths.Arc(t.origin,s,t.startAngle,t.endAngle)):null},d[e.pathType.Line]=function(t,n,r,i,o){return new e.paths.Parallel(t,n,r)};var v={};v[e.pathType.Arc]=function(t,n,r,i){var o=new e.paths.Line(t.origin,i),a=e.angle.ofLineInDegrees(o),s=a;return e.measure.isArcConcaveTowardsPoint(t,i)||(s+=180),{filletAngle:e.angle.noRevolutions(s),clipPath:function(){t[n]=a}}},v[e.pathType.Line]=function(n,r,i,o){var a=new e.paths.Line([0,0],[0,1]),s=e.angle.ofLineInDegrees(n);t.rotate(a,s,[0,0]),t.moveRelative(a,o);var l=e.point.fromSlopeIntersection(n,a);return l?{filletAngle:e.angle.ofPointInDegrees(o,l),clipPath:function(){n[r]=l}}:null},t.dogbone=f,t.fillet=p}(e.path||(e.path={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){return i(!1,e,t)}function r(e,t){return i(!0,e,t)}function i(t,n,r){function i(n,i){var l=s[n].walkedPath,u=s[i].walkedPath;l.modelContext===u.modelContext&&l.modelContext.type==e.models.BezierCurve.typeName||e.path.moveTemporary([l.pathContext,u.pathContext],[l.offset,u.offset],function(){var c;if(e.isObject(r)){var f=e.angle.ofChainLinkJoint(s[n],s[i]);if(0===e.round(f))return;c=f>0?r.left:r.right}else c=r;if(c&&!(c<0)){var p;p=t?e.path.fillet(l.pathContext,u.pathContext,c):e.path.dogbone(l.pathContext,u.pathContext,c),p&&(o.paths["fillet"+a]=p,a++)}})}for(var o={paths:{}},a=0,s=n.links,l=1;l1&&(r.endless=!0);break}t=u}}e.forEachPoint(function(e,n,o,a){if(a.valueIds.length>0){var s={links:[],pathLength:0};if(i(n[0],s,n[0]),s.endless)t(s,!1);else{s.links.reverse();var l=s.links[0];s.links.map(function(e){e.reversed=!e.reversed}),s.pathLength-=s.links[s.links.length-1].pathLength;i(s.links.pop(),s,l),s.links.length>1?t(s,!0):r(s.links[0].walkedPath)}}})}function i(e){var t=null;return a(e,function(e,n,r){t=e[0]},{byLayers:!1}),t}function o(e,t){var n=t===e.reversed?1:0;return e.endPoints[n]}function a(n){for(var i=[],a=1;a0){r.tempPaths=r.paths;var s={};a.forEach(function(e,t){e.layer=o,s["seed_"+t]=e}),r.paths=s}}}else"tempPaths"in r&&(r.paths=r.tempPaths,delete r.tempPaths),"tempLayer"in r&&(void 0==r.tempLayer?delete r.layer:r.layer=r.tempLayer,delete r.tempLayer)})}t.findSingleChain=i,t.findChains=a}(e.model||(e.model={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){if(void 0===t&&(t=1),e.endless){for(var n=Math.abs(t),r=0;r0&&n(e,r),e}}function o(t,n){void 0===n&&(n=!1);for(var r={paths:{}},i=0;i0;){var h=l/p;if(c.reversed&&(h=1-h),o.push(e.point.add(e.point.middle(f.pathContext,h),f.offset)),r&&o.length>=r)return o;var d;if(i){if(d=i[s],++s>i.length)return o}else d=n;l+=d}l-=p}return a(t.endless,o),o}function l(t,n){for(var r=[],i=0;i0){o.reversed&&l.reverse(),i>0&&l.shift();var u=l.map(function(t){return e.point.add(t,s.offset)});r.push.apply(r,u)}}return a(t.endless,r),r}t.cycle=n,t.reverse=r,t.startAt=i,t.toNewModel=o,t.toPoints=s,t.toKeyPoints=l}(e.chain||(e.chain={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n,i){var o={pointMatchingDistance:t||.005,keep:n},a=new r(e,o),s=a.findDeadEnds();return s.length0&&this.appendQueue(o,n)},n.prototype.removeValue=function(e,t){var n=e.valueIds.indexOf(t);n>=0&&e.valueIds.splice(n,1)},n.prototype.appendQueue=function(e,t){var n=this.ordinals[e.pointId];n":">",'"':"""};for(var n in t)e=e.split(n).join(t[n]);return e},e.prototype.getOpeningTag=function(t){var n="";for(var r in this.attrs)!function(t,r){null!=r&&"undefined"!==typeof r&&((Array.isArray(r)||"object"===typeof r)&&(r=JSON.stringify(r)),"string"===typeof r&&(r=e.escapeString(r)),n+=" "+t+'="'+r+'"')}(r,this.attrs[r]);return"<"+this.name+n+(t?"/":"")+">"},e.prototype.getInnerText=function(){return this.innerTextEscaped?this.innerText:e.escapeString(this.innerText)},e.prototype.getClosingTag=function(){return""},e.prototype.toString=function(){return this.innerText||this.closingTags?this.getOpeningTag(!1)+this.getInnerText()+this.getClosingTag():this.getOpeningTag(!0)},e}();e.XmlTag=t}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){return n?e+"("+t+")":t}function r(t,n){if(n){var r=new e.paths.Circle([0,0],t.radius),i=e.measure.pathLength(r);if(i)return Math.ceil(i/n)}}function i(t,i,o){function a(e){f?l=e+l:l+=e}var s="",l="",u=!0,c=!1,f=!1,p={};p[e.pathType.Circle]=function(t,a){var l={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),resolution:r(t,i)};s=n("CAG.circle",JSON.stringify(l),!0),c=!0},p[e.pathType.Line]=function(t,r){var i=r.endPoints.map(function(t){return e.point.rounded(t,o)});r.reversed&&i.reverse(),s=n("new CSG.Path2D",JSON.stringify(i),!0)},p[e.pathType.Arc]=function(t,a){var l=e.angle.ofArcEnd(t);a.reversed&&(f=!0);var u={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),startangle:e.round(t.startAngle,o),endangle:e.round(l,o),resolution:r(t,i)};s=n("new CSG.Path2D.arc",JSON.stringify(u),!0)};var h={};h[e.pathType.Line]=function(t,r){var i=f!=r.reversed,s=e.point.rounded(r.endPoints[i?0:1],o);a(n(".appendPoint",JSON.stringify(s),!0))},h[e.pathType.Arc]=function(t,s){var l=f!=s.reversed,u=e.angle.ofArcEnd(t),c={radius:e.round(t.radius,o),clockwise:l,large:Math.abs(u-t.startAngle)>180,resolution:r(t,i)},p=e.point.rounded(s.endPoints[l?0:1],o);a(n(".appendArc",JSON.stringify(p)+","+JSON.stringify(c),!0))};for(var d=0;d0&&r.subtracts.push(i)}c.total++,e in u||(u[e]=[]),u[e].unshift(r)}})}void 0===o&&(o={});var u={},c={total:0,complete:0},f={pointMatchingDistance:o.pointMatchingDistance,byLayers:o.byLayers,contain:!0};o.statusCallback&&o.statusCallback({progress:25});var p=e.model.findChains(i,f);if(Array.isArray(p))l("",p);else for(var h in p)l(h,p[h]);o.statusCallback&&o.statusCallback({progress:50});var d=0;for(var h in u)d+=u[h].length;if(0===d)throw o.statusCallback&&o.statusCallback({progress:100}),"No closed geometries found.";var v={};for(var h in u){var m=u[h].map(function(e){var t=e.cag;return e.subtracts.forEach(function(e){var n=a(50,50,e);t=r(t,n)}),t});v[h]=a(50,50,m)}return o.statusCallback&&o.statusCallback({progress:100}),f.byLayers?v:v[""]}function l(e,t,n){function r(n){return a(e,t,n)}function i(e,t,n){var r=e.extrude({offset:[0,0,t]});return n&&(r=r.translate([0,0,n])),r}function o(e,t){return e.union(t)}return u(r,i,o,t,n)}function u(t,n,r,i,a){void 0===a&&(a={});var s=a.statusCallback;i.exporterOptions&&e.extendObject(a,i.exporterOptions.toJscadCSG),a.byLayers=a.byLayers||a.layerOptions&&!0,a.statusCallback=o(s,0,50);var l=t(a),u=[];if(a.byLayers)for(var c in l){var f=a.layerOptions[c],p=n(l[c],f.extrude||a.extrude,function(t,n){return e.isNumber(t)?t:n}(f.z,a.z));u.push(p)}else{var p=n(l,a.extrude,a.z);u.push(p)}a.statusCallback=o(s,50,100);var h={total:u.length-1,complete:0},d=u.shift();return u.forEach(function(e,t){d=r(d,e),h.complete++,a.statusCallback({progress:h.complete/h.total})}),d}function c(e,t){function n(e,n){return c(i(e,n,t.accuracy))}function r(e,t){return e+".union("+t+")"}function o(e,t){return e+".subtract("+t+")"}function a(i){return s(n,r,o,e,t)}function l(e,t,n){var r=e+".extrude({ offset: [0, 0, "+t+"] })";return n&&(r=r+".translate([0, 0, "+n+"])"),r}function c(e){return""+p+f+e+p}void 0===t&&(t={});var f=new Array((t.indent||0)+1).join(" "),p=t.indent?"\n":"",h=u(a,l,r,e,t).trim();return"function "+(t.functionName||"main")+"(){"+c("return "+h+";")+"}"+p}function f(e,t,n,r){var i=r.statusCallback;r.statusCallback=o(i,0,50);var a=l(e,n,r);return t.serialize(a,{binary:!1,statusCallback:o(i,50,50)})}t.toJscadCAG=a,t.toJscadCSG=l,t.toJscadScript=c,t.toJscadSTL=f}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(n,r,i){if(r){var o={origin:[0,0],stroke:"#000"};e.extendObject(o,i);var a=1,s=o.units||r.units;a=s?e.units.conversionScale(s,e.unitType.Inch):.01,a*=72;var l=e.model.scale(e.cloneObject(r),a),u=e.measure.modelExtents(l),c=-u.low[0],f=[c,u.high[1]];f=e.point.add(f,i.origin),e.model.findChains(l,function(r,i,a){function s(e){var r=t.pathToSVGPathData(e.pathContext,e.offset,f);n.path(r).stroke(o.stroke)}r.map(function(r){if(r.links.length>1){var i=t.chainToSVGPathData(r,f);n.path(i).stroke(o.stroke)}else{var a=r.links[0].walkedPath;if(a.pathContext.type===e.pathType.Circle){var l;e.path.moveTemporary([a.pathContext],[a.offset],function(){l=e.path.mirror(a.pathContext,!1,!0)}),e.path.moveRelative(l,f),n.circle(l.origin[0],l.origin[1],a.pathContext.radius).stroke(o.stroke)}else s(a)}}),i.map(s)},{byLayers:!1})}}t.toPDF=n}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(t){return e.point.mirror(t,!1,!0)}function r(t){var n=e.angle.ofArcSpan(t);t.startAngle=e.angle.noRevolutions(t.startAngle),t.endAngle=t.startAngle+n}function i(t,r,i){function o(t){return e.point.add(t,r)}for(var a=t.links[0],s=o(n(a.endPoints[a.reversed?1:0])),l=["M",e.round(s[0],i),e.round(s[1],i)],u=0;u1){var a=i(e,n,o);s[r].push(a)}else l(e.links[0].walkedPath,t);e.contains&&u(e.contains,!t)})}s[r]=[],u(e,!0),t.forEach(function(e){return l(e)})},r),s}function l(t){for(var n=[],r=1;r0?(t in T||(T[t]=[]),T[t].push(e)):C.push(e)}function l(e){function t(e,t){void 0!==t&&n.push(e+":"+t)}var n=[];return t("stroke",e.stroke),t("stroke-width",e.strokeWidth),t("fill",e.fill),n.join(";")}function u(t,n){n&&e.extendObject(t,{stroke:n.stroke,"stroke-width":n.strokeWidth,fill:n.fill,style:n.cssStyle||l(n)})}function h(e){return E.layerOptions&&E.layerOptions[e]?E.layerOptions[e]:e in t.colors?{stroke:e}:void 0}function d(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=!1),"text"!==e&&u(n,h(r)),E.scalingStroke||(n["vector-effect"]="non-scaling-stroke");var s=new t.XmlTag(e,n);s.closingTags=E.closingTags,i&&(s.innerText=i),a(s.toString(),r,o)}function v(t){var r=n(t);return e.point.scale(r,E.scale)}function m(t,n){var r=e.path.mirror(t,!1,!0);return e.path.moveRelative(e.path.scale(r,E.scale),n)}function y(t,n,r){d("text",{id:t+"_text",x:e.round(n[0],E.accuracy),y:e.round(n[1],E.accuracy)},r,t)}function g(t,n,r,i,o,a,s,l,u){d("path",{id:t,"data-route":a,d:["M",e.round(n,E.accuracy),e.round(r,E.accuracy)].concat(i).join(" ")},o),l&&y(t,s,o)}function b(e,t,n,r,i,o,a){var s=c(n,E.accuracy);g(e,t[0],t[1],s,r,i,t,o,a)}function w(t,n,r,i,o){Z[e.pathType.Circle]("",new e.paths.Circle(r,t.size/2),n,"flow",null,!1,null);var a=[-1*t.size,t.size/2];[a,e.point.mirror(a,!1,!0)].map(function(t){return new e.paths.Line(e.point.add(e.point.rotate(t,o),i),i)}).forEach(function(t){return Z[e.pathType.Line]("",t,n,"flow",null,!1,null)})}function x(e,t){H.attrs={id:e},a(H.getOpeningTag(!1),t.layer)}function k(e){a(H.getClosingTag(),e.layer)}var E={accuracy:.001,annotate:!1,origin:null,scale:1,stroke:"#000",strokeLineCap:"round",strokeWidth:"0.25mm",fill:"none",fillRule:"evenodd",fontSize:"9pt",useSvgPathOnly:!0,viewBox:!0};e.extendObject(E,o);var _,P=e.isModel(i);P&&(_=i,_.exporterOptions&&e.extendObject(E,_.exporterOptions.toSVG));var C=[],T={};if(P)_=i;else if(Array.isArray(i)){var S={};i.forEach(function(e,t){S[t]=e}),_={paths:S}}else e.isPath(i)&&(_={paths:{modelToMeasure:i}});var A=e.measure.modelExtents(_);if(!E.units){var M=t.tryGetModelUnits(i);M&&(E.units=M)}var O=t.svgUnit[E.units];if(O&&E.viewBox&&(E.scale*=O.scaleConversion),A&&!E.origin){var R=-A.low[0]*E.scale;E.origin=[R,A.high[1]*E.scale]}e.extendObject(o,E);var z;if(A&&E.viewBox){var L=e.round(A.width*E.scale,E.accuracy),N=e.round(A.height*E.scale,E.accuracy),I=[0,0,L,N],j=O?O.svgUnitType:"";z={width:L+j,height:N+j,viewBox:I.join(" ")}}var D=new t.XmlTag("svg",e.extendObject(z||{},E.svgAttrs));a(D.getOpeningTag(!1));var B={id:"svgGroup","stroke-linecap":E.strokeLineCap,"fill-rule":E.fillRule,"font-size":E.fontSize};u(B,E);var U=new t.XmlTag("g",B);if(a(U.getOpeningTag(!1)),E.useSvgPathOnly){var F={byLayers:!0};"nonzero"===E.fillRule&&(F.contain={alternateDirection:!0});var J=s(_,E.origin,F,E.accuracy);for(var V in J){var q=J[V].join(" "),W={d:q};V.length>0&&(W.id=V),d("path",W,V,null,!0)}}else{var Z={};Z[e.pathType.Line]=function(t,n,r,i,o,a,s){var l=n.origin,u=n.end;d("line",{id:t,class:i,"data-route":o,x1:e.round(l[0],E.accuracy),y1:e.round(l[1],E.accuracy),x2:e.round(u[0],E.accuracy),y2:e.round(u[1],E.accuracy)},r),a&&y(t,e.point.middle(n),r),s&&w(s,r,n.origin,n.end,e.angle.ofLineInDegrees(n))},Z[e.pathType.Circle]=function(t,n,r,i,o,a,s){var l=n.origin;d("circle",{id:t,class:i,"data-route":o,r:n.radius,cx:e.round(l[0],E.accuracy),cy:e.round(l[1],E.accuracy)},r),a&&y(t,l,r)},Z[e.pathType.Arc]=function(t,n,i,o,a,s,l){r(n);var u=e.point.fromArc(n);if(e.measure.isPointEqual(u[0],u[1]))b(t,n.origin,n.radius,i,a,s,l);else{var c=["A"];p(c,n.radius,u[1],E.accuracy,e.angle.ofArcSpan(n)>180,n.startAngle>n.endAngle),g(t,u[0][0],u[0][1],c,i,a,e.point.middle(n),s,l),l&&w(l,i,u[1],u[0],e.angle.noRevolutions(n.startAngle-90))}},Z[e.pathType.BezierSeed]=function(t,n,r,i,o,a,s){var l=[];f(l,n,E.accuracy),g(t,n.origin[0],n.origin[1],l,r,o,e.point.middle(n),a,s)};var H=new t.XmlTag("g"),Y={beforeChildWalk:function(e){return x(e.childId,e.childModel),!0},onPath:function(t){var n=Z[t.pathContext.type];if(n){var r=e.point.add(v(t.offset),E.origin);n(t.pathId,m(t.pathContext,r),t.layer,null,t.route,E.annotate,E.flow)}},afterChildWalk:function(e){k(e.childModel)}};x("0",_),e.model.walk(_,Y);for(var K in T){var X=new t.XmlTag("g",{id:K});u(X.attrs,h(K));for(var G=0;G180,r?t.startAngle>t.endAngle:t.startAngle180,t.startAngle>t.endAngle),o(i[0],a,n)},d[e.pathType.BezierSeed]=function(e,t){var n=[];return f(n,e,t),o(e.origin,n,t)},t.pathToSVGPathData=a,t.toSVGPathData=l,t.toSVG=u,t.svgUnit={},t.svgUnit[e.unitType.Inch]={svgUnitType:"in",scaleConversion:1},t.svgUnit[e.unitType.Millimeter]={svgUnitType:"mm",scaleConversion:1},t.svgUnit[e.unitType.Centimeter]={svgUnitType:"cm",scaleConversion:1},t.svgUnit[e.unitType.Foot]={svgUnitType:"in",scaleConversion:12},t.svgUnit[e.unitType.Meter]={svgUnitType:"cm",scaleConversion:100}}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(n,r){function i(e){l.paths||(l.paths={}),l.paths["p_"+ ++d]=e}function o(e){l.models||(l.models={}),l.models["p_"+ ++d]=e}function a(t,n){void 0===n&&(n=0);var r=e.point.mirror([t.data[0+n],t.data[1+n]],!1,!0);return t.absolute?r:e.point.add(r,t.from)}function s(t,n){return e.measure.isPointEqual(t.from,n)||i(new e.paths.Line(t.from,n)),n}void 0===r&&(r={});var l={},u={};u.M=function(e){return p=a(e)},u.Z=function(e){return s(e,p)},u.H=function(t){var n=e.point.clone(t.from);return t.absolute?n[0]=t.data[0]:n[0]+=t.data[0],s(t,n)},u.V=function(t){var n=e.point.clone(t.from);return t.absolute?n[1]=-t.data[0]:n[1]-=t.data[0],s(t,n)},u.L=function(e){return s(e,a(e))},u.A=function(t){var n=t.data[0],s=t.data[1],l=t.data[2],u=1===t.data[3],c=1===t.data[4],f=a(t,5),p=n!==s,h=new e.paths.Line(t.from,e.point.rotate(f,l,t.from));p&&(h=e.path.distort(h,1,n/s));var d=new e.paths.Arc(h.origin,h.end,n,u,c);if(p){if(n1&&t.push.apply(t,e.controls[1]),t.push.apply(t,e.end),n(),new Bezier(t)}function a(t){var n=t.extrema().values.map(function(t){return e.round(t)}).filter(function(e,t,n){return n.indexOf(e)===t}).sort();return 0===n.length?[0,1]:(0!==n[0]&&n.unshift(0),1!==n[n.length-1]&&n.push(1),n)}function s(e){return[e.x,e.y]}function l(t,n,r,i,o){function a(r){var a=n+l*r,u=s(t.get(a)),c=e.point.middle(i,o?1-r:r);return e.measure.pointDistance(c,u)}var l=r-n;return a(.25)+a(.75)}function u(t,n,r,i){for(var o,a,u,c=new v(t,n),f=new v(t,r),p=f,h=c,d=0,m=p;d<100;){var y=s(t.get((c.t+m.t)/2));try{o=new e.paths.Arc(c.point,y,m.point)}catch(e){if(a)return a;break}void 0===u&&(u=e.measure.isPointEqual(c.point,e.point.fromAngleOnCircle(o.endAngle,o)));if(l(t,n,m.t,o,u)<=i?(o.bezierData={startT:n,endT:m.t},h=m,a=o):p=m,h.t===p.t||a&&a!==o&&e.angle.ofArcSpan(o)-e.angle.ofArcSpan(a)<.5)return a;d++,m=new v(t,(h.t+p.t)/2)}var g=new e.paths.Line(c.point,m.point);return g.bezierData={startT:n,endT:m.t},g}function c(t,n,r,i,o,a){for(var s,l=0;iu[1]&&l.reverse();for(var c=2;c--;)if(!e.measure.isPointEqual(l[c],s[c].point))return null;return n.bezierData}function p(t,n,r,i){var o=[n.links[0],n.links[n.links.length-1]];o[0].walkedPath.pathContext.bezierData.startT>o[1].walkedPath.pathContext.bezierData.startT&&(e.chain.reverse(n),o.reverse());var a=o.map(function(e){return f(t,e.walkedPath.pathContext,e.endPoints,e.walkedPath.offset)}),s={startT:a[0]?a[0].startT:null,endT:a[1]?a[1].endT:null};return null!==s.startT&&null!==s.endT?s:n.links.length>2?(null===s.startT&&(i(n.links[0].walkedPath.pathContext,r,!0),s.startT=n.links[1].walkedPath.pathContext.bezierData.startT),null===s.endT&&(i(n.links[n.links.length-1].walkedPath.pathContext,r,!0),s.endT=n.links[n.links.length-2].walkedPath.pathContext.bezierData.endT),s):null}var h,d=!1,v=function(){function t(t,n,r){this.t=n,this.point=e.point.add(s(t.get(n)),r)}return t}(),m=function(){function t(){for(var t=[],n=0;n2&&s(a.length-1,0,!0)}return t}();t.ConnectTheDots=r,r.metaParameters=[{title:"closed",type:"bool",value:!0},{title:"points",type:"select",value:[[[0,0],[40,40],[60,20],[100,100],[60,60],[40,80]],[[0,0],[100,0],[50,87]],[-10,0,10,0,0,20],"-10 0 10 0 0 20"]}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function n(e,r,i,o){this.paths={},this.paths=new t.ConnectTheDots(!0,n.getPoints(e,r,i,o)).paths}return n.circumscribedRadius=function(e,t){return e/Math.cos(t/2)},n.getPoints=function(t,r,i,o){void 0===i&&(i=0),void 0===o&&(o=!1);var a=[],s=e.angle.toRadians(i),l=2*Math.PI/t;o&&(r=n.circumscribedRadius(r,l));for(var u=0;u0&&(this.paths.TopLeft=new e.paths.Arc([-a,s],r,90,180),this.paths.TopRight=new e.paths.Arc([a,s],r,0,90)),a&&(this.paths.Top=new e.paths.Line([-a,n],[a,n]))}return t}();t.Dome=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:25},{title:"bottomless",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(){for(var t=[],n=0;n0&&(this.paths.BottomLeft=new e.paths.Arc([o,o],o,180,270),this.paths.BottomRight=new e.paths.Arc([l,o],o,270,0),this.paths.TopRight=new e.paths.Arc([l,u],o,0,90),this.paths.TopLeft=new e.paths.Arc([o,u],o,90,180)),l-o>0&&(this.paths.Bottom=new e.paths.Line([o,0],[l,0]),this.paths.Top=new e.paths.Line([l,i],[o,i])),u-o>0&&(this.paths.Right=new e.paths.Line([r,o],[r,u]),this.paths.Left=new e.paths.Line([0,u],[0,o]))}return t}();t.RoundRectangle=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:11}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t,n){this.paths={},this.paths=new e.RoundRectangle(t,n,Math.min(n/2,t/2)).paths}return t}();e.Oval=t,t.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this;this.paths={};var l;if(a&&(l={models:{}},this.models={Caps:l}),!(i<=0||r<=0)&&(t=e.angle.noRevolutions(t),n=e.angle.noRevolutions(n),0!=e.round(t-n))){n0;f&&c("Inner",-i);var p=[];p.push(u("StartCap",t,180,0)),p.push(u("EndCap",n,0,180));if(e.measure.pointDistance(p[0].origin,p[1].origin)/2n?(i=r(l,u),o=270,a=360-e.angle.toDegrees(Math.acos(u/i)),s=[0,i]):(i=r(u,l),o=180-e.angle.toDegrees(Math.asin(l/i)),a=180,s=[i,0]);var c=new e.paths.Arc(s,i,o,a);this.paths.curve_start=c,this.paths.curve_end=e.path.moveRelative(e.path.mirror(c,!0,!0),[t,n])}return t}();t.SCurve=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i){void 0===i&&(i=!1);var o=this;this.paths={};var a;i&&(a={models:{}},this.models={Caps:a});var s=function(e,t){var n;i?(n={paths:{}},a.models[e]=n):n=o,n.paths[e]=t},l=e.angle.ofPointInDegrees(t,n),u=e.measure.pointDistance(t,n);this.paths.Top=new e.paths.Line([0,r],[u,r]),this.paths.Bottom=new e.paths.Line([0,-r],[u,-r]),s("StartCap",new e.paths.Arc([0,0],r,90,270)),s("EndCap",new e.paths.Arc([u,0],r,270,90)),e.model.rotate(this,l,[0,0]),this.origin=t}return t}();t.Slot=n,n.metaParameters=[{title:"origin",type:"select",value:[[0,0],[10,0],[10,10]]},{title:"end",type:"select",value:[[80,0],[0,30],[10,30]]},{title:"radius",type:"range",min:1,max:50,value:10}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t){this.paths={},this.paths=new e.Rectangle(t,t).paths}return t}();e.Square=t,t.metaParameters=[{title:"side",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(n,r,i,o){void 0===o&&(o=2),this.paths={},i||(i=r*t.InnerRadiusRatio(n,o));for(var a=e.Polygon.getPoints(n,r),s=e.Polygon.getPoints(n,i,180/n),l=[],u=0;u0&&t>1&&t0){var y,g={};y=c?{models:{deleted:c,char:f}}:f,e.model.combine(y,d,!1,!0,!1,!0,g),c=g.out_deleted[1]}u.models[p]=d,p++,f=d};t.forEachGlyph(r,0,0,i,l,h)}return n.glyphToModel=function(n,r,i){function o(e){u.paths||(u.paths={}),u.paths["p_"+ ++c]=e}function a(e){u.models||(u.models={}),u.models["p_"+ ++c]=e}var s,l,u={},c=0;return n.getPath(0,0,r).commands.map(function(n,r){var u=[[n.x,n.y],[n.x1,n.y1],[n.x2,n.y2]].map(function(t){if(void 0!==t[0])return e.point.mirror(t,!1,!0)});switch(n.type){case"M":s=u[0];break;case"Z":u[0]=s;case"L":e.measure.isPointEqual(l,u[0])||o(new e.paths.Line(l,u[0]));break;case"C":a(new t.BezierCurve(l,u[1],u[2],u[0],i));break;case"Q":a(new t.BezierCurve(l,u[1],u[0],i))}l=u[0]}),u},n}();t.Text=n,n.metaParameters=[{title:"font",type:"font",value:"*"},{title:"text",type:"text",value:"Hello"},{title:"font size",type:"range",min:10,max:200,value:72},{title:"combine",type:"bool",value:!1},{title:"center character origin",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={})),MakerJs.version="0.11.1";var Bezier=__webpack_require__(109)},function(e,t,n){(function(t){var n=function(){"use strict";function e(n,r,i,o){function s(n,i){if(null===n)return null;if(0==i)return n;var f,p;if("object"!=typeof n)return n;if(e.__isArray(n))f=[];else if(e.__isRegExp(n))f=new RegExp(n.source,a(n)),n.lastIndex&&(f.lastIndex=n.lastIndex);else if(e.__isDate(n))f=new Date(n.getTime());else{if(c&&t.isBuffer(n))return f=t.allocUnsafe?t.allocUnsafe(n.length):new t(n.length),n.copy(f),f;"undefined"==typeof o?(p=Object.getPrototypeOf(n),f=Object.create(p)):(f=Object.create(o),p=o)}if(r){var h=l.indexOf(n);if(-1!=h)return u[h];l.push(n),u.push(f)}for(var d in n){var v;p&&(v=Object.getOwnPropertyDescriptor(p,d)),v&&null==v.set||(f[d]=s(n[d],i-1))}return f}"object"===typeof r&&(i=r.depth,o=r.prototype,r.filter,r=r.circular);var l=[],u=[],c="undefined"!=typeof t;return"undefined"==typeof r&&(r=!0),"undefined"==typeof i&&(i=1/0),s(n,i)}function n(e){return Object.prototype.toString.call(e)}function r(e){return"object"===typeof e&&"[object Date]"===n(e)}function i(e){return"object"===typeof e&&"[object Array]"===n(e)}function o(e){return"object"===typeof e&&"[object RegExp]"===n(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=n,e.__isDate=r,e.__isArray=i,e.__isRegExp=o,e.__getRegExpFlags=a,e}();"object"===typeof e&&e.exports&&(e.exports=n)}).call(t,n(99).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"===typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function F(e){if(e=J(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function H(e){return X.toByteArray(F(e))}function Y(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var X=n(100),G=n(101),$=n(102);t.Buffer=o,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"===typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new p(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;c>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;oa?a:o+16383));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=u;for(var c=[],f=[],p="undefined"!==typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,v=h.length;d>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?p/l:p*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t,n,r,o){return new i(e,t,n,r,o)}function i(e,t,n,r,i){t=t||o,n=n||a,i=i||Array,this.nodeSize=r||64,this.points=e,this.ids=new i(e.length),this.coords=new i(2*e.length);for(var l=0;lr;){if(a-r>600){var l=a-r+1,u=n-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);i(e,t,n,Math.max(r,Math.floor(n-u*f/l+p)),Math.min(a,Math.floor(n+(l-u)*f/l+p)),s)}var h=t[2*n+s],d=r,v=a;for(o(e,t,r,n),t[2*a+s]>h&&o(e,t,r,a);dh;)v--}t[2*r+s]===h?o(e,t,r,v):(v++,o(e,t,v,a)),v<=n&&(r=v+1),n<=v&&(a=v-1)}}function o(e,t,n,r){a(e,n,r),a(t,2*n,2*r),a(t,2*n+1,2*r+1)}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var f=u.pop(),p=u.pop(),h=u.pop();if(p-h<=a)for(var d=h;d<=p;d++)s=t[2*d],l=t[2*d+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[d]);else{var v=Math.floor((h+p)/2);s=t[2*v],l=t[2*v+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[v]);var m=(f+1)%2;(0===f?n<=s:r<=l)&&(u.push(h),u.push(v-1),u.push(m)),(0===f?i>=s:o>=l)&&(u.push(v+1),u.push(p),u.push(m))}}return c}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a){for(var s=[0,e.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),f=s.pop(),p=s.pop();if(f-p<=a)for(var h=p;h<=f;h++)i(t[2*h],t[2*h+1],n,r)<=u&&l.push(e[h]);else{var d=Math.floor((p+f)/2),v=t[2*d],m=t[2*d+1];i(v,m,n,r)<=u&&l.push(e[d]);var y=(c+1)%2;(0===c?n-o<=v:r-o<=m)&&(s.push(p),s.push(d-1),s.push(y)),(0===c?n+o>=v:r+o>=m)&&(s.push(d+1),s.push(f),s.push(y))}}return l}function i(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}t.a=r},function(e,t,n){function r(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}var i;r.prototype={constructor:r,Point:function(e,t){this.x=e,this.y=t},_findPolarAngle:function(e,t){var n,r;if(!e||!t)return 0;if(n=t.x-e.x,r=t.y-e.y,0==n&&0==r)return 0;var i=57.295779513082*Math.atan2(r,n);return this.reverse?0>=i&&(i+=360):i>=0&&(i+=360),i},addPoint:function(e,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(e,t)):this.anchorPoint.y>t&&this.anchorPoint.x>e||this.anchorPoint.y===t&&this.anchorPoint.x>e||this.anchorPoint.y>t&&this.anchorPoint.x===e?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(e,t))):void this.points.push(new this.Point(e,t))},_sortPoints:function(){var e=this;return this.points.sort(function(t,n){var r=e._findPolarAngle(e.anchorPoint,t),i=e._findPolarAngle(e.anchorPoint,n);return i>r?-1:r>i?1:0})},_checkPoints:function(e,t,n){var r=this._findPolarAngle(e,t),i=this._findPolarAngle(e,n);return r>i?!(r-i>180):!(i>r)||i-r>180},getHull:function(){var e,t,n=[];if(this.reverse=this.points.every(function(e){return e.x<0&&e.y<0}),e=this._sortPoints(),3>(t=e.length))return e.unshift(this.anchorPoint),e;for(n.push(e.shift(),e.shift());;){var r,i,o;if(n.push(e.shift()),r=n[n.length-3],i=n[n.length-2],o=n[n.length-1],this._checkPoints(r,i,o)&&n.splice(n.length-2,1),0==e.length){if(t==n.length){var a=this.anchorPoint;return n=n.filter(function(e){return!!e}),n.some(function(e){return e.x==a.x&&e.y==a.y})||n.unshift(this.anchorPoint),n}e=n,t=e.length,n=[],n.push(e.shift(),e.shift())}}}},n(108)&&(void 0!==(i=function(){return r}.call(t,n,t,e))&&(e.exports=i)),"undefined"!=typeof e&&(e.exports=r)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){e.exports=n(31)},function(e,t,n){!function(){"use strict";var t=n(32),r=function(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)};r.prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map(function(e){return t.pointsToString(e.points)}).join(", ")+"]"},addCurve:function(e){this.curves.push(e),this._3d=this._3d||e._3d},length:function(){return this.curves.map(function(e){return e.length()}).reduce(function(e,t){return e+t})},curve:function(e){return this.curves[e]},bbox:function(){for(var e=this.curves,n=e[0].bbox(),r=1;r2)for(a=0;a","\"","getOpeningTag","selfClose","attrName","attrValue","getInnerText","innerTextEscaped","getClosingTag","closingTags","wrap","content","facetSizeToResolution","arcOrCircle","facetSize","chainToJscadScript","reverseTail","tail","head","exit","beginMap","circleOptions","resolution","arcOptions","startangle","endangle","appendMap","large","makePhasedCallback","originalCb","phaseStart","phaseSpan","progress","toJscadCAG","jscadCAG","jsCadCagOptions","chainToJscadCag","fromPoints","jscadCagUnion","augend","addend","union","jscadCagSubtraction","minuend","subtrahend","convertChainsTo2D","convertToT","subtraction","unionize","complete","statusCallback","subtractChains","cs","subtracts","addChains","cag","adds","chainsResult","closedCount","resultMap","flatAdds","toJscadCSG","to2D","to3D","extrude","csg","union3D","convert2Dto3D","result2D","csgs","toJscadScript","_chainToJscadScript","scriptUnion","scriptSubtraction","nl","indent","functionName","toJscadSTL","CAG","stlSerializer","serialize","binary","toPDF","exportUnits","scaledModel","single","pathData","pathToSVGPathData","chainToSVGPathData","fixedPath","svgCoords","correctArc","offsetPoint","firstPoint","chainLinkToPathDataMap","startSvgPathData","pathToExport","exportOffset","clockwiseCircle","svgPathDataMap","getPathDataByLayer","pathDataByLayer","doChains","toSVGPathData","fillRule","findChainsOptions","pathDataArrayByLayer","pathDataStringByLayer","forcePush","layers","elements","cssStyle","elOpts","addSvgAttrs","stroke-width","tagname","scalingStroke","fixPoint","pointToFix","pointMirroredY","fixPath","pathToFix","drawText","textPoint","drawPath","annotate","flow","data-route","circleInPaths","svgCircleData","addFlowMarks","arrowEnd","beginModel","modelGroup","endModel","strokeLineCap","fontSize","useSvgPathOnly","itemToExportIsModel","unitSystem","useSvgUnit","svgUnit","scaleConversion","svgAttrs","svgUnitType","svgTag","groupAttrs","stroke-linecap","fill-rule","font-size","svgGroup","layerId1","class","svgArcData","svgBezierData","layerId2","layerGroup","halfCircle","sign","final","increasing","fromSVGPathData","pathCount","getPoint","cmd","lineTo","rx","ry","decreasing","elliptic","xAxis","scaleUp","control1","control2","prevControl2","command","control","prevControl","prevCommand","commandMatches","currPoint","regexpCommands","dataString","currCmd","layout","getChildPlacement","baseline","measureParent","parentTop","cpa","xMap","childMeasure","xRatio","cp","firstX","lastX","moveAndRotate","childrenOnPath","chosenPath","onPathLength","miterAngles","childrenOnChain","onChain","rotated","chainLength","relatives","absolutes","endLink","cloneToRadial","itemToClone","rotateFn","cloneTo","dimension","margin","measureFn","moveFn","cloneToColumn","cloneToRow","cloneToGrid","xCount","yCount","margins","getMargins","cloneToAlternatingRows","spacingFn","0","spacing","xMargin","cloneToBrick","yMargin","cloneToHoneycomb","hex","ensureBezierLib","hasLib","getScratch","bezierJsPoints","BezierToSeed","getIPoint","parentRange","seedToBezier","getExtrema","getError","arcReversed","tSpan","bp","ap","getLargestArc","lastGoodArc","TPoint","upper","lower","getArcs","getActualBezierRange","endpoints","tPoints","endpointDistancetoStart","getChainBezierRange","addToLayer","endLinks","actualBezierRanges","isArrayArg0","extremaSpan","seedsByLayer","pathToAdd","piece","controlYForCircularCubic","arcSpanInRadians","controlPointsForCircularCubic","bezierSeedFromArc","maxBezierArcspan","isPointArgs0","realArgs","numArgs","distortX","distortY","subSpan","subArc","getPoints","isClosed","skipZeroDistance","numberOfSides","firstCornerAngleInDegrees","circumscribed","Holes","holeRadius","ids","BoltCircle","boltRadius","boltCount","firstBoltAngleInDegrees","BoltRectangle","Dogbone","bottomless","maxRadius","maxSide","SQRT2","ax","ay","apexes","Dome","w2","wt","RoundRectangle","wr","Oval","sweepRadius","slotRadius","selfIntersect","capRoot","Caps","addCap","tiltAngle","offsetStartAngle","offsetEndAngle","capModel","addSweep","offsetRadius","hasInner","Rectangle","outerRadius","innerRadius","radii","Ring_outer","Ring_inner","Belt","leftRadius","rightRadius","SCurve","findRadius","arcOrigin","h2","capPath","Square","Star","skipPoints","InnerRadiusRatio","outerPoints","innerPoints","allPoints","Text","font","centerCharacterOrigin","opentypeOptions","prevDeleted","prevChar","charIndex","glyph","_fontSize","charModel","glyphToModel","deleted","forEachGlyph","getPath","commands","Buffer","circular","depth","_clone","proto","__isArray","__isRegExp","__getRegExpFlags","__isDate","useBuffer","isBuffer","allocUnsafe","allParents","allChildren","__objToStr","ignoreCase","multiline","clonePrototype","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","encodingOrOffset","fromArrayBuffer","fromString","fromObject","assertSize","alloc","encoding","isEncoding","actual","write","fromArrayLike","byteOffset","isnan","SlowBuffer","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","read","indexSize","readUInt16BE","arrLength","valLength","foundIndex","hexWrite","strLen","parsed","parseInt","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","out","toHex","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","leadSurrogate","byteArray","lo","toByteArray","dst","INSPECT_MAX_BYTES","foo","subarray","poolSize","_augment","species","allocUnsafeSlow","_isBuffer","compare","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","getLens","b64","validLen","lens","placeHoldersLen","_byteLength","tmp","Arr","curByte","revLookup","tripletToBase64","num","lookup","encodeChunk","uint8","output","extraBytes","len2","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","LN2","getX","getY","nodeSize","ArrayType","KDBush","defaultGetX","defaultGetY","__WEBPACK_IMPORTED_MODULE_0__sort__","__WEBPACK_IMPORTED_MODULE_1__range__","__WEBPACK_IMPORTED_MODULE_2__within__","minX","minY","maxX","maxY","sortKD","inc","swapItem","axis","nextAxis","qx","qy","sqDist","bx","by","ConvexHullGrahamScan","anchorPoint","_findPolarAngle","_sortPoints","_checkPoints","__webpack_amd_options__","addCurve","makeBezier","term","cvalues","PreboundConstructor","convertPath","terms","normalise","matcher","ARGS","normalizePath","instruction","op","lop","instructions","instructionLength","sx","sy","cx2","cy2","normalized"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EA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GACAvhH,EAAAjO,KAAAyvH,GAEA,MAAAP,GACAM,EAAA1vH,EAAAhP,EAAAP,GACAk/H,EAAAzvH,EAAAlP,EAAAP,EAAA,GACAuP,GAAAhP,EAAAP,EAAA,GACAyP,GAAAlP,EAAAP,EAAA,KAEAi/H,EAAA1+H,EAAAP,GACAk/H,EAAA3+H,EAAAP,EAAA,GACAuP,EAAAhP,EAAAP,EAAA,GACAyP,EAAAlP,EAAAP,EAAA,IAEAm/H,IAAA,IAAA1hH,EAAAC,EAAAuhH,EAAAC,EAAA3vH,EAAAE,EAAA,IAAAtL,KAAA,SAEK,MAAAy6H,IACLO,GAAA,KAEA5vH,EAAAwvH,EACAtvH,EAAAuvH,EAGA,OAAAG,GAAAriG,OAGAx+B,EAAAD,QAAAogI","file":"static/js/main.21b11d96.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 33);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nif (true) {\n module.exports = __webpack_require__(40);\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(50)();\n}\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = \"production\" !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(5);\n/* unused harmony reexport parsePath */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__[\"b\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return stripLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return hasBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return stripBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return stripTrailingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return parsePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createPath; });\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nvar createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (false) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return locationsAreEqual; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(5);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = Object(__WEBPACK_IMPORTED_MODULE_2__PathUtils__[\"d\" /* parsePath */])(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = Object(__WEBPACK_IMPORTED_MODULE_0_resolve_pathname__[\"a\" /* default */])(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nvar locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_1_value_equal__[\"a\" /* default */])(a.state, b.state);\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createTransitionManager);\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(11);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__[\"a\" /* default */]);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;\n };\n\n return Router;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRouter.propTypes = {\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node\n};\nRouter.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Router);\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (matchPath);\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Utils = __webpack_require__(14)\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar asap = __webpack_require__(36);\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (false) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (false) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(49);\n/* unused harmony reexport BrowserRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(58);\n/* unused harmony reexport MemoryRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(60);\n/* unused harmony reexport NavLink */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(62);\n/* unused harmony reexport Prompt */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(64);\n/* unused harmony reexport Redirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(10);\n/* unused harmony reexport Router */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(66);\n/* unused harmony reexport StaticRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(70);\n/* unused harmony reexport generatePath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(71);\n/* unused harmony reexport matchPath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(72);\n/* unused harmony reexport withRouter */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canUseDOM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return removeEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getConfirmation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return supportsHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return supportsPopStateOnHashChange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return supportsGoWithoutReloadUsingHash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isExtraneousPopstateEvent; });\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"c\" /* createLocation */])(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nLink.propTypes = {\n onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,\n innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Link);\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(24);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__[\"a\" /* default */]);\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRoute.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from \n path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRoute.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n })\n};\nRoute.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Route);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isarray = __webpack_require__(61)\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (generatePath);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i5&&arguments[5]!==undefined?arguments[5]:false;_classCallCheck(this,Point);this.cx=point[0];this.cy=point[1];this.fill='#2da7cf80';this.stroke='rgb(123, 207, 225)';this.selector=selector;this.canvas=canvas;this.x=x;this.y=y;this.zoom=zoom;this.el=document.createElementNS('http://www.w3.org/2000/svg','circle');this.select=this.select.bind(this);this.move=this.move.bind(this);this.stopEditing=this.stopEditing.bind(this);this.get_point=this.get_point.bind(this);this.old_cx=point[0];this.old_cy=point[1];this.base_size=10;this.base_stroke=5;this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;}_createClass(Point,[{key:'draw',value:function draw(){this.el.setAttribute('cx',this.cx);this.el.setAttribute('cy',this.cy);this.el.setAttribute('r',this.size);this.el.style.stroke=this.stroke;this.el.style.strokeWidth=this.strokeWidth;this.el.style.fill=this.fill;}},{key:'setSize',value:function setSize(zoom){this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;this.draw();}},{key:'edit',value:function edit(){this.el.addEventListener('click',this.select);}},{key:'clear',value:function clear(){window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);this.fill='#2da7cf80';this.cx=this.old_cx;this.cy=this.old_cy;this.draw();}},{key:'stopEditing',value:function stopEditing(){window.snapping_points.push([this.cx,this.cy]);this.old_cx=this.cx;this.old_cy=this.cy;this.fill='#2da7cf80';this.draw();window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis1||ub<0||ub>1){return false;}// Return a object with the x and y coordinates of the intersection\nvar x=x1+ua*(x2-x1);var y=y1+ua*(y2-y1);return{x:x,y:y};}function calc_vol(poly,scale){var measures=toD3(poly);var dist=(measures.centroid[0]-window.r_axis)*2*Math.PI;var vol=dist*measures.area*Math.pow(scale,3);return Math.abs(vol);}function distance(p1,p2){return Math.sqrt(Math.pow(p1[0]-p2[0],2)+Math.pow(p1[1]-p2[1],2));}function calcScale(poly,value,unit){if(!poly){return null;}var v1=[poly.points[0].cx,poly.points[0].cy];var v2=[poly.points[1].cx,poly.points[1].cy];var d=distance(v1,v2);var new_value=void 0;if(unit==='inch'){new_value=value*2.54;}else{new_value=value;}var pro=new_value/d/10;return pro;}function toD3(poly){var points_array=[];poly.forEach(function(point){points_array.push([point.cx,point.cy]);});return{centroid:d3.polygonCentroid(points_array),area:d3.polygonArea(points_array)};}function cleanedPoly(array){var points=[];var x=0;array.forEach(function(el){if(xend.cy&&window.maxFill=1){//message = \"Simple join\"\nif(points[0]==='start-start'){new_poly=poly1.points.reverse().concat(poly2.points);}else if(points[0]==='end-end'){new_poly=poly1.points.concat(poly2.points.reverse());}else if(points[0]==='start-end'){new_poly=poly2.points.concat(poly1.points);}else if(points[0]==='end-start'){new_poly=poly1.points.concat(poly2.points);}if(points.length===2){//message = \"closed line\"\n}return new_poly;}else{return;}}function polyPointsToPathData(points_string){return'M'+points_string.replace(/, /g,',').replace(/ $/,'').replace(/ /g,'L');}\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = __webpack_require__(32);\n\n // only used for outlines atm.\n var PolyBezier = __webpack_require__(110);\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = __webpack_require__(111);\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = __webpack_require__(31);\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(15);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(75);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__App__ = __webpack_require__(76);\n__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__[\"a\" /* HashRouter */],null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__App__[\"a\" /* default */],null)),document.getElementById('root'));\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar k=__webpack_require__(8),n=__webpack_require__(17),p=__webpack_require__(18),q=__webpack_require__(19),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"a\" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nBrowserRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (BrowserRouter);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(51);\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"g\" /* supportsHistory */])();\n var needsHashChangeListener = !Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"h\" /* supportsPopStateOnHashChange */])();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"d\" /* isExtraneousPopstateEvent */])(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createBrowserHistory);\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (resolvePathname);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (valueEqual);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */])(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n },\n slash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"f\" /* supportsGoWithoutReloadUsingHash */])();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"b\" /* locationsAreEqual */])(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location));\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createHashHistory);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(9);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, createKey()) : Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = __WEBPACK_IMPORTED_MODULE_1__PathUtils__[\"b\" /* createPath */];\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createMemoryHistory);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(10);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"b\" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nHashRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (HashRouter);\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(59);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(11);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"d\" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,\n initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (MemoryRouter);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(22);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__[\"a\" /* default */], {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */], _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: __WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */].propTypes.to,\n exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n \"aria-current\": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (NavLink);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(63);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__[\"a\" /* default */]);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPrompt.propTypes = {\n when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Prompt);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(65);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__[\"a\" /* default */]);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(26);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(prevProps.to);\n var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(this.props.to);\n\n if (Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"f\" /* locationsAreEqual */])(prevTo, nextTo)) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nRedirect.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from \n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Redirect);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(67);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"e\" /* createPath */])(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__[\"a\" /* default */], _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nStaticRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (StaticRouter);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(69);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__[\"a\" /* default */]);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {\n if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSwitch.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Switch);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(26);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__[\"a\" /* default */]);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(12);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__[\"a\" /* default */]);\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(73);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(24);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__[\"a\" /* default */], {\n children: function children(routeComponentProps) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (withRouter);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__responsive_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Draw__ = __webpack_require__(77);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:\"other\";this.globalStopEditingMode();this.addCursorPoint();var new_polylines=this.state.polylines;var polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:type,selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});new_polylines.push(polyline);this.id++;this.setState({polylines:new_polylines,active_polyline:polyline});}},{key:'selectLayer',value:function selectLayer(id){var _this2=this;if(this.state.active_polyline){if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:\"Escape\"});}}this.setState({active_polyline:this.getPolylineById(id)},function(){_this2.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});_this2.state.active_polyline.el.classList.toggle('active');});}//////////////////////////////////////////////////////////////////////////////\n// UTILITIES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'unselect_polyline',value:function unselect_polyline(e){console.log(e.code);if(e.code==='Escape'||e.code==='KeyQ'){if(this.state.active_polyline){this.state.active_polyline.el.classList.remove('active');this.state.active_polyline.stopEditing({'code':'Escape'});if(this.state.active_polyline.editing){this.state.active_polyline.stopEditingPoints({'code':'Escape'});}if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:'Escape'});}}this.setState({active_polyline:undefined});Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(this.state.polylines);this.checkProfile('int_prof');this.checkProfile('out_prof');if(this.new_point.added){this.removeCursorPoint();}//remove 0 or 1 vertex polyline\nthis.state.polylines.forEach(function(polyline){if(polyline.points.length<2){this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==polyline.id;})});this.canvas.removeChild(polyline.el);}}.bind(this));}}},{key:'globalStopEditingMode',value:function globalStopEditingMode(){this.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});if(this.state.active_polyline){this.state.active_polyline.stopEditing({'code':'Escape'});}}},{key:'addNotification',value:function addNotification(message){this.setState({notification:{id:this.not_id,message:message}});this.not_id++;}},{key:'getPolylineById',value:function getPolylineById(id){return this.state.polylines.filter(function(el){return el.id===id;})[0];}},{key:'addCursorPoint',value:function addCursorPoint(){this.canvas.appendChild(this.new_point.el);this.new_point.added=true;this.new_point.select();}},{key:'removeCursorPoint',value:function removeCursorPoint(){this.canvas.removeChild(this.new_point.el);this.new_point.added=false;}},{key:'updateToDo',value:function updateToDo(type,value){var toDo=this.state.toDo;toDo[type]=value;this.setState({toDo:toDo});}},{key:'checkProfile',value:function checkProfile(type){var poly1=this.state.polylines.filter(function(el){return el.type===type;});if(poly1.length===0){this.updateToDo(type,false);if(type==='int_prof'){if(this.inner_poly){this.canvas.removeChild(this.inner_poly);this.inner_poly=null;this.setState({vessel_capacity:null});}}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);this.vessel_poly=null;this.setState({vessel_volume:null});}}else if(poly1.length===1){this.updateToDo(type,true);}else{this.updateToDo(type,false);var profile=type==='int_prof'?'internal profile':'outer profile';this.addNotification('There should be only one '+profile);}}//////////////////////////////////////////////////////////////////////////////\n// JOIN POLYLINES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'joinIntExt',value:function joinIntExt(){var poly1=this.state.polylines.filter(function(el){return el.type==='int_prof';})[0];var poly2=this.state.polylines.filter(function(el){return el.type==='out_prof';})[0];if(!poly1||!poly2){this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\");return;}this.vesselVolume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"f\" /* join2Polylines */])(poly1,poly2);if(!this.vesselVolume){this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\");return;}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);}this.vessel_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.vesselVolume,'rgba(170, 170, 170, 0.6)');var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale);this.setState({vessel_volume:volume});this.canvas.appendChild(this.vessel_poly);}},{key:'create_inner_polygon',value:function create_inner_polygon(){var poly=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(poly.length===0){this.addNotification(\"To calculate vessel capacity you need an internal profile\");return;}if(this.inner_poly){this.canvas.removeChild(this.inner_poly);}//define inner polygon points based on inner profile and rotation axis\nthis.innerPolygon=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"e\" /* innerProfileToPolygon */])(poly[0].points.slice());//create svg polygon\nthis.inner_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.innerPolygon,'rgba(210, 204, 78, 0.28)');if(this.scale){var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale);this.setState({vessel_capacity:volume});}else{this.addNotification('Can\\'t measure, define scale first');}this.canvas.appendChild(this.inner_poly);}//////////////////////////////////////////////////////////////////////////////\n// ADD REFERENCE SCALE rotation axis AND MAX FILL //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'metricForm',value:function metricForm(obj){var _this3=this;if(obj.ref_unit){this.updateToDo('ref_unit',true);this.setState({metric_value:obj.value,metric_unit:obj.unit},function(){if(_this3.metric&&_this3.metric.points.length===2){_this3.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(_this3.metric,_this3.state.metric_value,_this3.state.metric_unit);//update volume info when metric info are updated\nif(_this3.innerPolygon){_this3.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.innerPolygon,_this3.scale)});}if(_this3.vesselVolume){_this3.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.vesselVolume,_this3.scale)});}}});}else{this.updateToDo('ref_unit',false);this.scale=null;}}},{key:'defineMaxFill',value:function defineMaxFill(){//remove maxFill if present\nif(this.maxFill){this.canvas.removeChild(this.maxFill.el);this.updateToDo('maxFill',false);}//create new maxFill polyline\nthis.maxFill=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'max_fill',type:'max_fill',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({code:'Escape'});}},{key:'addMaxFill',value:function addMaxFill(e){this.maxFill.stroke='rgb(0, 255, 21)';this.maxFill.add_point(e);this.canvas.appendChild(this.maxFill.el);this.maxFill.draw();//exit editing mode\nthis.maxFill.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.maxFill=this.maxFill.points[0].cy;this.updateToDo('maxFill',true);}},{key:'defineMetric',value:function defineMetric(){this.unselect_polyline({code:\"Escape\"});//remove metric if present\nif(this.metric){this.canvas.removeChild(this.metric.el);this.updateToDo('metric',false);}//create new metric polyline\nthis.metric=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'metric',type:'metric',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMetric);this.metric.stopEditing({code:'Escape'});}},{key:'addMetric',value:function addMetric(e){if(this.metric.points.length===0){this.metric.add_point(e);}else if(this.metric.points.length===1){//this is the 2nd point, add it and exit editing\nthis.metric.add_point(e);this.metric.stroke='red';this.metric.stopEditing({code:\"Escape\"});//set color\nthis.metric.el.classList.remove('active');//stop editing\nthis.canvas.removeEventListener('dblclick',this.addMetric);this.updateToDo('metric',true);this.removeCursorPoint();if(this.state.metric_value&&this.state.metric_unit){this.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(this.metric,this.state.metric_value,this.state.metric_unit);}//update volume info when metric info are updated\nif(this.innerPolygon){this.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale)});}if(this.vesselVolume){this.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale)});}}}},{key:'definerotAxis',value:function definerotAxis(){//remove if already present\nif(this.rotAxis){this.canvas.removeChild(this.rotAxis.el);window.r_axis=null;this.updateToDo('rotAxis',false);}//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addRotAxis);}},{key:'addRotAxis',value:function addRotAxis(e){//create rotation axis polyline\nthis.rotAxis=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'center',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.rotAxis.stroke='#ff5a00';this.rotAxis.add_point(e);this.canvas.appendChild(this.rotAxis.el);this.rotAxis.draw();//exit editing mode\nthis.rotAxis.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addRotAxis);this.rotAxis.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.r_axis=this.rotAxis.points[0].cx;this.updateToDo('rotAxis',true);}//////////////////////////////////////////////////////////////////////////////\n// LAYER EDITING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'colorChange',value:function colorChange(id,color){var my_polyline=this.getPolylineById(id);my_polyline.stroke=color;my_polyline.draw();}},{key:'typeChange',value:function typeChange(id,type){var _this4=this;this.setState({polylines:this.state.polylines.map(function(el){if(el.id===id){el.type=type;return el;}return el;})},function(){_this4.checkProfile('int_prof');_this4.checkProfile('out_prof');});}},{key:'delete_line',value:function delete_line(){var _this5=this;this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.canvas.removeChild(this.state.active_polyline.el);this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==_this5.state.active_polyline.id;}),active_polyline:undefined},function(){_this5.checkProfile('int_prof');_this5.checkProfile('out_prof');Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(_this5.state.polylines);});}},{key:'edit_line',value:function edit_line(){this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.state.active_polyline.editLine();}//////////////////////////////////////////////////////////////////////////////\n// LAYER BREAKING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'enterBreakLineMode',value:function enterBreakLineMode(){this.globalStopEditingMode();//check if breaking selected line is possible\nif(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}if(this.state.active_polyline.points.length<=2){this.addNotification(\"Line has two or less vertices and can't be subdivided\");return;}//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=true;this.setState({active_polyline:active_polyline});//add breaking points to canvas\nvar x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){this.canvas.appendChild(point.el);point.draw();point.el.addEventListener('click',this.breakLine);}x++;}.bind(this));}},{key:'exitBreakLineMode',value:function exitBreakLineMode(e){//remove breaking points from canvas\nif((e.code==='Escape'||e.code==='KeyQ')&&this.state.active_polyline.breaking_mode){var x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){point.el.removeEventListener('click',this.breakLine);this.canvas.removeChild(point.el);}x++;}.bind(this));//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=false;this.setState({active_polyline:active_polyline});}}},{key:'breakLine',value:function breakLine(e){var _this6=this;var break_point=[e.target.getAttribute('cx'),e.target.getAttribute('cy')];this.exitBreakLineMode({code:'Escape'});//instantiate polyline list to edit\nvar new_polylines=this.state.polylines;//create a new polyline\nvar polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//loop over the polyine to break and add point to new polyline until you get to the breaking point\nthis.state.active_polyline.points.forEach(function(point){polyline.appendPoint([point.cx,point.cy]);if(point.cx===parseFloat(break_point[0])&&point.cy===parseFloat(break_point[1])){//save draw and exit editing mode\npolyline.el.classList.remove('active');new_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//create a new polyline with starting point the breaking point\npolyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});polyline.appendPoint([point.cx,point.cy]);}}.bind(this));//save draw and exit editing mode for sencond line\nnew_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//delete orignal broken line and exit editing mode\nthis.state.active_polyline.stopEditing({'code':'Escape'});this.canvas.removeChild(this.state.active_polyline.el);//update the state with the two new lines without the old one\nthis.setState({polylines:new_polylines.filter(function(el){return el.id!==_this6.state.active_polyline.id;}),active_polyline:polyline});}//////////////////////////////////////////////////////////////////////////////\n// HANDLE IMAGE //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'image_rotate',value:function image_rotate(e){this.bck_image.style.transform='rotate('+e.target.value+'deg)';}},{key:'fileChangedHandler',value:function fileChangedHandler(e){var img_name=e.target.value.split(\"\\\\\");img_name=img_name[img_name.length-1];this.setState({img_name:img_name});var img=new Image();img.src=window.URL.createObjectURL(e.target.files[0]);img.onload=function(){var width=img.naturalWidth;var height=img.naturalHeight;var toDo=this.state.toDo;toDo.image=true;this.setState({img_w:width,img_h:height,selectedFile:img.src,toDo:toDo});}.bind(this);}//////////////////////////////////////////////////////////////////////////////\n// DOWNLOAD //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'download_svg',value:function download_svg(){var _this7=this;if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}var saved_path=this.state.selectedFile;if(this.state.img_name){this.setState({selectedFile:this.state.img_name.replace('href')},function(){download(_this7.svg.outerHTML,\"dlText.svg\",\"text/plain\");_this7.setState({selectedFile:saved_path});});}else{download(this.svg.outerHTML,\"myVessel.svg\",\"text/plain\");}}},{key:'download_dxf',value:function download_dxf(){if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}var makerjs=__webpack_require__(97);var models={models:{}};var x=1;this.state.polylines.forEach(function(polyline){var points=polyline.el.getAttribute('points');var closed=false;//true for SVG polygon, false for SVG polyline\nvar model=makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed,points),false,true);model=makerjs.model.scale(model,this.scale/10);models.models['my-'+x+'-line']=model;x++;}.bind(this));models.units=makerjs.units.Meter;var file=makerjs.exporter.toDXF(models,{units:makerjs.unitType.Meter});download(file,\"myVessel.dxf\",\"text/plain\");}},{key:'download_json',value:function download_json(){var title='myVessel';var coordinates=void 0,author=void 0,description='';var int_prof=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(int_prof.length>0){int_prof=int_prof[0];}else{this.addNotification('No inner profile to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}coordinates=[];int_prof.points.forEach(function(point){// scale the point - unit will be dm - convert to cm - invert y axis\ncoordinates.push([point.cx*this.scale/10,point.cy*this.scale/10*-1]);}.bind(this));coordinates=JSON.stringify(coordinates);var json='{ \"type\": \"Feature\",\\n \"geometry\": {\\n \"type\": \"LineString\",\\n \"coordinates\": '+coordinates+'\\n },\\n \"properties\": {\\n \"title\": \"'+title+'\",\\n \"description\": \"'+description+'\",\\n \"author\": \"'+author+'\"\\n }\\n }';this.addNotification('Export completed');download(json,title+'.json',\"text/plain\");}//////////////////////////////////////////////////////////////////////////////\n// RENDER //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'render',value:function render(){var _this8=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'container'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__components_Notification__[\"a\" /* default */],{notification:this.state.notification}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2',null,'Draw'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'drawing'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('svg',{id:'drawing-canvas',height:'500',width:'100%',ref:function ref(svg){_this8.svg=svg;}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('g',{className:'svg-pan-zoom_viewport',id:'canvas'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('image',{ref:function ref(bck_image){_this8.bck_image=bck_image;},id:'bck-img',href:this.state.selectedFile,x:'0',y:'0',height:this.state.img_h,width:this.state.img_w}))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'tools'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title'},'Actions:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.create_new_polyline.bind(this),title:'Create new line',alt:'Create new line'},'New'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.enterBreakLineMode.bind(this),title:'Break selected line',alt:'Break selected line'},'Break'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.delete_line.bind(this),title:'Delete selected line',alt:'Delete selected line'},'Delete'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.edit_line.bind(this),title:'Edit selected line',alt:'Edit selected line'},'Edit'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title2'},'Export:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_svg.bind(this),title:'Download SVG (no scaling)',alt:'Download SVG (no scaling)'},'SVG'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_dxf.bind(this),title:'Download all-lines as DXF (scaled: 1 unit = 1 meter)',alt:'Download all-lines as DXF (scaled: 1 unit = 1 meter)'},'DXF'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_json.bind(this),title:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)',alt:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)'},'JSON'))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'polylines'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'layer-title'},'Layers:'),this.state.toDo.image&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'image-layer',className:'polyline-layer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'slidecontainer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label',{htmlFor:'myRange'},'Rotate image'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input',{type:'number',min:'0',max:'360',defaultValue:'0',className:'slider',id:'myRange',step:'0.01',onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(el){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__components_listPoly__[\"a\" /* default */],{key:el.id,name:el.name,type:el.type,id:el.id,delete_line:_this8.delete_line.bind(_this8),edit_line:_this8.edit_line.bind(_this8),colorChange:_this8.colorChange.bind(_this8),typeChange:_this8.typeChange.bind(_this8),selectLayer:_this8.selectLayer.bind(_this8),selectedPoly:_this8.state.active_polyline?_this8.state.active_polyline.id:''});})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'basic-info'},'Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'Esc'),' or ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'q'),' to quit editing mode and deselect.'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__components_Steps__[\"a\" /* default */],{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__components_Measures__[\"a\" /* default */],{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}));}}]);return Draw;}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);/* harmony default export */ __webpack_exports__[\"a\"] = (Draw);//get point coordinates from event\n//get_point(e){\n// const matrix = this.canvas.transform.baseVal[0].matrix\n// const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n// return newPoint\n//}\n//\n//\n//\n//joinTwoPolylines(poly1, poly2){\n// const new_poly = join2Polylines(poly1, poly2)\n//\n// if(!new_poly){\n// this.addNotification(\"Not joinable\")\n// return\n// }\n// return joined_poly\n//\n// //const joined_poly = new Polyline({\n// // points: cleanedPoly(new_poly),\n// // id: this.id,\n// // type: poly1.type,\n// // selected: true,\n// // canvas: this.canvas,\n// // offsetX: this.x,\n// // offsetY: this.y,\n// // currentZoom: this.panZoomTiger.getZoom()\n// //})\n// //joined_poly.stopEditing({code:'Escape'})\n// //this.canvas.removeChild(joined_poly.el)\n// //this.id++\n//\n// //this.canvas.removeChild(poly1.el)\n// //this.canvas.removeChild(poly2.el)\n// //this.canvas.appendChild(joined_poly.el)\n// //joined_poly.draw()\n////\n// //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n// //new_polylines.push(joined_poly)\n// //this.addNotification(message)\n// //this.setState(\n// // { polylines: new_polylines,\n// // notification:{ id:this.not_id, message: message },\n// // active_polyline: joined_poly\n// // }\n// //)\n// //this.not_id++\n//}\n//joinTwoLines(){\n// //TODO\n// this.addNotification(\"Select first line\")\n//}\n//\n// Join 2 lines\n//\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Point__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MidPoint__ = __webpack_require__(79);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calc_functions__ = __webpack_require__(30);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&this.points.length>index){if(point.cx!==this.points[index-1].cx&&point.cy!==this.points[index-1].cy){var midpoint=new __WEBPACK_IMPORTED_MODULE_1__MidPoint__[\"a\" /* default */]([(point.cx+this.points[index-1].cx)/2,(point.cy+this.points[index-1].cy)/2],index,this.zoom);this.midpoints.push(midpoint);}}index++;}.bind(this));//add midpoints to canvas\nthis.midpoints.forEach(function(midpoint){this.canvas.appendChild(midpoint.el);midpoint.draw();midpoint.el.addEventListener('click',this.create);}.bind(this));}},{key:'create',value:function create(e){var index=e.target.getAttribute('index');var new_point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([parseFloat(e.target.getAttribute('cx')),parseFloat(e.target.getAttribute('cy'))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(index,new_point);}},{key:'addPointInMiddle',value:function addPointInMiddle(index,new_point){this.points.splice(index,0,new_point);this.canvas.appendChild(new_point.el);new_point.draw();new_point.edit();new_point.select();this.draw();}},{key:'pointsTo',value:function pointsTo(){var str='';this.points.forEach(function(point){str+=point.cx+', '+point.cy+' ';});return str;}//add point\n},{key:'add_point',value:function add_point(e){var new_point=this.get_point(e);if(this.type==='max_fill'){var point=[-1000000,new_point[1]];this.appendPoint(point);point=[1000000,new_point[1]];this.appendPoint(point);return;}if(this.type==='center'){var _point=[new_point[0],-1000000];this.appendPoint(_point);_point=[new_point[0],1000000];this.appendPoint(_point);return;}this.appendPoint(new_point);}},{key:'appendPoint',value:function appendPoint(array){window.snapping_points.push([array[0],array[1]]);var point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([array[0],array[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(point);this.draw();if(this.points.length===1){window.addEventListener('mousemove',this.previewPoint);window.addEventListener('keyup',this.stopEditing);}}},{key:'get_point',value:function get_point(e){var matrix=this.canvas.transform.baseVal[0].matrix;var newPoint=[(e.pageX-matrix.e-this.x)/matrix.a,(e.pageY-matrix.f-this.y)/matrix.a];return this.snapPoint(newPoint);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && Object(__WEBPACK_IMPORTED_MODULE_0__cross__[\"a\" /* default */])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n});\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n});\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n});\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\n// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13);\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13)\n , Utils = __webpack_require__(14)\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = __webpack_require__(98);\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = __webpack_require__(103);\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = __webpack_require__(107);\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = __webpack_require__(109);\r\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(Buffer) {var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(99).Buffer))\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(100)\nvar ieee754 = __webpack_require__(101)\nvar isArray = __webpack_require__(102)\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"default\"] = kdbush;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sort__ = __webpack_require__(104);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range__ = __webpack_require__(105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__within__ = __webpack_require__(106);\n\n\n\n\n\nfunction kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n Object(__WEBPACK_IMPORTED_MODULE_0__sort__[\"a\" /* default */])(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__range__[\"a\" /* default */])(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__within__[\"a\" /* default */])(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = sortKD;\n\nfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = range;\n\nfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = within;\n\nfunction within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==\"function\"&&__webpack_require__(108)&&!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return ConvexHullGrahamScan}.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports) {\n\n/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(31);\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n var utils = __webpack_require__(32);\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar normalise = __webpack_require__(112);\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\n/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// static/js/main.21b11d96.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5cd89ac8094629488961","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react/index.js\n// module id = 0\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 1\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/invariant/browser.js\n// module id = 2\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/warning/warning.js\n// module id = 3\n// module chunks = 0","export var addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nexport var createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/PathUtils.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/node_modules/warning/browser.js\n// module id = 6\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/LocationUtils.js\n// module id = 7\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 8\n// module chunks = 0","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n warning(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\nexport default createTransitionManager;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createTransitionManager.js\n// module id = 9\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Router from \"react-router/es/Router\";\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Router.js\n// module id = 10\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n invariant(children == null || React.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? React.Children.only(children) : null;\n };\n\n return Router;\n}(React.Component);\n\nRouter.propTypes = {\n history: PropTypes.object.isRequired,\n children: PropTypes.node\n};\nRouter.contextTypes = {\n router: PropTypes.object\n};\nRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Router.js\n// module id = 11\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/matchPath.js\n// module id = 12\n// module chunks = 0","var Utils = require('./utilities')\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-utilities.js\n// module id = 13\n// module chunks = 0","module.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/utilities.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/core.js\n// module id = 15\n// module chunks = 0","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 16\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/invariant.js\n// module id = 17\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyObject.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyFunction.js\n// module id = 19\n// module chunks = 0","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/DOMUtils.js\n// module id = 21\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport { createLocation } from \"history\";\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n invariant(this.context.router, \"You should not use outside a \");\n\n invariant(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? createLocation(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return React.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(React.Component);\n\nLink.propTypes = {\n onClick: PropTypes.func,\n target: PropTypes.string,\n replace: PropTypes.bool,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired,\n createHref: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Link;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Link.js\n// module id = 22\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Route from \"react-router/es/Route\";\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Route.js\n// module id = 23\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Route.js\n// module id = 24\n// module chunks = 0","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/index.js\n// module id = 25\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = pathToRegexp.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/generatePath.js\n// module id = 26\n// module chunks = 0","export default class Point {\n\n constructor(point, canvas, x, y, zoom, selector = false) {\n this.cx = point[0]\n this.cy = point[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n\n this.selector = selector\n this.canvas = canvas\n this.x = x\n this.y = y\n this.zoom = zoom\n\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n this.select = this.select.bind(this)\n this.move = this.move.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.get_point = this.get_point.bind(this)\n\n this.old_cx = point[0]\n this.old_cy = point[1]\n\n this.base_size = 10\n this.base_stroke = 5\n this.size = this.base_size / zoom\n this.strokeWidth = this.base_stroke / zoom\n }\n\n draw() {\n this.el.setAttribute('cx', this.cx);\n this.el.setAttribute('cy', this.cy);\n this.el.setAttribute('r', this.size);\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.fill = this.fill;\n }\n\n setSize(zoom) {\n this.size = this.base_size/zoom\n this.strokeWidth = this.base_stroke / zoom\n this.draw()\n }\n\n edit() {\n this.el.addEventListener('click', this.select)\n }\n\n clear() {\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n this.fill = '#2da7cf80'\n this.cx = this.old_cx\n this.cy = this.old_cy\n this.draw()\n }\n\n stopEditing() {\n window.snapping_points.push([this.cx, this.cy])\n this.old_cx = this.cx\n this.old_cy = this.cy\n\n this.fill = '#2da7cf80'\n this.draw()\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n move(e) {\n this.cx = this.get_point(e)[0]\n this.cy = this.get_point(e)[1]\n this.draw()\n if(!this.selector){\n window.addEventListener('dblclick', this.stopEditing)\n }\n }\n\n select() {\n this.old_cx = this.cx\n this.old_cy = this.cy\n this.fill = 'yellow'\n this.draw()\n window.addEventListener('mousemove', this.move)\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Point.js","const d3 = require('d3-polygon')\n\n//http://paulbourke.net/geometry/pointlineplane/javascript.txt\n// line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/\n// Determine the intersection point of two line segments\n// Return FALSE if the lines don't intersect\nfunction intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n // Check if none of the lines are of length 0\n\tif ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n\t\treturn false\n\t}\n\tlet denominator = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1))\n // Lines are parallel\n\tif (denominator === 0) {\n\t\treturn false\n\t}\n\tlet ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator\n\tlet ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator\n // is the intersection along the segments\n\tif (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n\t\treturn false\n\t}\n // Return a object with the x and y coordinates of the intersection\n\tlet x = x1 + ua * (x2 - x1)\n\tlet y = y1 + ua * (y2 - y1)\n\n\treturn {x, y}\n}\n\nfunction calc_vol(poly, scale) {\n let measures = toD3(poly)\n let dist = (measures.centroid[0] - window.r_axis) * 2 * Math.PI\n let vol = dist * measures.area * Math.pow(scale, 3)\n return Math.abs(vol)\n}\n\nfunction distance(p1, p2) {\n return Math.sqrt(Math.pow((p1[0] - p2[0]), 2) + Math.pow((p1[1] - p2[1]), 2))\n}\n\nfunction calcScale(poly, value, unit) {\n if (!poly) {\n return null\n }\n const v1 = [\n poly.points[0].cx,\n poly.points[0].cy\n ]\n const v2 = [\n poly.points[1].cx,\n poly.points[1].cy\n ]\n const d = distance(v1, v2)\n let new_value\n if (unit === 'inch') {\n new_value = value * 2.54\n } else {\n new_value = value\n }\n const pro = (new_value / d) / 10\n return pro\n}\n\nfunction toD3(poly) {\n let points_array = []\n poly.forEach(function(point) {\n points_array.push([point.cx, point.cy])\n })\n return {centroid: d3.polygonCentroid(points_array), area: d3.polygonArea(points_array)}\n}\n\nfunction cleanedPoly(array) {\n let points = []\n let x = 0\n array.forEach(function(el) {\n if (x < array.length - 1) {\n if (el.cx !== array[x + 1].cx && el.cy !== array[x + 1].cy) {\n points.push(el)\n }\n x++\n } else {\n points.push(el)\n }\n })\n return points\n}\n\nfunction getCommonPoints(poly1, poly2) {\n let start1 = poly1[0]\n let end1 = poly1[poly1.length - 1]\n let start2 = poly2[0]\n let end2 = poly2[poly2.length - 1]\n let commons = []\n if (start1.cx === start2.cx && start1.cy === start2.cy) {\n commons.push('start-start')\n }\n if (start1.cx === end2.cx && start1.cy === end2.cy) {\n commons.push('start-end')\n }\n if (end1.cx === start2.cx && end1.cy === start2.cy) {\n commons.push('end-start')\n }\n if (end1.cx === end2.cx && end1.cy === end2.cy) {\n commons.push('end-end')\n }\n return commons\n}\n\nfunction innerProfileToPolygon(old_poly) {\n let poly = [];\n old_poly.forEach(function(point){\n poly.push(Object.assign({}, point))\n })\n let start = poly[0]\n let end = poly[poly.length - 1]\n //start polyline from bottom to top Y values are inverted topY < bottomY\n if (start.cy < end.cy) {\n poly.reverse()\n start = poly[0]\n end = poly[poly.length - 1]\n }\n let new_end = Object.assign({}, end);\n\n //set max fill\n if(window.maxFill && window.maxFill > end.cy && window.maxFill < start.cy){\n //recreate poly excluding vetices above maxFill\n let temp_poly = []\n let first_time = true\n poly.forEach(function(point){\n if(point.cy < window.maxFill){\n\t\t\t\t//this vertex is above maxFill skip\n\t\t\t\t//if this is the first vertex above add it otherwise ignore it\n\t\t\t\tif(first_time){\n temp_poly.push(point)\n first_time = false\n }\n }else{\n\t\t\t\t//this vertex is under maxFill\n\t\t\t\t//add vertex that is under maxFill limit\n temp_poly.push(point)\n }\n })\n\n poly = temp_poly\n\n start = poly[0]\n end = poly[poly.length - 1]\n end.cx = intersect(\n end.cx, end.cy, poly[poly.length-2].cx, poly[poly.length-2].cy,\n -10000000, window.maxFill, 10000000, window.maxFill\n ).x\n end.cy = window.maxFill\n new_end.cy = window.maxFill\n }\n\n\n //if not caxis use start x as center axis else use the defined center axis\n if (!window.r_axis || window.r_axis === start.cx) {\n window.r_axis = start.cx\n new_end.cx = start.cx\n poly.push(new_end)\n poly.push(start) //duplicated to close polygon\n } else {\n let new_start = Object.assign({}, start);\n new_start.cx = window.r_axis\n new_end.cx = window.r_axis\n poly.push(new_end)\n poly.push(new_start)\n poly.push(start) //duplicated to close polygon\n }\n return poly\n}\n\nfunction create_polygon(poly, color) {\n let str = ''\n poly.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n let new_poly = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n new_poly.setAttribute('points', str)\n new_poly.style.fill = color\n new_poly.style.strokeWidth = '0'\n return new_poly\n}\n\nfunction recreate_snapping_points(polylines) {\n window.snapping_points = []\n polylines.forEach(function(poly) {\n poly.points.forEach(function(point) {\n window.snapping_points.push([point.cx, point.cy])\n })\n })\n}\n\nfunction join2Polylines(poly1, poly2) {\n const points = getCommonPoints(poly1.points.slice(), poly2.points.slice())\n let new_poly = []\n\n if (points.length >= 1) {\n //message = \"Simple join\"\n if (points[0] === 'start-start') {\n new_poly = poly1.points.reverse().concat(poly2.points)\n } else if (points[0] === 'end-end') {\n new_poly = poly1.points.concat(poly2.points.reverse())\n } else if (points[0] === 'start-end') {\n new_poly = poly2.points.concat(poly1.points)\n } else if (points[0] === 'end-start') {\n new_poly = poly1.points.concat(poly2.points)\n }\n if (points.length === 2) {\n //message = \"closed line\"\n }\n return new_poly\n } else {\n return\n }\n}\n\nfunction polyPointsToPathData(points_string){\n\treturn 'M'+points_string.replace(/, /g, ',').replace(/ $/, '').replace(/ /g, 'L')\n}\n\nexport {\n calc_vol,\n distance,\n calcScale,\n toD3,\n cleanedPoly,\n getCommonPoints,\n create_polygon,\n recreate_snapping_points,\n join2Polylines,\n innerProfileToPolygon,\n\tpolyPointsToPathData\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/calc_functions.js","/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = require(\"./utils.js\");\n\n // only used for outlines atm.\n var PolyBezier = require(\"./poly-bezier.js\");\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = require(\"./svg-to-beziers\");\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/bezier.js\n// module id = 31\n// module chunks = 0","(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = require(\"./bezier\");\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 36\n// module chunks = 0","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/es6-extensions.js\n// module id = 37\n// module chunks = 0","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/whatwg-fetch/fetch.js\n// module id = 38\n// module chunks = 0","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HashRouter } from 'react-router-dom'\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(, document.getElementById('root'));\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var k=require(\"object-assign\"),n=require(\"fbjs/lib/invariant\"),p=require(\"fbjs/lib/emptyObject\"),q=require(\"fbjs/lib/emptyFunction\"),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n basename: PropTypes.string,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default BrowserRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/BrowserRouter.js\n// module id = 49\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 50\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 51\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + createPath(location);\n };\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createBrowserHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createBrowserHistory.js\n// module id = 52\n// module chunks = 0","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/resolve-pathname/index.js\n// module id = 53\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/value-equal/index.js\n// module id = 54\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + createPath(location));\n };\n\n var push = function push(path, state) {\n warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createHashHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createHashHistory.js\n// module id = 55\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = createPath;\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createMemoryHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createMemoryHistory.js\n// module id = 56\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createHashHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n basename: PropTypes.string,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: PropTypes.node\n};\n\n\nexport default HashRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/HashRouter.js\n// module id = 57\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from \"react-router/es/MemoryRouter\";\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/MemoryRouter.js\n// module id = 58\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/MemoryRouter.js\n// module id = 59\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Route from \"./Route\";\nimport Link from \"./Link\";\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return React.createElement(Route, {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return React.createElement(Link, _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: Link.propTypes.to,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n location: PropTypes.object,\n activeClassName: PropTypes.string,\n className: PropTypes.string,\n activeStyle: PropTypes.object,\n style: PropTypes.object,\n isActive: PropTypes.func,\n \"aria-current\": PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\nexport default NavLink;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/NavLink.js\n// module id = 60\n// module chunks = 0","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/node_modules/isarray/index.js\n// module id = 61\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Prompt from \"react-router/es/Prompt\";\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Prompt.js\n// module id = 62\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n when: PropTypes.bool,\n message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n block: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Prompt.js\n// module id = 63\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Redirect from \"react-router/es/Redirect\";\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Redirect.js\n// module id = 64\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = createLocation(prevProps.to);\n var nextTo = createLocation(this.props.to);\n\n if (locationsAreEqual(prevTo, nextTo)) {\n warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return generatePath(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n computedMatch: PropTypes.object, // private, from \n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired\n }).isRequired,\n staticContext: PropTypes.object\n }).isRequired\n};\n\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Redirect.js\n// module id = 65\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport StaticRouter from \"react-router/es/StaticRouter\";\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/StaticRouter.js\n// module id = 66\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n invariant(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return React.createElement(Router, _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object.isRequired,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/StaticRouter.js\n// module id = 67\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Switch from \"react-router/es/Switch\";\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Switch.js\n// module id = 68\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n React.Children.forEach(children, function (element) {\n if (match == null && React.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n router: PropTypes.shape({\n route: PropTypes.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n};\n\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Switch.js\n// module id = 69\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport generatePath from \"react-router/es/generatePath\";\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/generatePath.js\n// module id = 70\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport matchPath from \"react-router/es/matchPath\";\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/matchPath.js\n// module id = 71\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport withRouter from \"react-router/es/withRouter\";\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/withRouter.js\n// module id = 72\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: PropTypes.func\n };\n\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/withRouter.js\n// module id = 73\n// module chunks = 0","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\n// module id = 74\n// module chunks = 0","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport { Route, Switch, Link} from 'react-router-dom'\nimport Draw from './Draw'\n\nclass App extends Component {\n\n render() {\n return (\n
\n
\n

\n VMT Vessel Measuring Tool\n

\n\n About\n
\n\n \n\n \n\n {/* This switch handle 404 pages */}\n \n \n \n \n \n\n
\n );\n }\n}\n\nclass About extends Component{\n render(){\n return (\n
\n

About

\n

What is this?

\n

This is a simple webapp written in javascript using ReactJs Framework.\n It can be used to digitize archeological drawings of vessels in order to calculate their capacity and weight.\n

\n

How does it work?

\n

You can watch this youtube video that show how to use this app. If you have problems you can contact me or open an issue on github.

\n

\n

\n

Saving

\n

After you have digitized your drawing you can download your file in three differents formats:

\n
\n\n

Source code

\n

This is an open source project you can find the source code at this link\n on Github.\n You can download and use this webapp even without an internet connection, after you've downloded the source code\n you can open the index.html file in the build folder with any modern browser and start measuring\n your vessels.\n

\n\n

Alternatives

\n

\n There are many other projects that calculate vessel capacity, it this projects doesn't work for you you should\n check them out. You can find a list at\n this link.\n

\n\n

Limitations

\n

\n Although this webapp displays nicely on different devices, drawing capacity is currently available only using a mouse.\n

\n\n

Dependencies

\n

This app has been built using these javascript libraries:

\n \n

Back to main page

\n
\n )\n }\n}\n\nclass NoMatch extends Component{\n render(){\n return (\n
\n

404 - Not found

\n

Page not found

\n\n

Back to main page

\n
\n )\n }\n}\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.js","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport Polyline from './svg_classes/Polyline'\nimport Point from './svg_classes/Point'\nimport ListPoly from './components/listPoly'\nimport Notification from './components/Notification'\nimport Steps from './components/Steps'\nimport Measures from './components/Measures'\nimport { calc_vol, calcScale, join2Polylines, innerProfileToPolygon,\n create_polygon, recreate_snapping_points } from './calc_functions'\nconst svgPanZoom = require('svg-pan-zoom')\nconst download = require(\"downloadjs\")\n\nclass Draw extends Component {\n constructor(props){\n super(props)\n this.breakLine = this.breakLine.bind(this)\n this.exitBreakLineMode = this.exitBreakLineMode.bind(this)\n this.addRotAxis = this.addRotAxis.bind(this)\n this.addMetric = this.addMetric.bind(this)\n this.addMaxFill = this.addMaxFill.bind(this)\n this.resizeSvg = this.resizeSvg.bind(this)\n this.unselect_polyline = this.unselect_polyline.bind(this)\n }\n state = {\n polylines: [],\n active_polyline: undefined,\n selectedFile: '',\n img_w: 1000,\n img_h: 1000,\n notification:{id:-1,message:''},\n toDo:{image:false, rotAxis:false, metric:false,\n int_prof:false, out_prof:false, ref_unit:false, maxFill:false}\n }\n id = 0\n not_id = 0\n\n componentDidMount(){\n //init canvas\n this.canvas = document.getElementById('canvas')\n //initialize x,y needed to calculate svg coordinate in get_point()\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point = new Point([0,0], this.canvas, this.x, this.y, 1, true)\n window.addEventListener('resize', this.resizeSvg)\n\n //global vars\n window.snapping_points = []\n window.zoom = 1\n window.r_axis = null\n window.addEventListener('keyup', this.unselect_polyline)\n\n //init zoom canvas\n this.panZoomTiger = svgPanZoom('#drawing-canvas', {\n dblClickZoomEnabled: false,\n panEnabled: true,\n zoomScaleSensitivity: 0.8,\n maxZoom: 50,\n minZoom: 0.1,\n\n onZoom: function(e){\n window.zoom = e\n this.state.polylines.forEach(function(poly){\n poly.zoom = e\n poly.setSize( e )\n\n poly.points.forEach(function(point){\n point.setSize( e )\n })\n poly.midpoints.forEach(function(point){\n point.setSize( e )\n })\n })\n if(this.metric){\n this.metric.zoom = e\n this.metric.setSize( e )\n }\n if(this.rotAxis){\n this.rotAxis.zoom = e\n this.rotAxis.setSize( e )\n }\n if(this.maxFill){\n this.maxFill.zoom = e\n this.maxFill.setSize( e )\n }\n this.new_point.zoom = e\n this.new_point.setSize( e )\n }.bind(this)\n });\n }\n\n componentWillUnmount(){\n window.removeEventListener('resize', this.resizeSvg)\n window.removeEventListener('keyup', this.unselect_polyline)\n }\n\n resizeSvg(){\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point.x = this.x\n this.new_point.y = this.y\n this.state.polylines.forEach(function(el){\n el.y = this.y\n el.x = this.x\n }.bind(this))\n if(this.state.active_polyline){\n let a_p = this.state.active_polyline\n a_p.x = this.x\n a_p.y = this.y\n this.setState({active_polyline:a_p})\n this.state.active_polyline.points.forEach(function(p){\n p.x = this.x\n p.y = this.y\n }.bind(this))\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // CREATE, SELECT, DESELECT POLYLINE //\n //////////////////////////////////////////////////////////////////////////////\n\n create_new_polyline(type = \"other\"){\n this.globalStopEditingMode()\n\n this.addCursorPoint()\n const new_polylines = this.state.polylines\n const polyline = new Polyline({\n points: [],\n id: this.id,\n type: type,\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n new_polylines.push( polyline )\n this.id++\n this.setState(\n { polylines: new_polylines,\n active_polyline: polyline\n }\n )\n }\n\n selectLayer(id){\n if(this.state.active_polyline){\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code:\"Escape\"})\n }\n }\n this.setState({active_polyline: this.getPolylineById(id)},\n ()=> {\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n });\n this.state.active_polyline.el.classList.toggle('active')\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // UTILITIES //\n //////////////////////////////////////////////////////////////////////////////\n\n unselect_polyline(e){\n console.log(e.code)\n if( e.code === 'Escape' || e.code === 'KeyQ'){\n if(this.state.active_polyline){\n this.state.active_polyline.el.classList.remove('active')\n this.state.active_polyline.stopEditing({'code':'Escape'})\n if(this.state.active_polyline.editing){\n this.state.active_polyline.stopEditingPoints({'code':'Escape'})\n }\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code: 'Escape'})\n }\n }\n this.setState({active_polyline:undefined})\n recreate_snapping_points(this.state.polylines)\n\n this.checkProfile('int_prof')\n this.checkProfile('out_prof')\n if(this.new_point.added){\n this.removeCursorPoint()\n }\n //remove 0 or 1 vertex polyline\n this.state.polylines.forEach(function(polyline){\n if(polyline.points.length < 2){\n this.setState({polylines: this.state.polylines.filter(el => el.id !== polyline.id)})\n this.canvas.removeChild(polyline.el)\n }\n }.bind(this))\n }\n }\n\n globalStopEditingMode(){\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n })\n if(this.state.active_polyline){\n this.state.active_polyline.stopEditing({'code':'Escape'})\n }\n }\n\n addNotification(message){\n this.setState({notification:{ id:this.not_id, message: message }})\n this.not_id++\n }\n\n getPolylineById(id){\n return this.state.polylines.filter(el => el.id === id)[0]\n }\n\n addCursorPoint(){\n this.canvas.appendChild(this.new_point.el)\n this.new_point.added = true\n this.new_point.select()\n }\n\n removeCursorPoint(){\n this.canvas.removeChild(this.new_point.el)\n this.new_point.added = false\n }\n\n updateToDo(type, value){\n let toDo = this.state.toDo\n toDo[type] = value\n this.setState({toDo})\n }\n\n checkProfile(type){\n const poly1 = this.state.polylines.filter(el => el.type===type)\n if(poly1.length===0){\n this.updateToDo(type, false)\n if(type==='int_prof'){\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n this.inner_poly = null\n this.setState({vessel_capacity:null})\n }\n }\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n this.vessel_poly = null\n this.setState({vessel_volume:null})\n }\n }\n else if(poly1.length===1){\n this.updateToDo(type, true)\n }\n else{\n this.updateToDo(type, false)\n let profile = type === 'int_prof' ? 'internal profile' : 'outer profile'\n this.addNotification(`There should be only one ${profile}`)\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // JOIN POLYLINES //\n //////////////////////////////////////////////////////////////////////////////\n\n joinIntExt(){\n const poly1 = this.state.polylines.filter(el => el.type==='int_prof')[0]\n const poly2 = this.state.polylines.filter(el => el.type==='out_prof')[0]\n if(!poly1 || !poly2){\n this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\")\n return\n }\n this.vesselVolume = join2Polylines(poly1, poly2)\n if(!this.vesselVolume){\n this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\")\n return\n }\n\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n }\n this.vessel_poly = create_polygon(this.vesselVolume, 'rgba(170, 170, 170, 0.6)')\n const volume = calc_vol(this.vesselVolume, this.scale)\n this.setState({vessel_volume:volume})\n this.canvas.appendChild(this.vessel_poly)\n }\n\n create_inner_polygon(){\n let poly = this.state.polylines.filter(el => el.type==='int_prof')\n if(poly.length===0){\n this.addNotification(\"To calculate vessel capacity you need an internal profile\")\n return\n }\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n }\n //define inner polygon points based on inner profile and rotation axis\n this.innerPolygon = innerProfileToPolygon(poly[0].points.slice())\n //create svg polygon\n this.inner_poly = create_polygon(this.innerPolygon, 'rgba(210, 204, 78, 0.28)')\n\n if(this.scale){\n const volume = calc_vol(this.innerPolygon, this.scale)\n this.setState({vessel_capacity:volume})\n }else{\n this.addNotification('Can\\'t measure, define scale first')\n }\n this.canvas.appendChild(this.inner_poly)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // ADD REFERENCE SCALE rotation axis AND MAX FILL //\n //////////////////////////////////////////////////////////////////////////////\n\n metricForm(obj){\n if(obj.ref_unit){\n this.updateToDo('ref_unit', true)\n this.setState({metric_value:obj.value, metric_unit: obj.unit}, () => {\n if(this.metric && this.metric.points.length===2){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n }\n })\n }else{\n this.updateToDo('ref_unit', false)\n this.scale = null\n }\n }\n\n defineMaxFill(){\n //remove maxFill if present\n if(this.maxFill){\n this.canvas.removeChild(this.maxFill.el)\n this.updateToDo('maxFill', false)\n }\n //create new maxFill polyline\n this.maxFill = new Polyline({\n points: [],\n id: 'max_fill',\n type: 'max_fill',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({code:'Escape'})\n }\n\n addMaxFill(e){\n this.maxFill.stroke = 'rgb(0, 255, 21)'\n this.maxFill.add_point(e)\n this.canvas.appendChild(this.maxFill.el)\n this.maxFill.draw()\n //exit editing mode\n this.maxFill.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.maxFill = this.maxFill.points[0].cy\n this.updateToDo('maxFill', true)\n }\n\n defineMetric(){\n this.unselect_polyline({code:\"Escape\"})\n //remove metric if present\n if(this.metric){\n this.canvas.removeChild(this.metric.el)\n this.updateToDo('metric', false)\n }\n //create new metric polyline\n this.metric = new Polyline({\n points: [],\n id: 'metric',\n type: 'metric',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMetric)\n this.metric.stopEditing({code:'Escape'})\n }\n\n addMetric(e){\n if(this.metric.points.length === 0){\n this.metric.add_point(e)\n }\n else if(this.metric.points.length === 1){\n //this is the 2nd point, add it and exit editing\n this.metric.add_point(e)\n this.metric.stroke = 'red'\n this.metric.stopEditing({code:\"Escape\"})\n //set color\n this.metric.el.classList.remove('active')\n //stop editing\n this.canvas.removeEventListener('dblclick', this.addMetric)\n this.updateToDo('metric', true)\n this.removeCursorPoint()\n if(this.state.metric_value && this.state.metric_unit){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n }\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n\n }\n }\n\n definerotAxis(){\n //remove if already present\n if(this.rotAxis){\n this.canvas.removeChild(this.rotAxis.el)\n window.r_axis = null\n this.updateToDo('rotAxis', false)\n }\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addRotAxis)\n }\n\n addRotAxis(e){\n //create rotation axis polyline\n this.rotAxis = new Polyline({\n points: [],\n id: this.id,\n type: 'center',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n this.rotAxis.stroke = '#ff5a00'\n this.rotAxis.add_point(e)\n this.canvas.appendChild(this.rotAxis.el)\n this.rotAxis.draw()\n //exit editing mode\n this.rotAxis.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addRotAxis)\n this.rotAxis.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.r_axis = this.rotAxis.points[0].cx\n this.updateToDo('rotAxis', true)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER EDITING //\n //////////////////////////////////////////////////////////////////////////////\n\n colorChange(id, color){\n const my_polyline = this.getPolylineById(id)\n my_polyline.stroke = color\n my_polyline.draw()\n }\n\n typeChange(id, type){\n this.setState(\n {polylines: this.state.polylines.map(el =>\n {\n if(el.id===id){\n el.type = type\n return el\n }\n return el\n })\n }, ()=> { this.checkProfile('int_prof'); this.checkProfile('out_prof') }\n )\n }\n\n delete_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.canvas.removeChild(this.state.active_polyline.el)\n this.setState({\n polylines:this.state.polylines.filter(\n el => el.id !== this.state.active_polyline.id),\n active_polyline: undefined\n }, ()=> {\n this.checkProfile('int_prof');\n this.checkProfile('out_prof');\n recreate_snapping_points(this.state.polylines)\n }\n )\n }\n\n edit_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.state.active_polyline.editLine()\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER BREAKING //\n //////////////////////////////////////////////////////////////////////////////\n\n enterBreakLineMode(){\n this.globalStopEditingMode()\n //check if breaking selected line is possible\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n if(this.state.active_polyline.points.length <= 2){\n this.addNotification(\"Line has two or less vertices and can't be subdivided\")\n return\n }\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = true\n this.setState({active_polyline})\n //add breaking points to canvas\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!==this.state.active_polyline.points.length-1){\n this.canvas.appendChild(point.el)\n point.draw()\n point.el.addEventListener('click', this.breakLine)\n }\n x++\n }.bind(this))\n }\n\n exitBreakLineMode(e){\n //remove breaking points from canvas\n if ((e.code === 'Escape' || e.code === 'KeyQ') && this.state.active_polyline.breaking_mode) {\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!== this.state.active_polyline.points.length-1){\n point.el.removeEventListener('click', this.breakLine)\n this.canvas.removeChild(point.el)\n }\n x++\n }.bind(this))\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = false\n this.setState({active_polyline})\n }\n }\n\n breakLine(e){\n const break_point = [e.target.getAttribute('cx'), e.target.getAttribute('cy')]\n this.exitBreakLineMode({code: 'Escape'})\n //instantiate polyline list to edit\n const new_polylines = this.state.polylines\n //create a new polyline\n let polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n }\n )\n //loop over the polyine to break and add point to new polyline until you get to the breaking point\n this.state.active_polyline.points.forEach(function(point) {\n polyline.appendPoint([point.cx, point.cy])\n if(point.cx===parseFloat(break_point[0]) && point.cy===parseFloat(break_point[1])){\n //save draw and exit editing mode\n polyline.el.classList.remove('active')\n new_polylines.push( polyline )\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //create a new polyline with starting point the breaking point\n polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n polyline.appendPoint([point.cx, point.cy])\n }\n }.bind(this))\n //save draw and exit editing mode for sencond line\n new_polylines.push(polyline)\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //delete orignal broken line and exit editing mode\n this.state.active_polyline.stopEditing({'code':'Escape'})\n this.canvas.removeChild(this.state.active_polyline.el)\n //update the state with the two new lines without the old one\n this.setState(\n { polylines: new_polylines.filter(el=>el.id!==this.state.active_polyline.id),\n active_polyline: polyline\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // HANDLE IMAGE //\n //////////////////////////////////////////////////////////////////////////////\n\n image_rotate(e){\n this.bck_image.style.transform = `rotate(${e.target.value}deg)`\n }\n\n fileChangedHandler(e){\n let img_name = e.target.value.split(\"\\\\\")\n img_name = img_name[img_name.length-1]\n this.setState({img_name})\n var img = new Image();\n img.src = window.URL.createObjectURL( e.target.files[0] );\n img.onload = function() {\n var width = img.naturalWidth\n var height = img.naturalHeight\n let toDo = this.state.toDo\n toDo.image = true\n this.setState({\n img_w:width,\n img_h:height,\n selectedFile: img.src,\n toDo: toDo\n })\n }.bind(this)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // DOWNLOAD //\n //////////////////////////////////////////////////////////////////////////////\n\n download_svg(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n let saved_path = this.state.selectedFile\n if(this.state.img_name){\n this.setState({selectedFile:this.state.img_name.replace('href':'xlink:href')}, ()=> {\n download(this.svg.outerHTML, \"dlText.svg\", \"text/plain\");\n this.setState({selectedFile:saved_path})\n })\n }else{\n download(this.svg.outerHTML, \"myVessel.svg\", \"text/plain\");\n }\n }\n\n download_dxf(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n var makerjs = require('makerjs');\n let models = {models:{}}\n let x = 1\n this.state.polylines.forEach(function(polyline){\n let points = polyline.el.getAttribute('points');\n let closed = false; //true for SVG polygon, false for SVG polyline\n let model = makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed, points), false, true);\n model = makerjs.model.scale(model, this.scale/10)\n models.models[`my-${x}-line`] = model\n x++\n }.bind(this))\n models.units = makerjs.units.Meter;\n let file = makerjs.exporter.toDXF(models, {units:makerjs.unitType.Meter})\n download(file, \"myVessel.dxf\", \"text/plain\");\n }\n\n download_json(){\n let title = 'myVessel'\n let coordinates, author, description = ''\n\n let int_prof = this.state.polylines.filter(el=>el.type==='int_prof')\n if(int_prof.length > 0){\n int_prof = int_prof[0]\n }else{\n this.addNotification('No inner profile to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n coordinates = []\n int_prof.points.forEach(function(point){\n // scale the point - unit will be dm - convert to cm - invert y axis\n coordinates.push( [point.cx*this.scale/10, point.cy*this.scale/10*-1] )\n }.bind(this))\n coordinates = JSON.stringify(coordinates)\n let json = `{ \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": ${coordinates}\n },\n \"properties\": {\n \"title\": \"${title}\",\n \"description\": \"${description}\",\n \"author\": \"${author}\"\n }\n }`\n this.addNotification('Export completed')\n download(json, `${title}.json`, \"text/plain\");\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // RENDER //\n //////////////////////////////////////////////////////////////////////////////\n\n render() {\n return (\n
\n\n \n\n

Draw

\n
\n {this.svg = svg}}>\n \n {this.bck_image=bck_image}}\n id=\"bck-img\" href={this.state.selectedFile} x=\"0\" y=\"0\"\n height={this.state.img_h} width={this.state.img_w}/>\n \n \n
\n
Actions:
\n \n New\n
\n \n Break\n
\n \n Delete\n \n \n Edit\n \n\n
Export:
\n \n SVG\n \n \n DXF\n \n \n JSON\n \n \n \n\n
\n
Layers:
\n {this.state.toDo.image &&
\n
\n \n \n
\n
}\n {this.state.polylines.map(el =>\n \n )}\n
\n
\n Double-left-click to draw a point, single left-click and hold to pan the view,\n single left-click to select vertices (in edit and break mode),\n mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line.\n Press Esc or q to quit editing mode and deselect.\n
\n \n\n \n\n \n );\n }\n }\n\n export default Draw;\n\n //get point coordinates from event\n //get_point(e){\n // const matrix = this.canvas.transform.baseVal[0].matrix\n // const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n // return newPoint\n //}\n //\n //\n //\n //joinTwoPolylines(poly1, poly2){\n // const new_poly = join2Polylines(poly1, poly2)\n //\n // if(!new_poly){\n // this.addNotification(\"Not joinable\")\n // return\n // }\n // return joined_poly\n //\n // //const joined_poly = new Polyline({\n // // points: cleanedPoly(new_poly),\n // // id: this.id,\n // // type: poly1.type,\n // // selected: true,\n // // canvas: this.canvas,\n // // offsetX: this.x,\n // // offsetY: this.y,\n // // currentZoom: this.panZoomTiger.getZoom()\n // //})\n // //joined_poly.stopEditing({code:'Escape'})\n // //this.canvas.removeChild(joined_poly.el)\n // //this.id++\n //\n // //this.canvas.removeChild(poly1.el)\n // //this.canvas.removeChild(poly2.el)\n // //this.canvas.appendChild(joined_poly.el)\n // //joined_poly.draw()\n ////\n // //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n // //new_polylines.push(joined_poly)\n // //this.addNotification(message)\n // //this.setState(\n // // { polylines: new_polylines,\n // // notification:{ id:this.not_id, message: message },\n // // active_polyline: joined_poly\n // // }\n // //)\n // //this.not_id++\n //}\n //joinTwoLines(){\n // //TODO\n // this.addNotification(\"Select first line\")\n //}\n //\n // Join 2 lines\n //\n\n\n\n// WEBPACK FOOTER //\n// ./src/Draw.js","import Point from './Point'\nimport MidPoint from './MidPoint'\nimport {cleanedPoly} from './../calc_functions'\n\nexport default class Poly {\n\n constructor(obj) {\n this.points = obj.points\n this.fill = 'none'\n this.stroke = 'magenta'\n this.base_size = 5\n this.id = obj.id\n this.type = obj.type\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n this.el.classList.add('active')\n this.canvas = obj.canvas\n\n this.x = obj.offsetX\n this.y = obj.offsetY\n\n this.zoom = obj.currentZoom\n this.setSize(this.zoom)\n\n this.canvas.appendChild(this.el)\n\n this.draw = this.draw.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.stopEditingPoints = this.stopEditingPoints.bind(this)\n this.get_point = this.get_point.bind(this)\n this.previewPoint = this.previewPoint.bind(this)\n this.create = this.create.bind(this)\n this.add_point = this.add_point.bind(this)\n\n this.canvas.addEventListener('dblclick', this.add_point)\n\n this.editing = false\n this.breaking_mode = false\n\n this.midpoints = []\n }\n\n setSize(zoom){\n this.strokeWidth = this.base_size/zoom\n this.draw()\n }\n draw() {\n this.el.setAttribute('points', this.pointsTo())\n this.el.id = this.id\n this.el.style.fill = this.fill\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n if (this.editing) {\n this.draw_midpoints()\n }\n }\n\n draw_midpoints() {\n //remove from canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n //recreate midpoints\n let index = 0\n this.points.forEach(function(point) {\n if (index > 0 && this.points.length > index) {\n if(point.cx !== this.points[index - 1].cx && point.cy !== this.points[index - 1].cy){\n const midpoint = new MidPoint(\n [ (point.cx + this.points[index - 1].cx) / 2,\n (point.cy + this.points[index - 1].cy) / 2 ],\n index, this.zoom)\n this.midpoints.push(midpoint)\n }\n }\n index++\n }.bind(this))\n //add midpoints to canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.appendChild(midpoint.el)\n midpoint.draw()\n midpoint.el.addEventListener('click', this.create)\n }.bind(this))\n }\n\n create(e) {\n const index = e.target.getAttribute('index')\n const new_point = new Point( [parseFloat(e.target.getAttribute('cx')), parseFloat(e.target.getAttribute('cy'))],\n this.canvas, this.x, this.y, this.zoom\n )\n this.addPointInMiddle(index, new_point)\n }\n\n addPointInMiddle(index, new_point) {\n this.points.splice(index, 0, new_point)\n this.canvas.appendChild(new_point.el)\n new_point.draw()\n new_point.edit()\n new_point.select()\n this.draw()\n }\n\n pointsTo() {\n let str = ''\n this.points.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n return str\n }\n\n //add point\n add_point(e){\n let new_point = this.get_point(e)\n if(this.type==='max_fill'){\n let point = [-1000000, new_point[1]]\n this.appendPoint(point)\n point = [1000000, new_point[1]]\n this.appendPoint(point)\n return\n }\n if(this.type==='center'){\n let point = [new_point[0], -1000000]\n this.appendPoint(point)\n point = [new_point[0], 1000000]\n this.appendPoint(point)\n return\n }\n\n this.appendPoint(new_point)\n }\n\n appendPoint(array) {\n window.snapping_points.push([array[0], array[1]])\n const point = new Point([array[0], array[1]], this.canvas, this.x, this.y, this.zoom)\n this.points.push(point)\n this.draw()\n if (this.points.length === 1) {\n window.addEventListener('mousemove', this.previewPoint)\n window.addEventListener('keyup', this.stopEditing)\n }\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n\n }\n\n previewPoint(e) {\n const new_point = this.get_point(e)\n this.points.push(new Point([new_point[0], new_point[1]], this.canvas, this.x, this.y, this.zoom))\n this.draw()\n this.removeLastPoint()\n }\n\n editLine() {\n this.editing = true\n window.addEventListener('keyup', this.stopEditingPoints)\n this.points.forEach(function(point) {\n point.x = this.x\n point.y = this.y\n this.canvas.appendChild(point.el)\n point.draw()\n point.edit()\n }.bind(this))\n this.draw_midpoints()\n window.addEventListener('mousemove', this.draw)\n }\n\n stopEditingPoints(e) {\n this.editing = false\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n window.removeEventListener('mousemove', this.draw)\n }\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n this.points.forEach(function(point) {\n this.canvas.removeChild(point.el)\n point.clear()\n }.bind(this))\n this.points = cleanedPoly(this.points)\n this.draw()\n window.removeEventListener('keyup', this.stopEditingPoints)\n }\n\n removeLastPoint() {\n this.points.pop()\n }\n\n stopEditing(e) {\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n this.canvas.removeEventListener('dblclick', this.add_point)\n window.removeEventListener('mousemove', this.previewPoint)\n window.removeEventListener('keyup', this.stopEditing)\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Polyline.js","export default class MidPoint {\n\n constructor(points, index, zoom) {\n this.cx = points[0]\n this.cy = points[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n this.strokeWidth = '2'\n this.index = index\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n this.zoom = zoom\n\n this.base_size = 17\n this.size = this.base_size / zoom\n this.base_stroke = 5\n this.strokeWidth = this.base_stroke / zoom\n\n }\n\n setSize(zoom) {\n this.zoom = zoom\n this.strokeWidth = this.base_stroke / zoom\n this.size = this.base_size / zoom\n this.draw()\n }\n\n draw() {\n this.el.setAttribute('x', this.cx - (this.size/2))\n this.el.setAttribute('y', this.cy - (this.size/2))\n this.el.setAttribute('cx', this.cx)\n this.el.setAttribute('cy', this.cy)\n this.el.setAttribute('height', this.size)\n this.el.setAttribute('width', this.size)\n this.el.setAttribute('index', this.index)\n this.el.style.fill = this.fill\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.stroke = this.stroke\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/MidPoint.js","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/area.js\n// module id = 81\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/centroid.js\n// module id = 82\n// module chunks = 0","import cross from \"./cross\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/hull.js\n// module id = 83\n// module chunks = 0","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/cross.js\n// module id = 84\n// module chunks = 0","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/contains.js\n// module id = 85\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/length.js\n// module id = 86\n// module chunks = 0","import React, { Component } from 'react';\n\nexport default class ListPoly extends Component {\n state = {\n types : [\n {val: 'other', text: 'Other'},\n {val: 'int_prof', text: 'Inner profile'},\n {val: 'out_prof', text: 'Outer profile'},\n {val: 'handle', text: 'Handle'},\n ],\n colors : [\n {val: 'magenta', text: 'Magenta'},\n {val: '#1d47ff', text: 'Blue'},\n {val: '#ff3b30', text: 'Red'},\n {val: '#4bea4b', text: 'Green'},\n {val: 'black', text: 'Black'},\n {val: 'white', text: 'White'},\n ]\n }\n\n colorChange(e){\n this.props.colorChange(this.props.id, e.target.value)\n this.color.value = e.target.value\n }\n\n typeChange(e){\n this.props.typeChange(this.props.id, e.target.value)\n this.type.value = e.target.value\n }\n\n render(){\n return (\n this.props.selectLayer(this.props.id)}\n >\n
\n \n
\n
\n \n
\n
\n \n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/listPoly.js","import React, { Component } from 'react';\n\nexport default class Notification extends Component {\n state = {\n id: -1\n }\n componentWillReceiveProps(nextProps){\n if(nextProps.notification.id!==this.state.id){\n this.setState({id:nextProps.notification.id})\n this.notification.innerHTML = nextProps.notification.message\n this.notification.style.display = \"block\"\n setTimeout(()=>this.notification.style.display=\"none\", 1500)\n }\n }\n render(){\n return (\n
this.notification=notification}>
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Notification.js","import React, { Component } from 'react';\n\nexport default class Steps extends Component {\n metricForm(){\n const value = this.ref_val.value\n const unit = this.reference_unit.value\n if(value&&unit){\n this.props.handleForm({ref_unit: true, value:value, unit:unit})\n }else{\n this.props.handleForm({ref_unit: false, value:value, unit:unit})\n }\n }\n\n render(){\n return (\n
\n

Steps:

\n
    \n
  • \n
    \n
    \n
    \n 1. Select image\n
    \n
    \n \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 2. Draw rotation axis\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 3. Draw reference scale\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 4. Define reference scale length\n
    \n
    \n {this.ref_val = ref_val}}>\n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 5. Draw inner profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 6. Draw outer profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 7- Draw max fill limit\n
    \n
    \n \n
    \n
  • \n
\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Steps.js","import React, { Component } from 'react';\n\nexport default class Measures extends Component {\n state = {\n vessel_weight: 0,\n total_weight: 0,\n\n vessel_volume: 0,\n vessel_unit: 1,\n vessel_specific_weight: 2,\n\n content_specific_weight: 1,\n content_volume: 0,\n }\n\n componentWillReceiveProps(nProp){\n this.setState({content_volume:nProp.content_volume, vessel_volume:nProp.vessel_volume}, () => this.vesselWeightCalc())\n }\n\n vesselWeightCalc(){\n this.setState({ vessel_weight: this.state.vessel_unit * this.state.vessel_specific_weight * this.state.vessel_volume}, () => {\n this.contentWeightCalc()\n })\n }\n\n contentWeightCalc(){\n this.setState(\n { total_weight: this.state.vessel_weight + (this.state.content_volume * this.state.content_specific_weight)}\n )\n }\n\n contentWeightSetter(e){\n this.setState({content_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselUnitSetter(e){\n this.setState({vessel_unit:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselSpecWeightSetter(e){\n this.setState({vessel_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n render(){\n return (\n
\n

Measures:

\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n

Volume

\n }\n
\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n
\n \n Calculate capacity\n
\n\n { this.props.content_volume &&\n
\n Volume: {this.props.content_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n
\n }\n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n
\n \n Calculate vessel volume\n
\n\n { this.props.vessel_volume &&\n
\n Volume: {this.props.vessel_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n \n }\n \n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n this.props.vessel_volume && this.props.content_volume &&\n
\n

Weight

\n
\n

Insert specfic weight of vessel's material to calculate vessel weight:

\n \n \n
Vessel weight:\n {this.state.vessel_weight.toFixed(2)}\n Kg\n
\n
\n
\n

Insert type of content to calculate full weight:

\n \n
Full weight:\n {this.state.total_weight.toFixed(2)}\n Kg\n
\n
\n\n
\n }\n { (!this.props.toDo.int_prof || !this.props.toDo.ref_unit\n || !this.props.toDo.metric) &&\n
\n

No calculations available, follow the steps listed on the left

\n
\n }\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Measures.js","var SvgPanZoom = require('./svg-pan-zoom.js');\n\nmodule.exports = SvgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/browserify.js\n// module id = 91\n// module chunks = 0","var Wheel = require('./uniwheel')\n, ControlIcons = require('./control-icons')\n, Utils = require('./utilities')\n, SvgUtils = require('./svg-utilities')\n, ShadowViewport = require('./shadow-viewport')\n\nvar SvgPanZoom = function(svg, options) {\n this.init(svg, options)\n}\n\nvar optionsDefaults = {\n viewportSelector: '.svg-pan-zoom_viewport' // Viewport selector. Can be querySelector string or SVGElement\n, panEnabled: true // enable or disable panning (default enabled)\n, controlIconsEnabled: false // insert icons to give user an option in addition to mouse events to control pan/zoom (default disabled)\n, zoomEnabled: true // enable or disable zooming (default enabled)\n, dblClickZoomEnabled: true // enable or disable zooming by double clicking (default enabled)\n, mouseWheelZoomEnabled: true // enable or disable zooming by mouse wheel (default enabled)\n, preventMouseEventsDefault: true // enable or disable preventDefault for mouse events\n, zoomScaleSensitivity: 0.1 // Zoom sensitivity\n, minZoom: 0.5 // Minimum Zoom level\n, maxZoom: 10 // Maximum Zoom level\n, fit: true // enable or disable viewport fit in SVG (default true)\n, contain: false // enable or disable viewport contain the svg (default false)\n, center: true // enable or disable viewport centering in SVG (default true)\n, refreshRate: 'auto' // Maximum number of frames per second (altering SVG's viewport)\n, beforeZoom: null\n, onZoom: null\n, beforePan: null\n, onPan: null\n, customEventsHandler: null\n, eventsListenerElement: null\n, onUpdatedCTM: null\n}\n\nSvgPanZoom.prototype.init = function(svg, options) {\n var that = this\n\n this.svg = svg\n this.defs = svg.querySelector('defs')\n\n // Add default attributes to SVG\n SvgUtils.setupSvgAttributes(this.svg)\n\n // Set options\n this.options = Utils.extend(Utils.extend({}, optionsDefaults), options)\n\n // Set default state\n this.state = 'none'\n\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Init shadow viewport\n this.viewport = ShadowViewport(SvgUtils.getOrCreateViewport(this.svg, this.options.viewportSelector), {\n svg: this.svg\n , width: this.width\n , height: this.height\n , fit: this.options.fit\n , contain: this.options.contain\n , center: this.options.center\n , refreshRate: this.options.refreshRate\n // Put callbacks into functions as they can change through time\n , beforeZoom: function(oldScale, newScale) {\n if (that.viewport && that.options.beforeZoom) {return that.options.beforeZoom(oldScale, newScale)}\n }\n , onZoom: function(scale) {\n if (that.viewport && that.options.onZoom) {return that.options.onZoom(scale)}\n }\n , beforePan: function(oldPoint, newPoint) {\n if (that.viewport && that.options.beforePan) {return that.options.beforePan(oldPoint, newPoint)}\n }\n , onPan: function(point) {\n if (that.viewport && that.options.onPan) {return that.options.onPan(point)}\n }\n , onUpdatedCTM: function(ctm) {\n if (that.viewport && that.options.onUpdatedCTM) {return that.options.onUpdatedCTM(ctm)}\n }\n })\n\n // Wrap callbacks into public API context\n var publicInstance = this.getPublicInstance()\n publicInstance.setBeforeZoom(this.options.beforeZoom)\n publicInstance.setOnZoom(this.options.onZoom)\n publicInstance.setBeforePan(this.options.beforePan)\n publicInstance.setOnPan(this.options.onPan)\n publicInstance.setOnUpdatedCTM(this.options.onUpdatedCTM)\n\n if (this.options.controlIconsEnabled) {\n ControlIcons.enable(this)\n }\n\n // Init events handlers\n this.lastMouseWheelEventTime = Date.now()\n this.setupHandlers()\n}\n\n/**\n * Register event handlers\n */\nSvgPanZoom.prototype.setupHandlers = function() {\n var that = this\n , prevEvt = null // use for touchstart event to detect double tap\n ;\n\n this.eventListeners = {\n // Mouse down group\n mousedown: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n , touchstart: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n\n // Mouse up group\n , mouseup: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchend: function(evt) {\n return that.handleMouseUp(evt);\n }\n\n // Mouse move group\n , mousemove: function(evt) {\n return that.handleMouseMove(evt);\n }\n , touchmove: function(evt) {\n return that.handleMouseMove(evt);\n }\n\n // Mouse leave group\n , mouseleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchcancel: function(evt) {\n return that.handleMouseUp(evt);\n }\n }\n\n // Init custom events handler if available\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.init({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n\n // Custom event handler may halt builtin listeners\n var haltEventListeners = this.options.customEventsHandler.haltEventListeners\n if (haltEventListeners && haltEventListeners.length) {\n for (var i = haltEventListeners.length - 1; i >= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-pan-zoom.js\n// module id = 92\n// module chunks = 0","// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/uniwheel.js\n// module id = 93\n// module chunks = 0","var SvgUtils = require('./svg-utilities');\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/control-icons.js\n// module id = 94\n// module chunks = 0","var SvgUtils = require('./svg-utilities')\n , Utils = require('./utilities')\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/shadow-viewport.js\n// module id = 95\n// module chunks = 0","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = require('clone');\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = require('kdbush');\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = require('graham_scan');\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = require('bezier-js');\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/makerjs/dist/index.js\n// module id = 97\n// module chunks = 0","var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/clone/clone.js\n// module id = 98\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buffer/index.js\n// module id = 99\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/base64-js/index.js\n// module id = 100\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ieee754/index.js\n// module id = 101\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/isarray/index.js\n// module id = 102\n// module chunks = 0","\nimport sort from './sort';\nimport range from './range';\nimport within from './within';\n\nexport default function kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/index.js\n// module id = 103\n// module chunks = 0","\nexport default function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/sort.js\n// module id = 104\n// module chunks = 0","\nexport default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/range.js\n// module id = 105\n// module chunks = 0","\nexport default function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/within.js\n// module id = 106\n// module chunks = 0","/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==typeof define&&define.amd&&define(function(){return ConvexHullGrahamScan}),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/graham_scan/graham_scan.min.js\n// module id = 107\n// module chunks = 0","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 108\n// module chunks = 0","module.exports = require('./lib/bezier');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/index.js\n// module id = 109\n// module chunks = 0","(function() {\n \"use strict\";\n\n var utils = require(\"./utils.js\");\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/poly-bezier.js\n// module id = 110\n// module chunks = 0","var normalise = require(\"./normalise-svg.js\");\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/svg-to-beziers.js\n// module id = 111\n// module chunks = 0","/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/normalise-svg.js\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/static/js/main.b7eb699e.js b/docs/static/js/main.b7eb699e.js new file mode 100644 index 0000000..ba0e4b8 --- /dev/null +++ b/docs/static/js/main.b7eb699e.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/Vessel-Measuring-Tool/",t(t.s=33)}([function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){e.exports=n(50)()},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(52);n.d(t,"a",function(){return r.a});var i=n(55);n.d(t,"b",function(){return i.a});var o=n(56);n.d(t,"d",function(){return o.a});var a=n(7);n.d(t,"c",function(){return a.a}),n.d(t,"f",function(){return a.b});var s=n(5);n.d(t,"e",function(){return s.b})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return u});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},i=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return o(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},l=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},u=function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l});var r=n(53),i=n(54),o=n(5),a=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?f.a.Children.only(e):null},t}(f.a.Component);v.propTypes={history:h.a.object.isRequired,children:h.a.node},v.contextTypes={router:h.a.object},v.childContextTypes={router:h.a.object.isRequired},t.a=v},function(e,t,n){"use strict";var r=n(25),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];var s=[],l=i()(e,s,t),u={re:l,keys:s};return a<1e4&&(r[e]=u,a++),u},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"===typeof t&&(t={path:t});var r=t,i=r.path,o=r.exact,a=void 0!==o&&o,l=r.strict,u=void 0!==l&&l,c=r.sensitive,f=void 0!==c&&c;if(null==i)return n;var p=s(i,{end:a,strict:u,sensitive:f}),h=p.re,d=p.keys,v=h.exec(e);if(!v)return null;var m=v[0],y=v.slice(1),g=e===m;return a&&!g?null:{path:i,url:"/"===i&&""===m?"/":m,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=y[n],e},{})}};t.a=l},function(e,t,n){var r=n(14),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(e){if(e.clientWidth&&e.clientHeight)return{width:e.clientWidth,height:e.clientHeight};if(e.getBoundingClientRect())return e.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(e,t){var n=null;if(!(n=r.isElement(t)?t:e.querySelector(t))){var i=Array.prototype.slice.call(e.childNodes||e.children).filter(function(e){return"defs"!==e.nodeName&&"#text"!==e.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(n=i[0])}if(!n){var o="viewport-"+(new Date).toISOString().replace(/\D/g,"");n=document.createElementNS(this.svgNS,"g"),n.setAttribute("id",o);var a=e.childNodes||e.children;if(a&&a.length>0)for(var s=a.length;s>0;s--)"defs"!==a[a.length-s].nodeName&&n.appendChild(a[a.length-s]);e.appendChild(n)}var l=[];return n.getAttribute("class")&&(l=n.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),n.setAttribute("class",l.join(" "))),n},setupSvgAttributes:function(e){if(e.setAttribute("xmlns",this.svgNS),e.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),e.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==e.parentNode){var t=e.getAttribute("style")||"";-1===t.toLowerCase().indexOf("overflow")&&e.setAttribute("style","overflow: hidden; "+t)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:r.throttle(function(){for(var e=document.querySelectorAll("defs"),t=e.length,n=0;nt?(clearTimeout(s),s=null,l=c,o=e.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(u,f)),o}},createRequestAnimationFrame:function(e){var t=null;return"auto"!==e&&e<60&&e>1&&(t=Math.floor(1e3/e)),null===t?window.requestAnimationFrame||n(33):n(t)}}},function(e,t,n){"use strict";function r(){}function i(e){try{return e.then}catch(e){return y=e,g}}function o(e,t){try{return e(t)}catch(e){return y=e,g}}function a(e,t,n){try{e(t,n)}catch(e){return y=e,g}}function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,e!==r&&v(e,this)}function l(e,t,n){return new e.constructor(function(i,o){var a=new s(r);a.then(i,o),u(e,new d(t,n,a))})}function u(e,t){for(;3===e._83;)e=e._18;if(s._47&&s._47(e),0===e._83)return 0===e._75?(e._75=1,void(e._38=t)):1===e._75?(e._75=2,void(e._38=[e._38,t])):void e._38.push(t);c(e,t)}function c(e,t){m(function(){var n=1===e._83?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._83?f(t.promise,e._18):p(t.promise,e._18));var r=o(n,e._18);r===g?p(t.promise,y):f(t.promise,r)})}function f(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=i(t);if(n===g)return p(e,y);if(n===e.then&&t instanceof s)return e._83=3,e._18=t,void h(e);if("function"===typeof n)return void v(n.bind(t),e)}e._83=1,e._18=t,h(e)}function p(e,t){e._83=2,e._18=t,s._71&&s._71(e,t),h(e)}function h(e){if(1===e._75&&(u(e,e._38),e._38=null),2===e._75){for(var t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),l=n.n(s),u=n(1),c=n.n(u),f=n(2),p=n.n(f),h=n(4),d=Object.assign||function(e){for(var t=1;t outside a "),p()(void 0!==t,'You must specify the "to" property');var o=this.context.router.history,a="string"===typeof t?Object(h.c)(t,null,null,o.location):t,s=o.createHref(a);return l.a.createElement("a",d({},i,{onClick:this.handleClick,href:s,ref:n}))},t}(l.a.Component);m.propTypes={onClick:c.a.func,target:c.a.string,replace:c.a.bool,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired,innerRef:c.a.oneOfType([c.a.string,c.a.func])},m.defaultProps={replace:!1},m.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired,createHref:c.a.func.isRequired}).isRequired}).isRequired},t.a=m},function(e,t,n){"use strict";var r=n(24);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(2),u=n.n(l),c=n(0),f=n.n(c),p=n(1),h=n.n(p),d=n(12),v=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,c=(r||l.location).pathname;return Object(d.a)(c,{path:i,strict:o,exact:a,sensitive:s},l.match)},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),s()(!(this.props.component&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored"),s()(!(this.props.render&&this.props.children&&!m(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,a=o.history,s=o.route,l=o.staticContext,u=this.props.location||s.location,c={match:e,location:u,history:a,staticContext:l};return r?e?f.a.createElement(r,c):null:i?e?i(c):null:"function"===typeof n?n(c):n&&!m(n)?f.a.Children.only(n):null},t}(f.a.Component);y.propTypes={computedMatch:h.a.object,path:h.a.string,exact:h.a.bool,strict:h.a.bool,sensitive:h.a.bool,component:h.a.func,render:h.a.func,children:h.a.oneOfType([h.a.func,h.a.node]),location:h.a.object},y.contextTypes={router:h.a.shape({history:h.a.object.isRequired,route:h.a.object.isRequired,staticContext:h.a.object})},y.childContextTypes={router:h.a.object.isRequired},t.a=y},function(e,t,n){function r(e,t){for(var n,r=[],i=0,o=0,a="",s=t&&t.delimiter||"/";null!=(n=g.exec(e));){var c=n[0],f=n[1],p=n.index;if(a+=e.slice(o,p),o=p+c.length,f)a+=f[1];else{var h=e[o],d=n[2],v=n[3],m=n[4],y=n[5],b=n[6],w=n[7];a&&(r.push(a),a="");var x=null!=d&&null!=h&&h!==d,k="+"===b||"*"===b,E="?"===b||"*"===b,_=n[2]||s,P=m||y;r.push({name:v||i++,prefix:d||"",delimiter:_,optional:E,repeat:k,partial:x,asterisk:!!w,pattern:P?u(P):w?".*":"[^"+l(_)+"]+?"})}}return o0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===e?e:s(e)(t,{pretty:!0})};t.a=l},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n5&&void 0!==arguments[5]&&arguments[5];r(this,e),this.cx=t[0],this.cy=t[1],this.fill="#2da7cf80",this.stroke="rgb(123, 207, 225)",this.selector=s,this.canvas=n,this.x=i,this.y=o,this.zoom=a,this.el=document.createElementNS("http://www.w3.org/2000/svg","circle"),this.select=this.select.bind(this),this.move=this.move.bind(this),this.stopEditing=this.stopEditing.bind(this),this.get_point=this.get_point.bind(this),this.old_cx=t[0],this.old_cy=t[1],this.base_size=10,this.base_stroke=5,this.size=this.base_size/a,this.strokeWidth=this.base_stroke/a}return i(e,[{key:"draw",value:function(){this.el.setAttribute("cx",this.cx),this.el.setAttribute("cy",this.cy),this.el.setAttribute("r",this.size),this.el.style.stroke=this.stroke,this.el.style.strokeWidth=this.strokeWidth,this.el.style.fill=this.fill}},{key:"setSize",value:function(e){this.size=this.base_size/e,this.strokeWidth=this.base_stroke/e,this.draw()}},{key:"edit",value:function(){this.el.addEventListener("click",this.select)}},{key:"clear",value:function(){window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing),this.fill="#2da7cf80",this.cx=this.old_cx,this.cy=this.old_cy,this.draw()}},{key:"stopEditing",value:function(){window.snapping_points.push([this.cx,this.cy]),this.old_cx=this.cx,this.old_cy=this.cy,this.fill="#2da7cf80",this.draw(),window.removeEventListener("mousemove",this.move),window.removeEventListener("dblclick",this.stopEditing)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1||c<0||c>1)&&{x:e+u*(n-e),y:t+u*(r-t)}}function i(e,t){var n=s(e),r=2*(n.centroid[0]-window.r_axis)*Math.PI,i=r*n.area*Math.pow(t,3);return Math.abs(i)}function o(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function a(e,t,n){if(!e)return null;var r=[e.points[0].cx,e.points[0].cy],i=[e.points[1].cx,e.points[1].cy],a=o(r,i);return("inch"===n?2.54*t:t)/a/10}function s(e){var t=[];return e.forEach(function(e){t.push([e.cx,e.cy])}),{centroid:d.polygonCentroid(t),area:d.polygonArea(t)}}function l(e){var t=[],n=0;return e.forEach(function(r){ni.cy&&window.maxFill=1?("start-start"===n[0]?r=e.points.reverse().concat(t.points):"end-end"===n[0]?r=e.points.concat(t.points.reverse()):"start-end"===n[0]?r=t.points.concat(e.points):"end-start"===n[0]&&(r=e.points.concat(t.points)),n.length,r):void 0}n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return f}),n.d(t,"g",function(){return p}),n.d(t,"f",function(){return h}),n.d(t,"e",function(){return c});var d=n(80)},function(e,t,n){!function(){"use strict";function t(e,t,n,r,i){"undefined"===typeof i&&(i=.5);var o=p.projectionratio(i,e),a=1-o,s={x:o*t.x+a*r.x,y:o*t.y+a*r.y},l=p.abcratio(i,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s}}var r=Math.abs,i=Math.min,o=Math.max,a=Math.cos,s=Math.sin,l=Math.acos,u=Math.sqrt,c=Math.PI,f={x:0,y:0,z:0},p=n(32),h=n(110),d=function(e){var t=e&&e.forEach?e:[].slice.call(arguments),n=!1;if("object"===typeof t[0]){n=t.length;var i=[];t.forEach(function(e){["x","y","z"].forEach(function(t){"undefined"!==typeof e[t]&&i.push(e[t])})}),t=i}var o=!1,a=t.length;if(n){if(n>4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var s=!o&&(9===a||12===a)||e&&e[0]&&"undefined"!==typeof e[0].z;this._3d=s;for(var l=[],u=0,c=s?3:2;u1e-4)return void(e._linear=!1);e._linear=!0}(this),this._t1=0,this._t2=1,this.update()},v=n(111);d.SVGtoBeziers=function(e){return v(d,e)},d.quadraticFromPoints=function(e,n,r,i){if("undefined"===typeof i&&(i=.5),0===i)return new d(n,n,r);if(1===i)return new d(e,n,n);var o=t(2,e,n,r,i);return new d(e,o.A,r)},d.cubicFromPoints=function(e,n,r,i,o){"undefined"===typeof i&&(i=.5);var a=t(3,e,n,r,i);"undefined"===typeof o&&(o=p.dist(n,a.C));var s=o*(1-i)/i,l=p.dist(e,r),u=(r.x-e.x)/l,c=(r.y-e.y)/l,f=o*u,h=o*c,v=s*u,m=s*c,y={x:n.x-f,y:n.y-h},g={x:n.x+v,y:n.y+m},b=a.A,w={x:b.x+(y.x-b.x)/(1-i),y:b.y+(y.y-b.y)/(1-i)},x={x:b.x+(g.x-b.x)/i,y:b.y+(g.y-b.y)/i},k={x:e.x+(w.x-e.x)/i,y:e.y+(w.y-e.y)/i},E={x:r.x+(x.x-r.x)/(1-i),y:r.y+(x.y-r.y)/(1-i)};return new d(e,k,E,r)};var m=function(){return p};d.getUtils=m,d.PolyBezier=h,d.prototype={getUtils:m,valueOf:function(){return this.toString()},toString:function(){return p.pointsToString(this.points)},toSVG:function(e){if(this._3d)return!1;for(var t=this.points,n=t[0].x,r=t[0].y,i=["M",n,r,2===this.order?"Q":"C"],o=1,a=t.length;o1;t--,n--){for(var r,i=[],o=0;o0},length:function(){return p.length(this.derivative.bind(this))},_lut:[],getLUT:function(e){if(e=e||100,this._lut.length===e)return this._lut;this._lut=[],e--;for(var t=0;t<=e;t++)this._lut.push(this.compute(t/e));return this._lut},on:function(e,t){t=t||5;for(var n,r=this.getLUT(),i=[],o=0,a=0;a1;){for(var p=0;p1;){for(r=[],a=0,s=n.length-1;a=0&&e<=1}),i=i.concat(r[n].sort(p.numberSort))}.bind(this)),i=i.sort(p.numberSort).filter(function(e,t){return i.indexOf(e)===t}),r.values=i,r},bbox:function(){var e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=p.getminmax(this,n,e[n])}.bind(this)),t},overlaps:function(e){var t=this.bbox(),n=e.bbox();return p.bboxoverlap(t,n)},offset:function(e,t){if("undefined"!==typeof t){var n=this.get(e),r=this.normal(e),i={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(i.z=n.z+r.z*t),i}if(this._linear){var o=this.normal(0),a=this.points.map(function(t){var n={x:t.x+e*o.x,y:t.y+e*o.y};return t.z&&r.z&&(n.z=t.z+e*o.z),n});return[new d(a)]}return this.reduce().map(function(t){return t.scale(e)})},simple:function(){if(3===this.order){var e=p.angle(this.points[0],this.points[3],this.points[1]),t=p.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}var n=this.normal(0),i=this.normal(1),o=n.x*i.x+n.y*i.y;return this._3d&&(o+=n.z*i.z),r(l(o))1,s.endcap.virtual=o0&&(i=i.concat(t))}),i},arcs:function(e){e=e||.5;var t=[];return this._iterate(e,t)},_error:function(e,t,n,i){var o=(i-n)/4,a=this.get(n+o),s=this.get(i-o),l=p.dist(e,t),u=p.dist(e,a),c=p.dist(e,s);return r(u-l)+r(c-l)},_iterate:function(e,t){var n,r=0,i=1;do{n=0,i=1;var o,l,u,c,f,h=this.get(r),d=!1,v=!1,m=i,y=1,g=0;do{v=d,c=u,m=(r+i)/2,g++,o=this.get(m),l=this.get(i),u=p.getccenter(h,o,l),u.interval={start:r,end:i};if(d=this._error(u,h,r,i)<=e,f=v&&!d,f||(y=i),d){if(i>=1){if(u.interval.end=y=1,c=u,i>1){var b={x:u.x+u.r*a(u.e),y:u.y+u.r*s(u.e)};u.e+=p.angle({x:u.x,y:u.y},b,this.get(1))}break}i+=(i-r)/2}else i=m}while(!f&&n++<100);if(n>=100)break;c=c||u,t.push(c),r=y}while(i<1);return t}},e.exports=d}()},function(e,t,n){!function(){"use strict";var t=Math.abs,r=Math.cos,i=Math.sin,o=Math.acos,a=Math.atan2,s=Math.sqrt,l=Math.pow,u=function(e){return e<0?-l(-e,1/3):l(e,1/3)},c=Math.PI,f=2*c,p=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,d=Number.MIN_SAFE_INTEGER||-9007199254740991,v={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){var n=t(e),r=n.x*n.x+n.y*n.y;return"undefined"!==typeof n.z&&(r+=n.z*n.z),s(r)},between:function(e,t,n){return t<=e&&e<=n||v.approximately(e,t)||v.approximately(e,n)},approximately:function(e,n,r){return t(e-n)<=(r||1e-6)},length:function(e){var t,n,r=0,i=v.Tvalues.length;for(t=0;to.x.min&&(t=o.x.min),n>o.y.min&&(n=o.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,o.push(a))}})}),o},makeshape:function(e,t,n){var r=t.points.length,i=e.points.length,o=v.makeline(t.points[r-1],e.points[0]),a=v.makeline(e.points[i-1],t.points[0]),s={startcap:o,forward:e,back:t,endcap:a,bbox:v.findbbox([o,e,t,a])},l=v;return s.intersections=function(e){return l.shapeintersections(s,s.bbox,e,e.bbox,n)},s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};var r,i,o=h,a=d;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(var s=0,l=n.length;sa&&(a=i[t]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(e,t){var n=t.p1.x,o=t.p1.y,s=-a(t.p2.y-o,t.p2.x-n),l=function(e){return{x:(e.x-n)*r(s)-(e.y-o)*i(s),y:(e.x-n)*i(s)+(e.y-o)*r(s)}};return e.map(l)},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};var n=e.length-1,i=v.align(e,t),a=function(e){return 0<=e&&e<=1};if(2===n){var l=i[0].y,c=i[1].y,p=i[2].y,h=l-2*c+p;if(0!==h){var d=-s(c*c-l*p),m=-l+c,y=-(d+m)/h;return[y,-(-d+m)/h].filter(a)}return c!==p&&0===h?[(2*c-p)/2*(c-p)].filter(a):[]}var g=i[0].y,b=i[1].y,w=i[2].y,x=i[3].y,h=3*b-g-3*w+x,l=3*g-6*b+3*w,c=-3*g+3*b,p=g;if(v.approximately(h,0)){if(v.approximately(l,0))return v.approximately(c,0)?[]:[-p/c].filter(a);var k=s(c*c-4*l*p),E=2*l;return[(k-c)/E,(-c-k)/E].filter(a)}l/=h,c/=h,p/=h;var _,y,P,C,T,i=(3*c-l*l)/3,S=i/3,k=(2*l*l*l-9*l*c+27*p)/27,A=k/2,M=A*A+S*S*S;if(M<0){var O=-i/3,R=O*O*O,z=s(R),L=-k/(2*z),N=L<-1?-1:L>1?1:L,I=o(N),j=u(z),D=2*j;return P=D*r(I/3)-l/3,C=D*r((I+f)/3)-l/3,T=D*r((I+2*f)/3)-l/3,[P,C,T].filter(a)}if(0===M)return _=A<0?u(-A):-u(A),P=2*_-l/3,C=-_-l/3,[P,C].filter(a);var B=s(M);return _=u(-A+B),y=u(A+B),[_-y-l/3].filter(a)},droots:function(e){if(3===e.length){var t=e[0],n=e[1],r=e[2],i=t-2*n+r;if(0!==i){var o=-s(n*n-t*r),a=-t+n;return[-(o+a)/i,-(-o+a)/i]}return n!==r&&0===i?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){var t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}},inflections:function(e){if(e.length<4)return[];var t=v.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,i=t[1].x*t[2].y,o=t[3].x*t[2].y,a=18*(-3*n+2*r+3*i-o),s=18*(3*n-r-3*i),l=18*(i-n);if(v.approximately(a,0)){if(!v.approximately(s,0)){var u=-l/s;if(0<=u&&u<=1)return[u]}return[]}var c=s*s-4*a*l,f=Math.sqrt(c),o=2*a;return v.approximately(o,0)?[]:[(f-s)/o,-(s+f)/o].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){var r,i,o,a,s,l=["x","y"],u=l.length;for(r=0;r=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){var r=e.bbox(),i=t.bbox(),o=1e5,a=n||.5;if(r.x.size+r.y.sizeA||A>M)&&(S+=f),S>M&&(o=M,M=S,S=o)):Mu){for(var t=0,n=a.length-l;t-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function v(e){var t=new i;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];this.map[e]=i?i+","+r:r},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,r){this.map[t(e)]=n(r)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];m.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=h,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var i=new h(e,t),o=new XMLHttpRequest;o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;n(new m(t,e))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&y.blob&&(o.responseType="blob"),i.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n.n(r),o=n(41),a=n.n(o),s=n(20),l=n(75),u=(n.n(l),n(76));a.a.render(i.a.createElement(s.a,null,i.a.createElement(u.a,null)),document.getElementById("root"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rD.length&&D.push(e)}function p(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:a=!0}}if(a)return n(i,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function B(e){e.eventPool=[],e.getPooled=j,e.release=D}function U(e,t){switch(e){case"keyup":return-1!==ki.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function F(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function J(e,t){switch(e){case"compositionend":return F(t);case"keypress":return 32!==t.which?null:(Ai=!0,Ti);case"textInput":return e=t.data,e===Ti&&Ai?null:e;default:return null}}function V(e,t){if(Mi)return"compositionend"===e||!Ei&&U(e,t)?(e=L(),yi._root=null,yi._startText=null,yi._fallbackText=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function pe(e){return e[1].toUpperCase()}function he(e,t,n,r){var i=no.hasOwnProperty(t)?no[t]:null;(null!==i?0===i.type:!r&&(2Oo.length&&Oo.push(e)}}}function Ze(e){return Object.prototype.hasOwnProperty.call(e,Io)||(e[Io]=No++,Lo[e[Io]]={}),Lo[e[Io]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ye(e,t){var n=He(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=He(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Xe(e,t){if(Jo||null==Bo||Bo!==Br())return null;var n=Bo;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Fo&&Ur(Fo,n)?null:(Fo=n,e=I.getPooled(Do.select,Uo,e,t),e.type="select",e.target=Bo,A(e),e)}function Ge(e){var t="";return Nr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function $e(e,t){return e=jr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Qe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function it(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function ot(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ot(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function st(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"===typeof o||""===o?"":r||"number"!==typeof o||0===o||va.hasOwnProperty(i)&&va[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function ut(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function ct(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ze(e);t=Kr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function ht(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function dt(e,t,n,r){var i=ct(t,n);switch(t){case"iframe":case"object":Je("load",e);var o=n;break;case"video":case"audio":for(o=0;oCa||(e.current=Pa[Ca],Pa[Ca]=null,Ca--)}function Pt(e,t){Ca++,Pa[Ca]=e.current,e.current=t}function Ct(e){return St(e)?Aa:Ta.current}function Tt(e,t){var n=e.type.contextTypes;if(!n)return Jr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function St(e){return 2===e.tag&&null!=e.type.childContextTypes}function At(e){St(e)&&(_t(Sa,e),_t(Ta,e))}function Mt(e){_t(Sa,e),_t(Ta,e)}function Ot(e,t,n){Ta.current!==Jr&&r("168"),Pt(Ta,t,e),Pt(Sa,n,e)}function Rt(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ae(e)||"Unknown",o);return jr({},t,n)}function zt(e){if(!St(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Jr,Aa=Ta.current,Pt(Ta,t,e),Pt(Sa,Sa.current,e),!0}function Lt(e,t){var n=e.stateNode;if(n||r("169"),t){var i=Rt(e,Aa);n.__reactInternalMemoizedMergedChildContext=i,_t(Sa,e),_t(Ta,e),Pt(Ta,i,e)}else _t(Sa,e);Pt(Sa,t,e)}function Nt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function It(e,t,n){var r=e.alternate;return null===r?(r=new Nt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function jt(e,t,n){var i=e.type,o=e.key;if(e=e.props,"function"===typeof i)var a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"===typeof i)a=5;else switch(i){case Vi:return Dt(e.children,t,n,o);case Yi:a=11,t|=3;break;case qi:a=11,t|=2;break;case Wi:return i=new Nt(15,e,o,4|t),i.type=Wi,i.expirationTime=n,i;case Xi:a=16,t|=2;break;default:e:{switch("object"===typeof i&&null!==i?i.$$typeof:null){case Zi:a=13;break e;case Hi:a=12;break e;case Ki:a=14;break e;default:r("130",null==i?i:typeof i,"")}a=void 0}}return t=new Nt(a,e,o,t),t.type=i,t.expirationTime=n,t}function Dt(e,t,n,r){return e=new Nt(10,e,r,t),e.expirationTime=n,e}function Bt(e,t,n){return e=new Nt(6,e,null,t),e.expirationTime=n,e}function Ut(e,t,n){return t=new Nt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ft(e,t,n){return t=new Nt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Jt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ma=Jt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Jt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function qt(e){"function"===typeof Ma&&Ma(e)}function Wt(e){"function"===typeof Oa&&Oa(e)}function Zt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Yt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Kt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Xt(e,t,n){var r=e.alternate;if(null===r){var i=e.updateQueue,o=null;null===i&&(i=e.updateQueue=Zt(e.memoizedState))}else i=e.updateQueue,o=r.updateQueue,null===i?null===o?(i=e.updateQueue=Zt(e.memoizedState),o=r.updateQueue=Zt(r.memoizedState)):i=e.updateQueue=Ht(o):null===o&&(o=r.updateQueue=Ht(i));null===o||i===o?Kt(i,t,n):null===i.lastUpdate||null===o.lastUpdate?(Kt(i,t,n),Kt(o,t,n)):(Kt(i,t,n),o.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Zt(e.memoizedState):$t(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function $t(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Ht(t)),t}function Qt(e,t,n,r,i,o){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(o,r,i):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(i="function"===typeof e?e.call(o,r,i):e)||void 0===i)break;return jr({},r,i);case 2:Ra=!0}return r}function en(e,t,n,r,i){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>i)){t=$t(e,t);for(var o=t.baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c>i?(null===a&&(a=l,o=u),(0===s||s>c)&&(s=c)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var f=l.expirationTime;f>i?(null===c&&(c=l,null===a&&(o=u)),(0===s||s>f)&&(s=f)):(u=Qt(e,t,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=s,e.memoizedState=u}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:se(t)}}function on(e){var t=e.type._context;Pt(Na,t._changedBits,e),Pt(La,t._currentValue,e),Pt(za,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Na.current,n=La.current;_t(za,e),_t(La,e),_t(Na,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function sn(e){return e===Ia&&r("174"),e}function ln(e,t){Pt(Ba,t,e),Pt(Da,e,e),Pt(ja,Ia,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}_t(ja,e),Pt(ja,t,e)}function un(e){_t(ja,e),_t(Da,e),_t(Ba,e)}function cn(e){Da.current===e&&(_t(ja,e),_t(Da,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:jr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function pn(e,t,n,r,i,o){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(t,n)||!Ur(r,i))}function hn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function dn(e,t){var n=e.type,r=e.stateNode,i=e.pendingProps,o=Ct(e);r.props=i,r.state=e.memoizedState,r.refs=Jr,r.context=Tt(e,o),o=e.updateQueue,null!==o&&(en(e,o,i,r,t),r.state=e.memoizedState),o=e.type.getDerivedStateFromProps,"function"===typeof o&&(fn(e,o,i),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Ua.enqueueReplaceState(r,r.state,null),null!==(o=e.updateQueue)&&(en(e,o,i,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function vn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===Jr?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function mn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=It(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rv?(m=f,f=null):m=f.sibling;var y=h(r,f,s[v],l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),o=a(y,o,v),null===c?u=y:c.sibling=y,c=y,f=m}if(v===s.length)return n(r,f),u;if(null===f){for(;vm?(y=v,v=null):y=v.sibling;var b=h(o,v,g.value,u);if(null===b){v||(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=a(b,s,m),null===f?c=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),c;if(null===v){for(;!g.done;m++,g=l.next())null!==(g=p(o,g.value,u))&&(s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return c}for(v=i(o,v);!g.done;m++,g=l.next())null!==(g=d(v,o,m,g.value,u))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=a(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach(function(e){return t(o,e)}),c}return function(e,i,a,l){var u="object"===typeof a&&null!==a&&a.type===Vi&&null===a.key;u&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case Fi:e:{for(c=a.key,u=i;null!==u;){if(u.key===c){if(10===u.tag?a.type===Vi:u.type===a.type){n(e,u.sibling),i=o(u,a.type===Vi?a.props.children:a.props,l),i.ref=vn(e,u,a),i.return=e,e=i;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===Vi?(i=Dt(a.props.children,e.mode,l,a.key),i.return=e,e=i):(l=jt(a,e.mode,l),l.ref=vn(e,i,a),l.return=e,e=l)}return s(e);case Ji:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],l),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=Ut(a,e.mode,l),i.return=e,e=i}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,l),i.return=e,e=i):(n(e,i),i=Bt(a,e.mode,l),i.return=e,e=i),s(e);if(Fa(a))return v(e,i,a,l);if(oe(a))return m(e,i,a,l);if(c&&mn(e,a),"undefined"===typeof a&&!u)switch(e.tag){case 2:case 1:l=e.type,r("152",l.displayName||l.name||"Component")}return n(e,i)}}function gn(e,t){var n=new Nt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if(Za){var t=Wa;if(t){var n=t;if(!bn(e,t)){if(!(t=xt(n))||!bn(e,t))return e.effectTag|=2,Za=!1,void(qa=e);gn(qa,n)}qa=e,Wa=kt(t)}else e.effectTag|=2,Za=!1,qa=e}}function xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;qa=e}function kn(e){if(e!==qa)return!1;if(!Za)return xn(e),Za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Wa;t;)gn(e,t),t=xt(t);return xn(e),Wa=qa?xt(e.stateNode):null,!0}function En(){Wa=qa=null,Za=!1}function _n(e,t,n){Pn(e,t,n,t.expirationTime)}function Pn(e,t,n,r){t.child=null===e?Va(t,null,n,r):Ja(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Tn(e,t,n,r,i){Cn(e,t);var o=0!==(64&t.effectTag);if(!n&&!o)return r&&Lt(t,!1),On(e,t);n=t.stateNode,Bi.current=t;var a=o?null:n.render();return t.effectTag|=1,o&&(Pn(e,t,null,i),t.child=null),Pn(e,t,a,i),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Lt(t,!0),t.child}function Sn(e){var t=e.stateNode;t.pendingContext?Ot(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(e,t.context,!1),ln(e,t.containerInfo)}function An(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!==(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Mn(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(o===i)return t.stateNode=0,on(t),On(e,t);var s=i.value;if(t.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else{var l=o.value;if(l===s&&(0!==l||1/l===1/s)||l!==l&&s!==s){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t);s=0}else if(s="function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,s):1073741823,0===(s|=0)){if(o.children===i.children&&a)return t.stateNode=0,on(t),On(e,t)}else An(t,r,s,n)}return t.stateNode=s,on(t),_n(e,t,i.children),t.child}function On(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=It(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=It(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Rn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Sn(t);break;case 2:zt(t);break;case 4:ln(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=Ct(t);return a=Tt(t,a),i=i(o,a),t.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,o),o=zt(t),i.updater=Ua,t.stateNode=i,i._reactInternalFiber=t,dn(t,n),e=Tn(e,t,!0,o,n)):(t.tag=1,_n(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(i=Ct(t),i=Tt(t,i),o=o(n,i),t.effectTag|=1,_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 2:if(o=zt(t),null===e)if(null===t.stateNode){var s=t.pendingProps,l=t.type;i=Ct(t);var u=2===t.tag&&null!=t.type.contextTypes;a=u?Tt(t,i):Jr,s=new l(s,a),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=Ua,t.stateNode=s,s._reactInternalFiber=t,u&&(u=t.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=i,u.__reactInternalMemoizedMaskedChildContext=a),dn(t,n),i=!0}else{l=t.type,i=t.stateNode,u=t.memoizedProps,a=t.pendingProps,i.props=u;var c=i.context;s=Ct(t),s=Tt(t,s);var f=l.getDerivedStateFromProps;(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(u!==a||c!==s)&&hn(t,i,a,s),Ra=!1;var p=t.memoizedState;c=i.state=p;var h=t.updateQueue;null!==h&&(en(t,h,a,i,n),c=t.memoizedState),u!==a||p!==c||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),c=t.memoizedState),(u=Ra||pn(t,u,a,p,c,s))?(l||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.effectTag|=4)):("function"===typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,i=u):("function"===typeof i.componentDidMount&&(t.effectTag|=4),i=!1)}else l=t.type,i=t.stateNode,a=t.memoizedProps,u=t.pendingProps,i.props=a,c=i.context,s=Ct(t),s=Tt(t,s),f=l.getDerivedStateFromProps,(l="function"===typeof f||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(a!==u||c!==s)&&hn(t,i,u,s),Ra=!1,c=t.memoizedState,p=i.state=c,h=t.updateQueue,null!==h&&(en(t,h,u,i,n),p=t.memoizedState),a!==u||c!==p||Sa.current||Ra?("function"===typeof f&&(fn(t,f,u),p=t.memoizedState),(f=Ra||pn(t,a,u,c,p,s))?(l||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(u,p,s),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(u,p,s)),"function"===typeof i.componentDidUpdate&&(t.effectTag|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),i.props=u,i.state=p,i.context=s,i=f):("function"!==typeof i.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!==typeof i.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),i=!1);return Tn(e,t,i,o,n);case 3:return Sn(t),o=t.updateQueue,null!==o?(i=t.memoizedState,i=null!==i?i.element:null,en(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===i?(En(),e=On(e,t)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(Wa=kt(t.stateNode.containerInfo),qa=t,i=Za=!0),i?(t.effectTag|=2,t.child=Va(t,null,o,n)):(En(),_n(e,t,o)),e=t.child)):(En(),e=On(e,t)),e;case 5:return sn(Ba.current),o=sn(ja.current),i=at(o,t.type),o!==i&&(Pt(Da,t,t),Pt(ja,i,t)),null===e&&wn(t),o=t.type,u=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||u!==i||((u=1&t.mode&&!!i.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=i.children,wt(o,i)?u=null:a&&wt(o,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&i.hidden?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(_n(e,t,u),t.memoizedProps=i,e=t.child)):e=On(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ln(t,t.stateNode.containerInfo),o=t.pendingProps,Sa.current||t.memoizedProps!==o?(null===e?t.child=Ja(t,null,o,n):_n(e,t,o),t.memoizedProps=o,e=t.child):e=On(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,i=t.ref,Sa.current||t.memoizedProps!==n||i!==(null!==e?e.ref:null)?(o=o(n,i),_n(e,t,o),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(_n(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=On(e,t):(_n(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Mn(e,t,n);case 12:e:if(i=t.type,a=t.pendingProps,u=t.memoizedProps,o=i._currentValue,s=i._changedBits,Sa.current||0!==s||u!==a){if(t.memoizedProps=a,l=a.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(s&l))An(t,i,s,n);else if(u===a){e=On(e,t);break e}n=a.children,n=n(o),t.effectTag|=1,_n(e,t,n),e=t.child}else e=On(e,t);return e;default:r("156")}}function zn(e){e.effectTag|=4}function Ln(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return At(t),null;case 3:un(t),Mt(t);var i=t.stateNode;return i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),Ha(t),null;case 5:cn(t),i=sn(Ba.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,s=t.stateNode,l=sn(ja.current);s=vt(s,o,a,n,i),Ya(e,t,s,o,a,n,i,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=sn(ja.current),kn(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[ii]=t,n[oi]=a,i=yt(n,o,a,e,i),t.updateQueue=i,null!==i&&zn(t);else{e=pt(o,n,i,e),e[ii]=t,e[oi]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}dt(e,o,n,i),bt(o,n)&&zn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;i=sn(Ba.current),sn(ja.current),kn(t)?(i=t.stateNode,n=t.memoizedProps,i[ii]=t,gt(i,n)&&zn(t)):(i=ht(n,i),i[ii]=t,t.stateNode=i)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return un(t),Ha(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Nn(e,t){var n=t.source;null===t.stack&&null!==n&&se(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function In(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Xn(e,t)}else t.current=null}function jn(e){switch("function"===typeof Wt&&Wt(e),e.tag){case 2:In(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Xn(e,t)}break;case 5:In(e);break;case 4:Un(e)}}function Dn(e){return 5===e.tag||3===e.tag||4===e.tag}function Bn(e){e:{for(var t=e.return;null!==t;){if(Dn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(st(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Dn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(i){var a=t,s=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(s,l):a.insertBefore(s,l)}else t.insertBefore(o.stateNode,n);else i?(a=t,s=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(s,a):a.appendChild(s)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Un(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,s=a;;)if(jn(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}o?(a=i,s=t.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):i.removeChild(t.stateNode)}else if(4===t.tag?i=t.stateNode.containerInfo:jn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Fn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[oi]=i,mt(n,a,o,e,i))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Jn(e,t,n){n=Yt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dr(r),Nn(e,t)},n}function Vn(e,t,n){n=Yt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cs?cs=new Set([this]):cs.add(this);var n=t.value,r=t.stack;Nn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qn(e,t,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Jn(e,r,o),void Gt(e,r,o);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cs||!cs.has(n)))return e.effectTag|=1024,r=Vn(e,t,o),void Gt(e,r,o)}e=e.return}while(null!==e)}function Wn(e){switch(e.tag){case 2:At(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return un(e),Mt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return un(e),null;case 13:return an(e),null;default:return null}}function Zn(){if(null!==ns)for(var e=ns.return;null!==e;){var t=e;switch(t.tag){case 2:At(t);break;case 3:un(t),Mt(t);break;case 5:cn(t);break;case 4:un(t);break;case 13:an(t)}e=e.return}rs=null,is=0,os=-1,as=!1,ns=null,us=!1}function Hn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Ln(t,e,is);var i=e;if(1073741823===is||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1gs)&&(gs=e),e}function Qn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ts&&0!==is&&tTs&&r("185")}e=e.return}}function er(){return $a=ka()-Xa,Ga=2+($a/10|0)}function tr(e){var t=es;es=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{es=t}}function nr(e,t,n,r,i){var o=es;es=1;try{return e(t,n,r,i)}finally{es=o}}function rr(e){if(0!==hs){if(e>hs)return;null!==ds&&_a(ds)}var t=ka()-Xa;hs=e,ds=Ea(ar,{timeout:10*(e-2)-t})}function ir(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===ps?(fs=ps=e,e.nextScheduledRoot=e):(ps=ps.nextScheduledRoot=e,ps.nextScheduledRoot=fs);else{var n=e.remainingExpirationTime;(0===n||t=ys)&&(!bs||er()>=ys);)er(),fr(ms,ys,!bs),or();else for(;null!==ms&&0!==ys&&(0===e||e>=ys);)fr(ms,ys,!1),or();null!==ks&&(hs=0,ds=null),0!==ys&&rr(ys),ks=null,bs=!1,cr()}function ur(e,t){vs&&r("253"),ms=e,ys=t,fr(e,t,!1),sr(),cr()}function cr(){if(Ss=0,null!==Cs){var e=Cs;Cs=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Ye(_,C),x=Ye(_,b),w&&x&&(1!==P.rangeCount||P.anchorNode!==w.node||P.anchorOffset!==w.offset||P.focusNode!==x.node||P.focusOffset!==x.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),P.removeAllRanges(),C>b?(P.addRange(k),P.extend(x.node,x.offset)):(k.setEnd(x.node,x.offset),P.addRange(k))))),P=[];for(C=_;C=C.parentNode;)1===C.nodeType&&P.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_As)&&(bs=!0)}function dr(e){null===ms&&r("246"),ms.remainingExpirationTime=0,ws||(ws=!0,xs=e)}function vr(e){null===ms&&r("246"),ms.remainingExpirationTime=e}function mr(e,t){var n=Es;Es=!0;try{return e(t)}finally{(Es=n)||vs||sr()}}function yr(e,t){if(Es&&!_s){_s=!0;try{return e(t)}finally{_s=!1}}return e(t)}function gr(e,t){vs&&r("187");var n=Es;Es=!0;try{return nr(e,t)}finally{Es=n,sr()}}function br(e,t,n){if(Ps)return e(t,n);Es||vs||0===gs||(lr(gs,!1,null),gs=0);var r=Ps,i=Es;Es=Ps=!0;try{return e(t,n)}finally{Ps=r,(Es=i)||vs||sr()}}function wr(e){var t=Es;Es=!0;try{nr(e)}finally{(Es=t)||vs||lr(1,!1,null)}}function xr(e,t,n,i,o){var a=t.current;if(n){n=n._reactInternalFiber;var s;e:{for(2===ze(n)&&2===n.tag||r("170"),s=n;3!==s.tag;){if(St(s)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}(s=s.return)||r("171")}s=s.stateNode.context}n=St(n)?Rt(n,s):s}else n=Jr;return null===t.context?t.context=n:t.pendingContext=n,t=o,o=Yt(i),o.payload={element:e},t=void 0===t?null:t,null!==t&&(o.callback=t),Xt(a,o,i),Qn(a,i),i}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Ie(t),null===e?null:e.stateNode}function Er(e,t,n,r){var i=t.current;return i=$n(er(),i),xr(e,t,n,i,r)}function _r(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Pr(e){var t=e.findFiberByHostInstance;return Vt(jr({},e,{findHostInstanceByFiber:function(e){return e=Ie(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=_i),Ti=String.fromCharCode(32),Si={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ai=!1,Mi=!1,Oi={eventTypes:Si,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Ei)e:{switch(e){case"compositionstart":i=Si.compositionStart;break e;case"compositionend":i=Si.compositionEnd;break e;case"compositionupdate":i=Si.compositionUpdate;break e}i=void 0}else Mi?U(e,n)&&(i=Si.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=Si.compositionStart);return i?(Ci&&(Mi||i!==Si.compositionStart?i===Si.compositionEnd&&Mi&&(o=L()):(yi._root=r,yi._startText=N(),Mi=!0)),i=wi.getPooled(i,t,n,r),o?i.data=o:null!==(o=F(n))&&(i.data=o),A(i),o=i):o=null,(e=Pi?J(e,n):V(e,n))?(t=xi.getPooled(Si.beforeInput,t,n,r),t.data=e,A(t)):t=null,null===o?t:null===t?o:[o,t]}},Ri=null,zi={injectFiberControlledHostComponent:function(e){Ri=e}},Li=null,Ni=null,Ii={injection:zi,enqueueStateRestore:W,needsStateRestore:Z,restoreStateIfNeeded:H},ji=!1,Di={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Bi=Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ui="function"===typeof Symbol&&Symbol.for,Fi=Ui?Symbol.for("react.element"):60103,Ji=Ui?Symbol.for("react.portal"):60106,Vi=Ui?Symbol.for("react.fragment"):60107,qi=Ui?Symbol.for("react.strict_mode"):60108,Wi=Ui?Symbol.for("react.profiler"):60114,Zi=Ui?Symbol.for("react.provider"):60109,Hi=Ui?Symbol.for("react.context"):60110,Yi=Ui?Symbol.for("react.async_mode"):60111,Ki=Ui?Symbol.for("react.forward_ref"):60112,Xi=Ui?Symbol.for("react.timeout"):60113,Gi="function"===typeof Symbol&&Symbol.iterator,$i=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qi=Object.prototype.hasOwnProperty,eo={},to={},no={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){no[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];no[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){no[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){no[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){no[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){no[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){no[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){no[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){no[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ro=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ro,pe);no[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),no.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var io={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},oo=null,ao=null,so=!1;Ir.canUseDOM&&(so=ee("input")&&(!document.documentMode||9=document.documentMode,Do={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Bo=null,Uo=null,Fo=null,Jo=!1,Vo={eventTypes:Do,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Ze(o),i=Kr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Qo;null!==r;){var i=r.timeoutTime;-1!==i&&i<=t?n.push(r):-1!==i&&(-1===e||it&&(t=8),aa=t"+t+"",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),va={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ma=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});var ya=jr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ga=Dr.thatReturns(""),ba={createElement:pt,createTextNode:ht,setInitialProperties:dt,diffProperties:vt,updateProperties:mt,diffHydratedProperties:yt,diffHydratedText:gt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,forceRefresh:f.a.bool,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node}},function(e,t,n){"use strict";function r(){}var i=n(51);e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Browser history needs a DOM");var t=window.history,n=Object(c.g)(),r=!Object(c.h)(),o=e.forceRefresh,d=void 0!==o&&o,v=e.getUserConfirmation,m=void 0===v?c.c:v,y=e.keyLength,g=void 0===y?6:y,b=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",w=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname,u=o.search,c=o.hash,f=a+u+c;return i()(!b||Object(l.c)(f,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+f+'" to begin with "'+b+'".'),b&&(f=Object(l.e)(f,b)),Object(s.a)(f,r,n)},x=function(){return Math.random().toString(36).substr(2,g)},k=Object(u.a)(),E=function(e){p(J,e),J.length=t.length,k.notifyListeners(J.location,J.action)},_=function(e){Object(c.d)(e)||T(w(e.state))},P=function(){T(w(h()))},C=!1,T=function(e){if(C)C=!1,E();else{k.confirmTransitionTo(e,"POP",m,function(t){t?E({action:"POP",location:e}):S(e)})}},S=function(e){var t=J.location,n=M.indexOf(t.key);-1===n&&(n=0);var r=M.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(C=!0,L(i))},A=w(h()),M=[A.key],O=function(e){return b+Object(l.b)(e)},R=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"PUSH",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.pushState({key:a,state:s},null,r),d)window.location.href=r;else{var l=M.indexOf(J.location.key),u=M.slice(0,-1===l?0:l+1);u.push(o.key),M=u,E({action:"PUSH",location:o})}else i()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},z=function(e,r){i()(!("object"===("undefined"===typeof e?"undefined":f(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=Object(s.a)(e,r,x(),J.location);k.confirmTransitionTo(o,"REPLACE",m,function(e){if(e){var r=O(o),a=o.key,s=o.state;if(n)if(t.replaceState({key:a,state:s},null,r),d)window.location.replace(r);else{var l=M.indexOf(J.location.key);-1!==l&&(M[l]=o.key),E({action:"REPLACE",location:o})}else i()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},L=function(e){t.go(e)},N=function(){return L(-1)},I=function(){return L(1)},j=0,D=function(e){j+=e,1===j?(Object(c.a)(window,"popstate",_),r&&Object(c.a)(window,"hashchange",P)):0===j&&(Object(c.e)(window,"popstate",_),r&&Object(c.e)(window,"hashchange",P))},B=!1,U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=k.setPrompt(e);return B||(D(1),B=!0),function(){return B&&(B=!1,D(-1)),t()}},F=function(e){var t=k.appendListener(e);return D(1),function(){D(-1),t()}},J={length:t.length,action:"POP",location:A,createHref:O,push:R,replace:z,go:L,goBack:N,goForward:I,block:U,listen:F};return J};t.a=d},function(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),l=a||s;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var u=void 0;if(o.length){var c=o[o.length-1];u="."===c||".."===c||""===c}else u=!1;for(var f=0,p=o.length;p>=0;p--){var h=o[p];"."===h?i(o,p):".."===h?(i(o,p),f++):f&&(i(o,p),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}t.a=o},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":i(e);if(n!==("undefined"===typeof t?"undefined":i(t)))return!1;if("object"===n){var o=e.valueOf(),a=t.valueOf();if(o!==e||a!==t)return r(o,a);var s=Object.keys(e),l=Object.keys(t);return s.length===l.length&&s.every(function(n){return r(e[n],t[n])})}return!1}var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=r},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(7),l=n(5),u=n(9),c=n(21),f=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(c.b,"Hash history needs a DOM");var t=window.history,n=Object(c.f)(),r=e.getUserConfirmation,o=void 0===r?c.c:r,m=e.hashType,y=void 0===m?"slash":m,g=e.basename?Object(l.g)(Object(l.a)(e.basename)):"",b=p[y],w=b.encodePath,x=b.decodePath,k=function(){var e=x(h());return i()(!g||Object(l.c)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=Object(l.e)(e,g)),Object(s.a)(e)},E=Object(u.a)(),_=function(e){f(W,e),W.length=t.length,E.notifyListeners(W.location,W.action)},P=!1,C=null,T=function(){var e=h(),t=w(e);if(e!==t)v(t);else{var n=k(),r=W.location;if(!P&&Object(s.b)(r,n))return;if(C===Object(l.b)(n))return;C=null,S(n)}},S=function(e){if(P)P=!1,_();else{E.confirmTransitionTo(e,"POP",o,function(t){t?_({action:"POP",location:e}):A(e)})}},A=function(e){var t=W.location,n=z.lastIndexOf(Object(l.b)(t));-1===n&&(n=0);var r=z.lastIndexOf(Object(l.b)(e));-1===r&&(r=0);var i=n-r;i&&(P=!0,j(i))},M=h(),O=w(M);M!==O&&v(O);var R=k(),z=[Object(l.b)(R)],L=function(e){return"#"+w(g+Object(l.b)(e))},N=function(e,t){i()(void 0===t,"Hash history cannot push state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"PUSH",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);if(h()!==r){C=t,d(r);var o=z.lastIndexOf(Object(l.b)(W.location)),a=z.slice(0,-1===o?0:o+1);a.push(t),z=a,_({action:"PUSH",location:n})}else i()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),_()}})},I=function(e,t){i()(void 0===t,"Hash history cannot replace state; it is ignored");var n=Object(s.a)(e,void 0,void 0,W.location);E.confirmTransitionTo(n,"REPLACE",o,function(e){if(e){var t=Object(l.b)(n),r=w(g+t);h()!==r&&(C=t,v(r));var i=z.indexOf(Object(l.b)(W.location));-1!==i&&(z[i]=t),_({action:"REPLACE",location:n})}})},j=function(e){i()(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},D=function(){return j(-1)},B=function(){return j(1)},U=0,F=function(e){U+=e,1===U?Object(c.a)(window,"hashchange",T):0===U&&Object(c.e)(window,"hashchange",T)},J=!1,V=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return J||(F(1),J=!0),function(){return J&&(J=!1,F(-1)),t()}},q=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},W={length:t.length,action:"POP",location:R,createHref:L,push:N,replace:I,go:j,goBack:D,goForward:B,block:V,listen:q};return W};t.a=m},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(5),a=n(7),s=n(9),l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,f=e.initialIndex,p=void 0===f?0:f,h=e.keyLength,d=void 0===h?6:h,v=Object(s.a)(),m=function(e){u(A,e),A.length=A.entries.length,v.notifyListeners(A.location,A.action)},y=function(){return Math.random().toString(36).substr(2,d)},g=c(p,0,r.length-1),b=r.map(function(e){return"string"===typeof e?Object(a.a)(e,void 0,y()):Object(a.a)(e,void 0,e.key||y())}),w=o.b,x=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=A.index,n=t+1,i=A.entries.slice(0);i.length>n?i.splice(n,i.length-n,r):i.push(r),m({action:"PUSH",location:r,index:n,entries:i})}})},k=function(e,n){i()(!("object"===("undefined"===typeof e?"undefined":l(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=Object(a.a)(e,n,y(),A.location);v.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(A.entries[A.index]=r,m({action:"REPLACE",location:r}))})},E=function(e){var n=c(A.index+e,0,A.entries.length-1),r=A.entries[n];v.confirmTransitionTo(r,"POP",t,function(e){e?m({action:"POP",location:r,index:n}):m()})},_=function(){return E(-1)},P=function(){return E(1)},C=function(e){var t=A.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return v.setPrompt(e)},S=function(e){return v.appendListener(e)},A={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:w,push:x,replace:k,go:E,goBack:_,goForward:P,canGo:C,block:T,listen:S};return A};t.a=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(10),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={basename:f.a.string,getUserConfirmation:f.a.func,hashType:f.a.oneOf(["hashbang","noslash","slash"]),children:f.a.node},t.a=d},function(e,t,n){"use strict";var r=n(59);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(3),s=n.n(a),l=n(0),u=n.n(l),c=n(1),f=n.n(c),p=n(4),h=n(11),d=function(e){function t(){var n,o,a;r(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(h.a,{history:this.history,children:this.props.children})},t}(u.a.Component);d.propTypes={initialEntries:f.a.array,initialIndex:f.a.number,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node},t.a=d},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(23),u=n(22),c=Object.assign||function(e){for(var t=1;t outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);p.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},p.defaultProps={when:!0},p.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired},t.a=p},function(e,t,n){"use strict";var r=n(65);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(4),v=n(26),m=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.c)(e.to),n=Object(d.c)(this.props.to);if(Object(d.f)(t,n))return void f()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"===typeof n?Object(v.a)(n,t.params):m({},n,{pathname:Object(v.a)(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";var r=n(67);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(3),l=n.n(s),u=n(2),c=n.n(u),f=n(0),p=n.n(f),h=n(1),d=n.n(h),v=n(4),m=n(11),y=Object.assign||function(e){for(var t=1;t",e)}},E=function(){},_=function(e){function t(){var n,r,a;i(this,t);for(var s=arguments.length,l=Array(s),u=0;u ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),i=r(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:w(t,Object(v.c)(n)),push:this.handlePush,replace:this.handleReplace,go:k("go"),goBack:k("goBack"),goForward:k("goForward"),listen:this.handleListen,block:this.handleBlock};return p.a.createElement(m.a,y({},i,{history:o}))},t}(p.a.Component);_.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},_.defaultProps={basename:"",location:"/"},_.childContextTypes={router:d.a.object.isRequired},t.a=_},function(e,t,n){"use strict";var r=n(69);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),l=n(1),u=n.n(l),c=n(3),f=n.n(c),p=n(2),h=n.n(p),d=n(12),v=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){f()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),f()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return s.a.Children.forEach(t,function(t){if(null==r&&s.a.isValidElement(t)){var o=t.props,a=o.path,l=o.exact,u=o.strict,c=o.sensitive,f=o.from,p=a||f;i=t,r=Object(d.a)(n.pathname,{path:p,exact:l,strict:u,sensitive:c},e.match)}}),r?s.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(s.a.Component);v.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},v.propTypes={children:u.a.node,location:u.a.object},t.a=v},function(e,t,n){"use strict";var r=n(26);r.a},function(e,t,n){"use strict";var r=n(12);r.a},function(e,t,n){"use strict";var r=n(73);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=n(74),u=n.n(l),c=n(24),f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"other";this.globalStopEditingMode(),this.addCursorPoint();var t=this.state.polylines,n=new c.a({points:[],id:this.id,type:e,selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});t.push(n),this.id++,this.setState({polylines:t,active_polyline:n})}},{key:"selectLayer",value:function(e){var t=this;this.state.active_polyline&&this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"}),this.setState({active_polyline:this.getPolylineById(e)},function(){t.state.polylines.forEach(function(e){e.el.classList.remove("active")}),t.state.active_polyline.el.classList.toggle("active")})}},{key:"unselect_polyline",value:function(e){console.log(e.code),"Escape"!==e.code&&"KeyQ"!==e.code||(this.state.active_polyline&&(this.state.active_polyline.el.classList.remove("active"),this.state.active_polyline.stopEditing({code:"Escape"}),this.state.active_polyline.editing&&this.state.active_polyline.stopEditingPoints({code:"Escape"}),this.state.active_polyline.breaking_mode&&this.exitBreakLineMode({code:"Escape"})),this.setState({active_polyline:void 0}),Object(m.g)(this.state.polylines),this.checkProfile("int_prof"),this.checkProfile("out_prof"),this.new_point.added&&this.removeCursorPoint(),this.state.polylines.forEach(function(e){e.points.length<2&&(this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.id})}),this.canvas.removeChild(e.el))}.bind(this)))}},{key:"globalStopEditingMode",value:function(){this.state.polylines.forEach(function(e){e.el.classList.remove("active")}),this.state.active_polyline&&this.state.active_polyline.stopEditing({code:"Escape"})}},{key:"addNotification",value:function(e){this.setState({notification:{id:this.not_id,message:e}}),this.not_id++}},{key:"getPolylineById",value:function(e){return this.state.polylines.filter(function(t){return t.id===e})[0]}},{key:"addCursorPoint",value:function(){this.canvas.appendChild(this.new_point.el),this.new_point.added=!0,this.new_point.select()}},{key:"removeCursorPoint",value:function(){this.canvas.removeChild(this.new_point.el),this.new_point.added=!1}},{key:"updateToDo",value:function(e,t){var n=this.state.toDo;n[e]=t,this.setState({toDo:n})}},{key:"checkProfile",value:function(e){var t=this.state.polylines.filter(function(t){return t.type===e});if(0===t.length)this.updateToDo(e,!1),"int_prof"===e&&this.inner_poly&&(this.canvas.removeChild(this.inner_poly),this.inner_poly=null,this.setState({vessel_capacity:null})),this.vessel_poly&&(this.canvas.removeChild(this.vessel_poly),this.vessel_poly=null,this.setState({vessel_volume:null}));else if(1===t.length)this.updateToDo(e,!0);else{this.updateToDo(e,!1);var n="int_prof"===e?"internal profile":"outer profile";this.addNotification("There should be only one "+n)}}},{key:"joinIntExt",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type})[0],t=this.state.polylines.filter(function(e){return"out_prof"===e.type})[0];if(!e||!t)return void this.addNotification("To calculate vessel volume you need both internal and outer profiles");if(this.vesselVolume=Object(m.f)(e,t),!this.vesselVolume)return void this.addNotification("To calculate vessel volume internal and outer profiles have to share at least one vertex");this.vessel_poly&&this.canvas.removeChild(this.vessel_poly),this.vessel_poly=Object(m.d)(this.vesselVolume,"rgba(170, 170, 170, 0.6)");var n=Object(m.b)(this.vesselVolume,this.scale);this.setState({vessel_volume:n}),this.canvas.appendChild(this.vessel_poly)}},{key:"create_inner_polygon",value:function(){var e=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(0===e.length)return void this.addNotification("To calculate vessel capacity you need an internal profile");if(this.inner_poly&&this.canvas.removeChild(this.inner_poly),this.innerPolygon=Object(m.e)(e[0].points.slice()),this.inner_poly=Object(m.d)(this.innerPolygon,"rgba(210, 204, 78, 0.28)"),this.scale){var t=Object(m.b)(this.innerPolygon,this.scale);this.setState({vessel_capacity:t})}else this.addNotification("Can't measure, define scale first");this.canvas.appendChild(this.inner_poly)}},{key:"metricForm",value:function(e){var t=this;e.ref_unit?(this.updateToDo("ref_unit",!0),this.setState({metric_value:e.value,metric_unit:e.unit},function(){t.metric&&2===t.metric.points.length&&(t.scale=Object(m.a)(t.metric,t.state.metric_value,t.state.metric_unit),t.innerPolygon&&t.setState({vessel_capacity:Object(m.b)(t.innerPolygon,t.scale)}),t.vesselVolume&&t.setState({vessel_volume:Object(m.b)(t.vesselVolume,t.scale)}))})):(this.updateToDo("ref_unit",!1),this.scale=null)}},{key:"defineMaxFill",value:function(){this.maxFill&&(this.canvas.removeChild(this.maxFill.el),this.updateToDo("maxFill",!1)),this.maxFill=new c.a({points:[],id:"max_fill",type:"max_fill",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"})}},{key:"addMaxFill",value:function(e){this.maxFill.stroke="rgb(0, 255, 21)",this.maxFill.add_point(e),this.canvas.appendChild(this.maxFill.el),this.maxFill.draw(),this.maxFill.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMaxFill),this.maxFill.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.maxFill=this.maxFill.points[0].cy,this.updateToDo("maxFill",!0)}},{key:"defineMetric",value:function(){this.unselect_polyline({code:"Escape"}),this.metric&&(this.canvas.removeChild(this.metric.el),this.updateToDo("metric",!1)),this.metric=new c.a({points:[],id:"metric",type:"metric",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addMetric),this.metric.stopEditing({code:"Escape"})}},{key:"addMetric",value:function(e){0===this.metric.points.length?this.metric.add_point(e):1===this.metric.points.length&&(this.metric.add_point(e),this.metric.stroke="red",this.metric.stopEditing({code:"Escape"}),this.metric.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addMetric),this.updateToDo("metric",!0),this.removeCursorPoint(),this.state.metric_value&&this.state.metric_unit&&(this.scale=Object(m.a)(this.metric,this.state.metric_value,this.state.metric_unit)),this.innerPolygon&&this.setState({vessel_capacity:Object(m.b)(this.innerPolygon,this.scale)}),this.vesselVolume&&this.setState({vessel_volume:Object(m.b)(this.vesselVolume,this.scale)}))}},{key:"definerotAxis",value:function(){this.rotAxis&&(this.canvas.removeChild(this.rotAxis.el),window.r_axis=null,this.updateToDo("rotAxis",!1)),this.addCursorPoint(),this.canvas.addEventListener("dblclick",this.addRotAxis)}},{key:"addRotAxis",value:function(e){this.rotAxis=new c.a({points:[],id:this.id,type:"center",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),this.rotAxis.stroke="#ff5a00",this.rotAxis.add_point(e),this.canvas.appendChild(this.rotAxis.el),this.rotAxis.draw(),this.rotAxis.el.classList.remove("active"),this.canvas.removeEventListener("dblclick",this.addRotAxis),this.rotAxis.stopEditing({code:"Escape"}),this.removeCursorPoint(),window.r_axis=this.rotAxis.points[0].cx,this.updateToDo("rotAxis",!0)}},{key:"colorChange",value:function(e,t){var n=this.getPolylineById(e);n.stroke=t,n.draw()}},{key:"typeChange",value:function(e,t){var n=this;this.setState({polylines:this.state.polylines.map(function(n){return n.id===e?(n.type=t,n):n})},function(){n.checkProfile("int_prof"),n.checkProfile("out_prof")})}},{key:"delete_line",value:function(){var e=this;if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:this.state.polylines.filter(function(t){return t.id!==e.state.active_polyline.id}),active_polyline:void 0},function(){e.checkProfile("int_prof"),e.checkProfile("out_prof"),Object(m.g)(e.state.polylines)})}},{key:"edit_line",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");this.state.active_polyline.editLine()}},{key:"enterBreakLineMode",value:function(){if(this.globalStopEditingMode(),!this.state.active_polyline)return void this.addNotification("No line selected");if(this.state.active_polyline.points.length<=2)return void this.addNotification("Line has two or less vertices and can't be subdivided");var e=this.state.active_polyline;e.breaking_mode=!0,this.setState({active_polyline:e});var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.breakLine)),t++}.bind(this))}},{key:"exitBreakLineMode",value:function(e){if(("Escape"===e.code||"KeyQ"===e.code)&&this.state.active_polyline.breaking_mode){var t=0;this.state.active_polyline.points.forEach(function(e){t>0&&t!==this.state.active_polyline.points.length-1&&(e.el.removeEventListener("click",this.breakLine),this.canvas.removeChild(e.el)),t++}.bind(this));var n=this.state.active_polyline;n.breaking_mode=!1,this.setState({active_polyline:n})}}},{key:"breakLine",value:function(e){var t=this,n=[e.target.getAttribute("cx"),e.target.getAttribute("cy")];this.exitBreakLineMode({code:"Escape"});var r=this.state.polylines,i=new c.a({points:[],id:this.id,type:"other",selected:!1,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.state.active_polyline.points.forEach(function(e){i.appendPoint([e.cx,e.cy]),e.cx===parseFloat(n[0])&&e.cy===parseFloat(n[1])&&(i.el.classList.remove("active"),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),i=new c.a({points:[],id:this.id,type:"other",selected:!0,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()}),i.appendPoint([e.cx,e.cy]))}.bind(this)),r.push(i),this.id++,i.draw(),i.stopEditing({code:"Escape"}),this.state.active_polyline.stopEditing({code:"Escape"}),this.canvas.removeChild(this.state.active_polyline.el),this.setState({polylines:r.filter(function(e){return e.id!==t.state.active_polyline.id}),active_polyline:i})}},{key:"image_rotate",value:function(e){this.bck_image.style.transform="rotate("+e.target.value+"deg)"}},{key:"fileChangedHandler",value:function(e){var t=e.target.value.split("\\");t=t[t.length-1],this.setState({img_name:t});var n=new Image;n.src=window.URL.createObjectURL(e.target.files[0]),n.onload=function(){var e=n.naturalWidth,t=n.naturalHeight,r=this.state.toDo;r.image=!0,this.setState({img_w:e,img_h:t,selectedFile:n.src,toDo:r})}.bind(this)}},{key:"download_svg",value:function(){var e=this;if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");var t=this.state.selectedFile;this.state.img_name?this.setState({selectedFile:this.state.img_name.replace("href")},function(){b(e.svg.outerHTML,"dlText.svg","text/plain"),e.setState({selectedFile:t})}):b(this.svg.outerHTML,"myVessel.svg","text/plain")}},{key:"download_dxf",value:function(){if(0===this.state.polylines.length)return void this.addNotification("No polylines to export");if(!this.scale)return void this.addNotification("You need to define a reference scale before export");var e=n(97),t={models:{}},r=1;this.state.polylines.forEach(function(n){var i=n.el.getAttribute("points"),o=e.model.mirror(new e.models.ConnectTheDots(!1,i),!1,!0);o=e.model.scale(o,this.scale/10),t.models["my-"+r+"-line"]=o,r++}.bind(this)),t.units=e.units.Meter;var i=e.exporter.toDXF(t,{units:e.unitType.Meter});b(i,"myVessel.dxf","text/plain")}},{key:"download_json",value:function(){var e=void 0,t=this.state.polylines.filter(function(e){return"int_prof"===e.type});if(!(t.length>0))return void this.addNotification("No inner profile to export");if(t=t[0],!this.scale)return void this.addNotification("You need to define a reference scale before export");e=[],t.points.forEach(function(t){e.push([t.cx*this.scale/10,t.cy*this.scale/10*-1])}.bind(this)),e=JSON.stringify(e);var n='{ "type": "Feature",\n "geometry": {\n "type": "LineString",\n "coordinates": '+e+'\n },\n "properties": {\n "title": "myVessel",\n "description": "",\n "author": "'+void 0+'"\n }\n }';this.addNotification("Export completed"),b(n,"myVessel.json","text/plain")}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{id:"container"},s.a.createElement(h.a,{notification:this.state.notification}),s.a.createElement("h2",null,"Draw"),s.a.createElement("section",{id:"drawing"},s.a.createElement("svg",{id:"drawing-canvas",height:"500",width:"100%",ref:function(t){e.svg=t}},s.a.createElement("g",{className:"svg-pan-zoom_viewport",id:"canvas"},s.a.createElement("image",{ref:function(t){e.bck_image=t},id:"bck-img",href:this.state.selectedFile,x:"0",y:"0",height:this.state.img_h,width:this.state.img_w}))),s.a.createElement("div",{className:"tools"},s.a.createElement("div",{id:"actions-title"},"Actions:"),s.a.createElement("div",{className:"interface-button",onClick:this.create_new_polyline.bind(this),title:"Create new line",alt:"Create new line"},"New"),s.a.createElement("div",{className:"interface-button",onClick:this.enterBreakLineMode.bind(this),title:"Break selected line",alt:"Break selected line"},"Break"),s.a.createElement("div",{className:"interface-button",onClick:this.delete_line.bind(this),title:"Delete selected line",alt:"Delete selected line"},"Delete"),s.a.createElement("div",{className:"interface-button",onClick:this.edit_line.bind(this),title:"Edit selected line",alt:"Edit selected line"},"Edit"),s.a.createElement("div",{id:"actions-title2"},"Export:"),s.a.createElement("div",{className:"interface-button",onClick:this.download_svg.bind(this),title:"Download SVG (no scaling)",alt:"Download SVG (no scaling)"},"SVG"),s.a.createElement("div",{className:"interface-button",onClick:this.download_dxf.bind(this),title:"Download all-lines as DXF (scaled: 1 unit = 1 meter)",alt:"Download all-lines as DXF (scaled: 1 unit = 1 meter)"},"DXF"),s.a.createElement("div",{className:"interface-button",onClick:this.download_json.bind(this),title:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)",alt:"Download inner-profile as JSON (scaled: 1 unit = 1 meter)"},"JSON"))),s.a.createElement("section",{id:"polylines"},s.a.createElement("div",{id:"layer-title"},"Layers:"),this.state.toDo.image&&s.a.createElement("div",{id:"image-layer",className:"polyline-layer"},s.a.createElement("div",{className:"slidecontainer"},s.a.createElement("label",{htmlFor:"myRange"},"Rotate image"),s.a.createElement("input",{type:"number",min:"0",max:"360",defaultValue:"0",className:"slider",id:"myRange",step:"0.01",onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(t){return s.a.createElement(p.a,{key:t.id,name:t.name,type:t.type,id:t.id,delete_line:e.delete_line.bind(e),edit_line:e.edit_line.bind(e),colorChange:e.colorChange.bind(e),typeChange:e.typeChange.bind(e),selectLayer:e.selectLayer.bind(e),selectedPoly:e.state.active_polyline?e.state.active_polyline.id:""})})),s.a.createElement("div",{className:"basic-info"},"Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ",s.a.createElement("code",null,"Esc")," or ",s.a.createElement("code",null,"q")," to quit editing mode and deselect."),s.a.createElement(d.a,{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),s.a.createElement(v.a,{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}))}}]),t}(a.Component);t.a=w},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(29),o=n(79),a=n(30),s=function(){function e(e,t){for(var n=0;n0&&this.points.length>e&&t.cx!==this.points[e-1].cx&&t.cy!==this.points[e-1].cy){var n=new o.a([(t.cx+this.points[e-1].cx)/2,(t.cy+this.points[e-1].cy)/2],e,this.zoom);this.midpoints.push(n)}e++}.bind(this)),this.midpoints.forEach(function(e){this.canvas.appendChild(e.el),e.draw(),e.el.addEventListener("click",this.create)}.bind(this))}},{key:"create",value:function(e){var t=e.target.getAttribute("index"),n=new i.a([parseFloat(e.target.getAttribute("cx")),parseFloat(e.target.getAttribute("cy"))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(t,n)}},{key:"addPointInMiddle",value:function(e,t){this.points.splice(e,0,t),this.canvas.appendChild(t.el),t.draw(),t.edit(),t.select(),this.draw()}},{key:"pointsTo",value:function(){var e="";return this.points.forEach(function(t){e+=t.cx+", "+t.cy+" "}),e}},{key:"add_point",value:function(e){var t=this.get_point(e);if("max_fill"===this.type){var n=[-1e6,t[1]];return this.appendPoint(n),n=[1e6,t[1]],void this.appendPoint(n)}if("center"===this.type){var r=[t[0],-1e6];return this.appendPoint(r),r=[t[0],1e6],void this.appendPoint(r)}this.appendPoint(t)}},{key:"appendPoint",value:function(e){window.snapping_points.push([e[0],e[1]]);var t=new i.a([e[0],e[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(t),this.draw(),1===this.points.length&&(window.addEventListener("mousemove",this.previewPoint),window.addEventListener("keyup",this.stopEditing))}},{key:"get_point",value:function(e){var t=this.canvas.transform.baseVal[0].matrix,n=[(e.pageX-t.e-this.x)/t.a,(e.pageY-t.f-this.y)/t.a];return this.snapPoint(n)}},{key:"snapPoint",value:function(e){var t=25/window.zoom,n=[];return window.snapping_points.forEach(function(r){if(e[0]+t>r[0]&&e[0]-tr[1]&&e[1]-t0&&(n.sort(function(e,t){return e.dist-t.dist}),e=n[0].point),window.r_axis&&e[0]+t>window.r_axis&&e[0]-window.r_axis1&&Object(o.a)(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var o=n(84);t.a=function(e){if((n=e.length)<3)return null;var t,n,o=new Array(n),a=new Array(n);for(t=0;t=0;--t)f.push(e[o[s[t]][2]]);for(t=+u;ts!==u>s&&a<(l-n)*(s-r)/(u-r)+n&&(c=!c),l=n,u=r;return c}},function(e,t,n){"use strict";t.a=function(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],s=o[1],l=0;++r=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var e=this;this.wheelListener=function(t){return e.handleMouseWheel(t)},r.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(r.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!1)},l.prototype.handleMouseWheel=function(e){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var t=e.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in e&&0===e.deltaMode&&e.wheelDelta&&(t=0===e.deltaY?0:Math.abs(e.wheelDelta)/e.deltaY),t=-.30?1:-1)*Math.log(Math.abs(t)+10)/r;var i=this.svg.getScreenCTM().inverse(),o=a.getEventPoint(e,this.svg).matrixTransform(i),s=Math.pow(1+this.options.zoomScaleSensitivity,-1*t);this.zoomAtPoint(s,o)}},l.prototype.zoomAtPoint=function(e,t,n){var r=this.viewport.getOriginalState();n?(e=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,e)),e/=this.getZoom()):this.getZoom()*ethis.options.maxZoom*r.zoom&&(e=this.options.maxZoom*r.zoom/this.getZoom());var i=this.viewport.getCTM(),o=t.matrixTransform(i.inverse()),a=this.svg.createSVGMatrix().translate(o.x,o.y).scale(e).translate(-o.x,-o.y),s=i.multiply(a);s.a!==i.a&&this.viewport.setCTM(s)},l.prototype.zoom=function(e,t){this.zoomAtPoint(e,a.getSvgCenterPoint(this.svg,this.width,this.height),t)},l.prototype.publicZoom=function(e,t){t&&(e=this.computeFromRelativeZoom(e)),this.zoom(e,t)},l.prototype.publicZoomAtPoint=function(e,t,n){if(n&&(e=this.computeFromRelativeZoom(e)),"SVGPoint"!==o.getType(t)){if(!("x"in t&&"y"in t))throw new Error("Given point is invalid");t=a.createSVGPoint(this.svg,t.x,t.y)}this.zoomAtPoint(e,t,n)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(e){return e*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var e=this.viewport.getOriginalState();this.zoom(e.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),this.options.controlIconsEnabled){if((e.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control")>-1)return!1}var t;t=e.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=a.getEventPoint(e,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(t,n)},l.prototype.handleMouseDown=function(e,t){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),o.mouseAndTouchNormalize(e,this.svg),this.options.dblClickZoomEnabled&&o.isDblClick(e,t)?this.handleDblClick(e):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(e){if(this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var t=a.getEventPoint(e,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(t.x-this.stateOrigin.x,t.y-this.stateOrigin.y);this.viewport.setCTM(n)}},l.prototype.handleMouseUp=function(e){this.options.preventMouseEventsDefault&&(e.preventDefault?e.preventDefault():e.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var e=this.viewport.getViewBox(),t=Math.min(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.contain=function(){var e=this.viewport.getViewBox(),t=Math.max(this.width/e.width,this.height/e.height);this.zoom(t,!0)},l.prototype.center=function(){var e=this.viewport.getViewBox(),t=.5*(this.width-(e.width+2*e.x)*this.getZoom()),n=.5*(this.height-(e.height+2*e.y)*this.getZoom());this.getPublicInstance().pan({x:t,y:n})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(e){var t=this.viewport.getCTM();t.e=e.x,t.f=e.y,this.viewport.setCTM(t)},l.prototype.panBy=function(e){var t=this.viewport.getCTM();t.e+=e.x,t.f+=e.y,this.viewport.setCTM(t)},l.prototype.getPan=function(){var e=this.viewport.getState();return{x:e.x,y:e.y}},l.prototype.resize=function(){var e=a.getBoundingClientRectNormalized(this.svg);this.width=e.width,this.height=e.height;var t=this.viewport;t.options.width=this.width,t.options.height=this.height,t.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var e=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var t in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var e=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return e.options.panEnabled=!0,e.pi},disablePan:function(){return e.options.panEnabled=!1,e.pi},isPanEnabled:function(){return!!e.options.panEnabled},pan:function(t){return e.pan(t),e.pi},panBy:function(t){return e.panBy(t),e.pi},getPan:function(){return e.getPan()},setBeforePan:function(t){return e.options.beforePan=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnPan:function(t){return e.options.onPan=null===t?null:o.proxy(t,e.publicInstance),e.pi},enableZoom:function(){return e.options.zoomEnabled=!0,e.pi},disableZoom:function(){return e.options.zoomEnabled=!1,e.pi},isZoomEnabled:function(){return!!e.options.zoomEnabled},enableControlIcons:function(){return e.options.controlIconsEnabled||(e.options.controlIconsEnabled=!0,i.enable(e)),e.pi},disableControlIcons:function(){return e.options.controlIconsEnabled&&(e.options.controlIconsEnabled=!1,i.disable(e)),e.pi},isControlIconsEnabled:function(){return!!e.options.controlIconsEnabled},enableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!0,e.pi},disableDblClickZoom:function(){return e.options.dblClickZoomEnabled=!1,e.pi},isDblClickZoomEnabled:function(){return!!e.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return e.enableMouseWheelZoom(),e.pi},disableMouseWheelZoom:function(){return e.disableMouseWheelZoom(),e.pi},isMouseWheelZoomEnabled:function(){return!!e.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return e.options.zoomScaleSensitivity=t,e.pi},setMinZoom:function(t){return e.options.minZoom=t,e.pi},setMaxZoom:function(t){return e.options.maxZoom=t,e.pi},setBeforeZoom:function(t){return e.options.beforeZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},setOnZoom:function(t){return e.options.onZoom=null===t?null:o.proxy(t,e.publicInstance),e.pi},zoom:function(t){return e.publicZoom(t,!0),e.pi},zoomBy:function(t){return e.publicZoom(t,!1),e.pi},zoomAtPoint:function(t,n){return e.publicZoomAtPoint(t,n,!0),e.pi},zoomAtPointBy:function(t,n){return e.publicZoomAtPoint(t,n,!1),e.pi},zoomIn:function(){return this.zoomBy(1+e.options.zoomScaleSensitivity),e.pi},zoomOut:function(){return this.zoomBy(1/(1+e.options.zoomScaleSensitivity)),e.pi},getZoom:function(){return e.getRelativeZoom()},setOnUpdatedCTM:function(t){return e.options.onUpdatedCTM=null===t?null:o.proxy(t,e.publicInstance),e.pi},resetZoom:function(){return e.resetZoom(),e.pi},resetPan:function(){return e.resetPan(),e.pi},reset:function(){return e.reset(),e.pi},fit:function(){return e.fit(),e.pi},contain:function(){return e.contain(),e.pi},center:function(){return e.center(),e.pi},updateBBox:function(){return e.updateBBox(),e.pi},resize:function(){return e.resize(),e.pi},getSizes:function(){return{width:e.width,height:e.height,realZoom:e.getZoom(),viewBox:e.viewport.getViewBox()}},destroy:function(){return e.destroy(),e.pi}}),this.publicInstance};var c=[],f=function(e,t){var n=o.getSvg(e);if(null===n)return null;for(var r=c.length-1;r>=0;r--)if(c[r].svg===n)return c[r].instance.getPublicInstance();return c.push({svg:n,instance:new l(n,t)}),c[c.length-1].instance.getPublicInstance()};e.exports=f},function(e,t){e.exports=function(){function e(e,t,n){var r=function(e){!e&&(e=window.event);var n={originalEvent:e,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,delatZ:0,preventDefault:function(){e.preventDefault?e.preventDefault():e.returnValue=!1}};return"mousewheel"==u?(n.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(n.deltaX=-.025*e.wheelDeltaX)):n.deltaY=e.detail,t(n)};return f.push({element:e,fn:r,capture:n}),r}function t(e,t){for(var n=0;n2096103.424&&v!==d))return navigator.msSaveBlob?navigator.msSaveBlob(i(f),m):o(f);f=i(f),c=f.type||u}else if(/([\x80-\xff])/.test(f)){var g=0,b=new Uint8Array(f.length),w=b.length;for(g;g0?[e.substr(0,n),e.substr(n+1)]:["",e]}function splitDecimal(e){var t=e.toString();return t.indexOf("e")>0&&(t=e.toFixed(20).match(/.*[^(0+$)]/)[0]),split(t,".")}function round(e,t){if(void 0===t&&(t=1e-7),e%1===0)return e;var n=1-String(Math.ceil(1/t)).length;if("undefined"===typeof n||0===+n)return Math.round(e);if(e=+e,n=+n,isNaN(e)||"number"!==typeof n||n%1!==0)return NaN;if(e<0)return-round(-e,t);var r=split(e.toString(),"e");return e=Math.round(+(r[0]+"e"+(r[1]?+r[1]-n:-n))),r=split(e.toString(),"e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}function createRouteKey(e){for(var t=[],n=0;n0?".":"")+i:JSON.stringify([i]),t.push(r)}return t.join("")}function travel(e,t){if(!e||!t)return null;var n;n=Array.isArray(t)?t:JSON.parse(t);for(var r=n.slice(),i=e,o=e.origin||[0,0];r.length;){if(!(i=i[r.shift()]))return null;i.origin&&r.length&&(o=MakerJs.point.add(o,i.origin))}return{result:i,offset:o}}function cloneObject(e){return clone(e)}function extendObject(e,t){if(e&&t)for(var n in t)"undefined"!==typeof t[n]&&(e[n]=t[n]);return e}function isFunction(e){return"function"===typeof e}function isNumber(e){return"number"===typeof e}function isObject(e){return"object"===typeof e}function isPoint(e){return e&&Array.isArray(e)&&2==e.length&&isNumber(e[0])&&isNumber(e[1])}function isPath(e){return e&&e.type&&isPoint(e.origin)}function isPathLine(e){return isPath(e)&&e.type==MakerJs.pathType.Line&&isPoint(e.end)}function isPathCircle(e){return isPath(e)&&e.type==MakerJs.pathType.Circle&&isNumber(e.radius)}function isPathArc(e){return isPath(e)&&e.type==MakerJs.pathType.Arc&&isNumber(e.radius)&&isNumber(e.startAngle)&&isNumber(e.endAngle)}function isPathArcInBezierCurve(e){return isPathArc(e)&&isObject(e.bezierData)&&isNumber(e.bezierData.startT)&&isNumber(e.bezierData.endT)}function isModel(e){return e&&(e.paths||e.models)}function isChain(e){var t=e;return t&&t.links&&Array.isArray(t.links)&&isNumber(t.pathLength)}function $(e){return isModel(e)?new Cascade(MakerJs.model,e):isPath(e)?new Cascade(MakerJs.path,e):isPoint(e)?new Cascade(MakerJs.point,e):void 0}MakerJs.version="debug",MakerJs.environmentTypes={BrowserUI:"browser",NodeJs:"node",WebWorker:"worker",Unknown:"unknown"},MakerJs.environment=detectEnvironment(),MakerJs.unitType={Centimeter:"cm",Foot:"foot",Inch:"inch",Meter:"m",Millimeter:"mm"},MakerJs.splitDecimal=splitDecimal,MakerJs.round=round,MakerJs.createRouteKey=createRouteKey,MakerJs.travel=travel;var clone=__webpack_require__(98);MakerJs.cloneObject=cloneObject,MakerJs.extendObject=extendObject,MakerJs.isFunction=isFunction,MakerJs.isNumber=isNumber,MakerJs.isObject=isObject,MakerJs.isPoint=isPoint,MakerJs.isPath=isPath,MakerJs.isPathLine=isPathLine,MakerJs.isPathCircle=isPathCircle,MakerJs.isPathArc=isPathArc,MakerJs.isPathArcInBezierCurve=isPathArcInBezierCurve,MakerJs.pathType={Line:"line",Circle:"circle",Arc:"arc",BezierSeed:"bezier-seed"},MakerJs.isModel=isModel,MakerJs.isChain=isChain;var Cascade=function(){function e(e,t){this._module=e,this.$initial=t;for(var n in this._module)this._shadow(n);this.$result=t}return e.prototype._shadow=function(e){var t=this;this[e]=function(){return t._apply(t._module[e],arguments)}},e.prototype._apply=function(e,t){var n=[].slice.call(t);return n.unshift(this.$result),this.$result=e.apply(void 0,n),this},e.prototype.$reset=function(){return this.$result=this.$initial,this},e}();MakerJs.$=$}(MakerJs||(MakerJs={})),module.exports=MakerJs;var MakerJs;!function(e){!function(t){function n(t){return e.splitDecimal(t)[1]}function r(t,n){return n?+(e.splitDecimal(t)[0]+"."+n):t}function i(e,t){return e<0&&t<0||e>0&&t>0?r(t,n(e)):t}function o(e){var t=Math.floor(e/360);return 0===t?e:i(e,e-360*t)}function a(e){return o(e)*Math.PI/180}function s(e){return 180*e/Math.PI}function l(e){if(e.endAngle360?o(i):i}function f(e){return o(s(h(e.origin,e.end)))}function p(e,t){return s(h(e,t))}function h(t,n){var r=e.point.subtract(n,t),i=r[0],o=r[1];return Math.atan2(-o,-i)+Math.PI}function d(e,t,n){return n&&(e=360-e),t&&(e=(e<180?180:540)-e),e}function v(e,t){if(e){var n=e.walkedPath.pathContext,r=y[n.type];if(r)return r(n,t,e.reversed)}}function m(e,t){if(arguments.length<2)return null;var n=[e,t].map(function(e,t){return v(e,0===t)}),r=o(f(n[1])-f(n[0]));return r>180&&(r-=360),r}t.noRevolutions=o,t.toRadians=a,t.toDegrees=s,t.ofArcEnd=l,t.ofArcMiddle=u,t.ofArcSpan=c,t.ofLineInDegrees=f,t.ofPointInDegrees=p,t.ofPointInRadians=h,t.mirror=d;var y={};y[e.pathType.Arc]=function(t,n,r){var i=n!=r,o=i?t.endAngle-90:t.startAngle+90,a=e.point.fromArc(t)[i?1:0],s=e.point.rotate(e.point.add(a,[t.radius,0]),o,a);return new e.paths.Line(n?[s,a]:[a,s])},y[e.pathType.Line]=function(t,n,r){return r?new e.paths.Line(t.end,t.origin):t},t.ofChainLinkJoint=m}(e.angle||(e.angle={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=i(e);if(!t)return r;for(var o=2;o--;)n?r[o]-=t[o]:r[o]+=t[o];return r}function r(e,t){function n(n){return(e[n]+t[n])/2}return[n(0),n(1)]}function i(e){return e?[e[0],e[1]]:t.zero()}function o(t,n){for(var r={index:0,distance:-1},i=0;i=o?null:(i(t,o,n,r),t)}return null}function m(t,n){if(1==n)return[e.point.middle(t)];var r=[],i=n;t.type!=e.pathType.Circle&&i--;for(var o=0;op[0].size?p.push(s):p.unshift(s);s=p[l?1:0]}this.origin=s.origin,this.startAngle=s.startAngle,this.endAngle=s.endAngle;break;case 4:this.origin=n[0],this.radius=n[1],this.startAngle=n[2],this.endAngle=n[3];break;case 3:if(e.isPoint(n[2])){r.apply(this,n);for(var d=[],h=0;h<3;h++)d.push(e.angle.ofPointInDegrees(this.origin,n[h]));this.startAngle=d[0],this.endAngle=d[2],e.measure.isBetweenArcAngles(d[1],this,!1)||(this.startAngle=d[2],this.endAngle=d[0]);break}case 2:var u=n[2];r.call(this,n[0],n[1]),this.startAngle=e.angle.ofPointInDegrees(this.origin,n[u?1:0]),this.endAngle=e.angle.ofPointInDegrees(this.origin,n[u?0:1])}this.type=e.pathType.Arc}return t}();t.Arc=n;var r=function(){function t(){for(var t=[],n=0;n0){for(var m=null,y=0;!m&&y1&&e(n.key,n.items)}},e}();e.Collector=t;var n=__webpack_require__(103),r=function(){function t(){this.reset()}return t.prototype.reset=function(){this.insertedCount=0,this.graph={},this.index={},this.merged={},this.values=[]},t.prototype.insertValue=function(e){return this.values.push(e),this.values.length-1},t.prototype.insertValueIdAtPoint=function(e,t){var n=t[0],r=t[1];this.graph[n]||(this.graph[n]={});var i,o,a=this.graph[n],s=r in a;return s?(o=a[r],o in this.merged&&(o=this.merged[o]),i=this.index[o],i.valueIds.push(e)):(a[r]=o=this.insertedCount++,i={pointId:o,point:t,valueIds:[e]},this.index[o]=i),{existed:s,pointId:o}},t.prototype.mergePoints=function(e){var t=this,r=[],i=[];for(var o in this.index){var a=this.index[o],s=a.point;a.kdId=r.length,r.push(s),i.push(a)}this.kdbush=n(r);var l=this;for(var o in this.index)!function(n){if(n in l.merged)return"continue";var r=l.index[n];l.kdbush.within(r.point[0],r.point[1],e).forEach(function(e){e!==r.kdId&&t.mergeIndexElements(r,i[e])})}(o)},t.prototype.mergeNearestSinglePoints=function(t){var r=this,i=[];for(var o in this.index){var a=this.index[o];1===a.valueIds.length&&i.push(a)}this.kdbush=n(i.map(function(e){return e.point})),i.forEach(function(n){if(!(n.pointId in r.merged)){var o=r.kdbush.within(n.point[0],n.point[1],t),a=[];o.forEach(function(t){var r=i[t];r.pointId!==n.pointId&&a.push({el:r,distance:e.measure.pointDistance(r.point,n.point)})}),a.sort(function(e,t){return e.distance-t.distance});for(var s=0;s0?r.mergeIndexElements(l,n):r.mergeIndexElements(n,l))}}})},t.prototype.mergeIndexElements=function(e,t){return e.merged=e.merged||[],e.merged.push(t.pointId),this.merged[t.pointId]=e.pointId,e.valueIds.push.apply(e.valueIds,t.valueIds),delete this.index[t.pointId],e.pointId},t.prototype.forEachPoint=function(e){for(var t=this,n=0;n0&&e(r.point,r.valueIds.map(function(e){return t.values[e]}),n,r)}}},t.prototype.getIdOfPoint=function(e){var t=this.graph[e[0]];if(t){var n=t[e[1]];if(n>=0)return n in this.merged?this.merged[n]:n}},t.prototype.getElementAtPoint=function(e){var t=this.getIdOfPoint(e);if(t>=0)return this.index[t]},t}();e.PointGraph=r}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){var r=0;do{var i=e[r];do{for(var o=!1,a=r+1;a0?(n.origin=o.low,n.end=o.high):(n.origin[0]=o.low[0],n.end[0]=o.high[0]):(n.origin[1]=o.low[1],n.end[1]=o.high[1])})}),r}t.simplify=r}(e.model||(e.model={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){if(!e)return null;var r=null,o=i[e.type];return o&&(r=o(e,t,n),r.origin=e.origin),r}function r(t,n,r,i){var o=e.angle.ofArcSpan(t),a=1;o>=270?a=4:o>180?a=3:(o>150||n)&&(a=2);for(var s=e.angle.toRadians(o/a),l=e.models.Polygon.circumscribedRadius(t.radius,s),u=e.point.fromArc(t),c=[e.point.subtract(u[0],t.origin)],f=e.angle.toRadians(t.startAngle)+s/2,p=0;p=0))return!1;return!0}function v(t){var n=t.end[0]-t.origin[0];if(0==e.round(n,1e-6))return{line:t,hasSlope:!1};var r=t.end[1]-t.origin[1],i=r/n;return{line:t,hasSlope:!0,slope:i,yIntercept:t.origin[1]-i*t.origin[0]}}function m(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function y(e,t,n){return[n(e[0],t[0]),n(e[1],t[1])]}function g(t,n){if(t){var r=N[t.type];if(r){var i=r(t);return n&&(i.high=e.point.add(i.high,n),i.low=e.point.add(i.low,n)),i}}return{low:null,high:null}}function b(e){if(e){var t=I[e.type];if(t)return t(e)}return 0}function w(t){var n=0;return e.model.walk(t,{onPath:function(e){n+=b(e.pathContext)}}),n}function x(t){return{high:e.point.clone(t.high),low:e.point.clone(t.low)}}function k(t,r){function i(t,i){if(i){var o=t.slice(0,-2),a=e.createRouteKey(o);a in r.modelMap?n(r.modelMap[a],i):r.modelMap[a]=x(i)}}r||(r=new j(t));var o={onPath:function(e){e.routeKey in r.pathMap||(r.pathMap[e.routeKey]=g(e.pathContext,e.offset)),i(e.route,r.pathMap[e.routeKey])},afterChildWalk:function(e){i(e.route,r.modelMap[e.routeKey])}};e.model.walk(t,o),r.modelsMeasured=!0;var a=r.modelMap[""];return a?E(a):a}function E(t){var n=t;return n.center=e.point.average(n.high,n.low),n.width=n.high[0]-n.low[0],n.height=n.high[1]-n.low[1],n}function _(e,t){return t>=e?t-e:t<0?t+e:t}function P(e,t){return e.slope*t+e.yIntercept}function C(e,t){return[t,P(v(e),t)]}function T(n){for(var r=1;r<3;r++)if(!t.isPointEqual(n[0].center,n[r].center,1e-6)||0!==e.round(n[0].width-n[r].width))return!1;return!0}function S(t,n,r,i){e.model.rotate(n,r);var o=k(n),a={index:t,rotation:i,center:e.point.rotate(o.center,i),width:o.height,height:o.width,bottom:new e.paths.Line(o.low,[o.high[0],o.low[1]]),middle:new e.paths.Line([o.low[0],o.center[1]],[o.high[0],o.center[1]]),top:new e.paths.Line(o.high,[o.low[0],o.high[1]])};return[a.top,a.middle,a.bottom].forEach(function(t){return e.path.rotate(t,i)}),a}function A(t,n){var r=t[1].origin,i=r[0],o=t[3].origin[0],a=t[0].origin[0],s=i-a;if(a-o>2*s)return null;var l=(i-o)/3;if(sp[1]?0:1,d=p[h];if(d>c){var v=e.solvers.equilateralAltitude(d),m=i-2*v;if(a>m+v)return null;if(o=u.height)return n(c,u.center,"solved by bound "+o.length);o.push(u)}if(T(o))return n(e.solvers.equilateralSide(o[0].width/2),o[0].center,"solved as circular");var f=o.map(function(e){return e.top}).concat(o.map(function(e){return e.bottom}));f.forEach(function(t,n){a.paths[n]=t,e.path.converge(f[_(6,n+2)],t,!0)}),o.forEach(function(e,t){a.paths["m"+t]=e.middle});for(var p,h=o.slice(),d=0;d<6;d++){d>0&&(f.push(f.shift()),h.push(h.shift()),e.model.rotate(a,-60));var v=A(f,h);v&&(!p||v.radius=o+n.radius||n.radius>=o+t.radius)return null;if(r&&t.radius+n.radius>=o)return null;var a;if(r||0!=e.round(t.radius-n.radius)){var s=o/2,l=new e.paths.Circle([s,0],s),u=new e.paths.Circle(t.radius>n.radius?[0,0]:[o,0],r?t.radius+n.radius:Math.abs(t.radius-n.radius)),c=e.path.intersection(u,l);if(!c||!c.path1Angles)return null;a=c.path1Angles}else a=[90,270];var f=e.angle.ofLineInDegrees(i);return a.map(function(t){return e.angle.noRevolutions(t+f)})}var s=Math.sqrt(3)/2;t.equilateralAltitude=n,t.equilateralSide=r,t.solveTriangleSSS=i,t.solveTriangleASA=o,t.circleTangentAngles=a}(e.solvers||(e.solvers={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,n,r,i){var o=r?[n.path2Offset,n.path1Offset]:[n.path1Offset,n.path2Offset];t.moveTemporary(e,o,i)}function r(e){var t=e.path1Angles;return e.path2Angles?e.path1Angles=e.path2Angles:delete e.path1Angles,t&&(e.path2Angles=t),e}function i(e,t,n){if(void 0===n&&(n={}),e&&t){var r=c[e.type][t.type];if(r)return r(e,t,n)}return null}function o(e,t){for(var n=2;n--;)if(e[n]===t)return n}function a(t,n){for(var r=[],i=0;i=180?u-360:u;t.rotate(l,-c,e.point.zero());var f=e.round(l.origin[1]),p=Math.abs(f);if(p>s)return null;var h=[];if(p==s){if(i.excludeTangents)return null;h.push(o(f>0?90:270))}else{var d=Math.asin(f/s),v=e.angle.toDegrees(d),m=Math.cos(d)*s;a(-m,180-v),a(m,v)}return h.length>0?h:null}function u(n,r,i){function o(t){var n=t+u;return e.angle.noRevolutions(n)}function a(t){return[o(t),o(e.angle.mirror(t,!1,!0))]}if(n.radius<=0||r.radius<=0)return null;if(n.radius==r.radius&&e.measure.isPointEqual(n.origin,r.origin,1e-4))return i.out_AreOverlapped=!0,null;var s=(e.point.subtract(e.point.zero(),n.origin),new e.paths.Circle(e.point.zero(),n.radius)),l=new e.paths.Circle(e.point.subtract(r.origin,n.origin),r.radius),u=e.angle.ofPointInDegrees(e.point.zero(),l.origin);t.rotate(l,-u,e.point.zero());var c=l.origin[0];if(0==e.round(l.radius-c-s.radius))return i.excludeTangents?null:[[o(180)],[o(180)]];if(0==e.round(l.radius+c-s.radius))return i.excludeTangents?null:[[o(0)],[o(0)]];if(0==e.round(c-l.radius-s.radius))return i.excludeTangents?null:[[o(0)],[o(180)]];if(e.round(c-l.radius)>s.radius)return null;if(e.round(c+l.radius)1))return!1;i[s].shardPoint=l.intersectionPoints[1]}}return!0}function o(e,n){var r=t.clone(e);return[r,t.breakAtPoint(r,n)]}function a(e,t,n){var r=null,i=d[e.path.type];return i&&(r=i(e.path,t,n,e.shardPoint,e.isStart)),r}function s(e,t,n){var r=null,i=v[e.path.type];return i&&(r=i(e.path,e.propertyName,t,n)),u(e,r)||(r=null),r}function l(t,n){var r={filletAngle:e.angle.ofPointInDegrees(n,t.shardPoint),clipPath:function(){t.path[t.propertyName]=t.shardPoint}};return u(t,r)||(r=null),r}function u(t,n){var r=!1;if(n){var i=t.path[t.propertyName];n.clipPath(),e.measure.pathLength(t.path)>0&&(r=!0),t.path[t.propertyName]=i}return r}function c(t){for(var n=0,r=[],i=0;i0){var s={pointMatchingDistance:.005};e.extendObject(s,a);var u=r(t,n,a);if(u){var f=c([t,n]),p=new e.paths.Line(u[0].oppositePoint,u[1].oppositePoint),h=e.point.middle(p,f),d=e.angle.ofPointInDegrees(u[0].point,h),v=e.point.add(u[0].point,e.point.fromPolar(e.angle.toRadians(d),o));if(!i(o,v,u,s))return null;for(var m=[],y=0;y<2;y++){var g=l(u[y],v);if(!g)return null;m.push(g)}var b=new e.paths.Arc(v,o,m[0].filletAngle,m[1].filletAngle);return e.round(e.angle.noRevolutions(e.angle.ofArcMiddle(b)))==e.round(d)&&(b.startAngle=m[1].filletAngle,b.endAngle=m[0].filletAngle),m[0].clipPath(),m[1].clipPath(),b}}return null}function p(n,o,l,u){if(n&&o&&l&&l>0){var c={pointMatchingDistance:.005};e.extendObject(c,u);var f=r(n,o,u);if(f){if(!i(l,f[0].point,f,c))return null;for(var p=[],h=0;h<2;h++){var d=f[1-h].shardPoint;if(!d)return null;var v=a(f[h],l,d);p.push(v)}var m=t.intersection(p[0],p[1]);if(m){var y;y=1==m.intersectionPoints.length?m.intersectionPoints[0]:e.point.closest(f[0].point,m.intersectionPoints);for(var g=[],h=0;h<2;h++){var b=s(f[h],l,y);if(!b)return null;g.push(b)}if(0==e.round(g[0].filletAngle-g[1].filletAngle))return null;var w=new e.paths.Arc(y,l,g[0].filletAngle,g[1].filletAngle),x=e.angle.ofArcSpan(w);return 180==x?null:(x>180&&(w.startAngle=g[1].filletAngle,w.endAngle=g[0].filletAngle),g[0].clipPath(),g[1].clipPath(),w)}}}return null}var h={};h[e.pathType.Arc]=function(e){return["startAngle","endAngle"]},h[e.pathType.Line]=function(e){return["origin","end"]};var d={};d[e.pathType.Arc]=function(t,n,r,i,a){var s=t.radius,l=o(t,i)[a?0:1];return l?(e.measure.isArcConcaveTowardsPoint(l,r)?s-=n:s+=n,e.round(s)<=0?null:new e.paths.Arc(t.origin,s,t.startAngle,t.endAngle)):null},d[e.pathType.Line]=function(t,n,r,i,o){return new e.paths.Parallel(t,n,r)};var v={};v[e.pathType.Arc]=function(t,n,r,i){var o=new e.paths.Line(t.origin,i),a=e.angle.ofLineInDegrees(o),s=a;return e.measure.isArcConcaveTowardsPoint(t,i)||(s+=180),{filletAngle:e.angle.noRevolutions(s),clipPath:function(){t[n]=a}}},v[e.pathType.Line]=function(n,r,i,o){var a=new e.paths.Line([0,0],[0,1]),s=e.angle.ofLineInDegrees(n);t.rotate(a,s,[0,0]),t.moveRelative(a,o);var l=e.point.fromSlopeIntersection(n,a);return l?{filletAngle:e.angle.ofPointInDegrees(o,l),clipPath:function(){n[r]=l}}:null},t.dogbone=f,t.fillet=p}(e.path||(e.path={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){return i(!1,e,t)}function r(e,t){return i(!0,e,t)}function i(t,n,r){function i(n,i){var l=s[n].walkedPath,u=s[i].walkedPath;l.modelContext===u.modelContext&&l.modelContext.type==e.models.BezierCurve.typeName||e.path.moveTemporary([l.pathContext,u.pathContext],[l.offset,u.offset],function(){var c;if(e.isObject(r)){var f=e.angle.ofChainLinkJoint(s[n],s[i]);if(0===e.round(f))return;c=f>0?r.left:r.right}else c=r;if(c&&!(c<0)){var p;p=t?e.path.fillet(l.pathContext,u.pathContext,c):e.path.dogbone(l.pathContext,u.pathContext,c),p&&(o.paths["fillet"+a]=p,a++)}})}for(var o={paths:{}},a=0,s=n.links,l=1;l1&&(r.endless=!0);break}t=u}}e.forEachPoint(function(e,n,o,a){if(a.valueIds.length>0){var s={links:[],pathLength:0};if(i(n[0],s,n[0]),s.endless)t(s,!1);else{s.links.reverse();var l=s.links[0];s.links.map(function(e){e.reversed=!e.reversed}),s.pathLength-=s.links[s.links.length-1].pathLength;i(s.links.pop(),s,l),s.links.length>1?t(s,!0):r(s.links[0].walkedPath)}}})}function i(e){var t=null;return a(e,function(e,n,r){t=e[0]},{byLayers:!1}),t}function o(e,t){var n=t===e.reversed?1:0;return e.endPoints[n]}function a(n){for(var i=[],a=1;a0){r.tempPaths=r.paths;var s={};a.forEach(function(e,t){e.layer=o,s["seed_"+t]=e}),r.paths=s}}}else"tempPaths"in r&&(r.paths=r.tempPaths,delete r.tempPaths),"tempLayer"in r&&(void 0==r.tempLayer?delete r.layer:r.layer=r.tempLayer,delete r.tempLayer)})}t.findSingleChain=i,t.findChains=a}(e.model||(e.model={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(e,t){if(void 0===t&&(t=1),e.endless){for(var n=Math.abs(t),r=0;r0&&n(e,r),e}}function o(t,n){void 0===n&&(n=!1);for(var r={paths:{}},i=0;i0;){var h=l/p;if(c.reversed&&(h=1-h),o.push(e.point.add(e.point.middle(f.pathContext,h),f.offset)),r&&o.length>=r)return o;var d;if(i){if(d=i[s],++s>i.length)return o}else d=n;l+=d}l-=p}return a(t.endless,o),o}function l(t,n){for(var r=[],i=0;i0){o.reversed&&l.reverse(),i>0&&l.shift();var u=l.map(function(t){return e.point.add(t,s.offset)});r.push.apply(r,u)}}return a(t.endless,r),r}t.cycle=n,t.reverse=r,t.startAt=i,t.toNewModel=o,t.toPoints=s,t.toKeyPoints=l}(e.chain||(e.chain={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n,i){var o={pointMatchingDistance:t||.005,keep:n},a=new r(e,o),s=a.findDeadEnds();return s.length0&&this.appendQueue(o,n)},n.prototype.removeValue=function(e,t){var n=e.valueIds.indexOf(t);n>=0&&e.valueIds.splice(n,1)},n.prototype.appendQueue=function(e,t){var n=this.ordinals[e.pointId];n":">",'"':"""};for(var n in t)e=e.split(n).join(t[n]);return e},e.prototype.getOpeningTag=function(t){var n="";for(var r in this.attrs)!function(t,r){null!=r&&"undefined"!==typeof r&&((Array.isArray(r)||"object"===typeof r)&&(r=JSON.stringify(r)),"string"===typeof r&&(r=e.escapeString(r)),n+=" "+t+'="'+r+'"')}(r,this.attrs[r]);return"<"+this.name+n+(t?"/":"")+">"},e.prototype.getInnerText=function(){return this.innerTextEscaped?this.innerText:e.escapeString(this.innerText)},e.prototype.getClosingTag=function(){return""},e.prototype.toString=function(){return this.innerText||this.closingTags?this.getOpeningTag(!1)+this.getInnerText()+this.getClosingTag():this.getOpeningTag(!0)},e}();e.XmlTag=t}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(e,t,n){return n?e+"("+t+")":t}function r(t,n){if(n){var r=new e.paths.Circle([0,0],t.radius),i=e.measure.pathLength(r);if(i)return Math.ceil(i/n)}}function i(t,i,o){function a(e){f?l=e+l:l+=e}var s="",l="",u=!0,c=!1,f=!1,p={};p[e.pathType.Circle]=function(t,a){var l={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),resolution:r(t,i)};s=n("CAG.circle",JSON.stringify(l),!0),c=!0},p[e.pathType.Line]=function(t,r){var i=r.endPoints.map(function(t){return e.point.rounded(t,o)});r.reversed&&i.reverse(),s=n("new CSG.Path2D",JSON.stringify(i),!0)},p[e.pathType.Arc]=function(t,a){var l=e.angle.ofArcEnd(t);a.reversed&&(f=!0);var u={center:e.point.rounded(e.point.add(t.origin,a.walkedPath.offset),o),radius:e.round(t.radius,o),startangle:e.round(t.startAngle,o),endangle:e.round(l,o),resolution:r(t,i)};s=n("new CSG.Path2D.arc",JSON.stringify(u),!0)};var h={};h[e.pathType.Line]=function(t,r){var i=f!=r.reversed,s=e.point.rounded(r.endPoints[i?0:1],o);a(n(".appendPoint",JSON.stringify(s),!0))},h[e.pathType.Arc]=function(t,s){var l=f!=s.reversed,u=e.angle.ofArcEnd(t),c={radius:e.round(t.radius,o),clockwise:l,large:Math.abs(u-t.startAngle)>180,resolution:r(t,i)},p=e.point.rounded(s.endPoints[l?0:1],o);a(n(".appendArc",JSON.stringify(p)+","+JSON.stringify(c),!0))};for(var d=0;d0&&r.subtracts.push(i)}c.total++,e in u||(u[e]=[]),u[e].unshift(r)}})}void 0===o&&(o={});var u={},c={total:0,complete:0},f={pointMatchingDistance:o.pointMatchingDistance,byLayers:o.byLayers,contain:!0};o.statusCallback&&o.statusCallback({progress:25});var p=e.model.findChains(i,f);if(Array.isArray(p))l("",p);else for(var h in p)l(h,p[h]);o.statusCallback&&o.statusCallback({progress:50});var d=0;for(var h in u)d+=u[h].length;if(0===d)throw o.statusCallback&&o.statusCallback({progress:100}),"No closed geometries found.";var v={};for(var h in u){var m=u[h].map(function(e){var t=e.cag;return e.subtracts.forEach(function(e){var n=a(50,50,e);t=r(t,n)}),t});v[h]=a(50,50,m)}return o.statusCallback&&o.statusCallback({progress:100}),f.byLayers?v:v[""]}function l(e,t,n){function r(n){return a(e,t,n)}function i(e,t,n){var r=e.extrude({offset:[0,0,t]});return n&&(r=r.translate([0,0,n])),r}function o(e,t){return e.union(t)}return u(r,i,o,t,n)}function u(t,n,r,i,a){void 0===a&&(a={});var s=a.statusCallback;i.exporterOptions&&e.extendObject(a,i.exporterOptions.toJscadCSG),a.byLayers=a.byLayers||a.layerOptions&&!0,a.statusCallback=o(s,0,50);var l=t(a),u=[];if(a.byLayers)for(var c in l){var f=a.layerOptions[c],p=n(l[c],f.extrude||a.extrude,function(t,n){return e.isNumber(t)?t:n}(f.z,a.z));u.push(p)}else{var p=n(l,a.extrude,a.z);u.push(p)}a.statusCallback=o(s,50,100);var h={total:u.length-1,complete:0},d=u.shift();return u.forEach(function(e,t){d=r(d,e),h.complete++,a.statusCallback({progress:h.complete/h.total})}),d}function c(e,t){function n(e,n){return c(i(e,n,t.accuracy))}function r(e,t){return e+".union("+t+")"}function o(e,t){return e+".subtract("+t+")"}function a(i){return s(n,r,o,e,t)}function l(e,t,n){var r=e+".extrude({ offset: [0, 0, "+t+"] })";return n&&(r=r+".translate([0, 0, "+n+"])"),r}function c(e){return""+p+f+e+p}void 0===t&&(t={});var f=new Array((t.indent||0)+1).join(" "),p=t.indent?"\n":"",h=u(a,l,r,e,t).trim();return"function "+(t.functionName||"main")+"(){"+c("return "+h+";")+"}"+p}function f(e,t,n,r){var i=r.statusCallback;r.statusCallback=o(i,0,50);var a=l(e,n,r);return t.serialize(a,{binary:!1,statusCallback:o(i,50,50)})}t.toJscadCAG=a,t.toJscadCSG=l,t.toJscadScript=c,t.toJscadSTL=f}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(n,r,i){if(r){var o={origin:[0,0],stroke:"#000"};e.extendObject(o,i);var a=1,s=o.units||r.units;a=s?e.units.conversionScale(s,e.unitType.Inch):.01,a*=72;var l=e.model.scale(e.cloneObject(r),a),u=e.measure.modelExtents(l),c=-u.low[0],f=[c,u.high[1]];f=e.point.add(f,i.origin),e.model.findChains(l,function(r,i,a){function s(e){var r=t.pathToSVGPathData(e.pathContext,e.offset,f);n.path(r).stroke(o.stroke)}r.map(function(r){if(r.links.length>1){var i=t.chainToSVGPathData(r,f);n.path(i).stroke(o.stroke)}else{var a=r.links[0].walkedPath;if(a.pathContext.type===e.pathType.Circle){var l;e.path.moveTemporary([a.pathContext],[a.offset],function(){l=e.path.mirror(a.pathContext,!1,!0)}),e.path.moveRelative(l,f),n.circle(l.origin[0],l.origin[1],a.pathContext.radius).stroke(o.stroke)}else s(a)}}),i.map(s)},{byLayers:!1})}}t.toPDF=n}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){function n(t){return e.point.mirror(t,!1,!0)}function r(t){var n=e.angle.ofArcSpan(t);t.startAngle=e.angle.noRevolutions(t.startAngle),t.endAngle=t.startAngle+n}function i(t,r,i){function o(t){return e.point.add(t,r)}for(var a=t.links[0],s=o(n(a.endPoints[a.reversed?1:0])),l=["M",e.round(s[0],i),e.round(s[1],i)],u=0;u1){var a=i(e,n,o);s[r].push(a)}else l(e.links[0].walkedPath,t);e.contains&&u(e.contains,!t)})}s[r]=[],u(e,!0),t.forEach(function(e){return l(e)})},r),s}function l(t){for(var n=[],r=1;r0?(t in T||(T[t]=[]),T[t].push(e)):C.push(e)}function l(e){function t(e,t){void 0!==t&&n.push(e+":"+t)}var n=[];return t("stroke",e.stroke),t("stroke-width",e.strokeWidth),t("fill",e.fill),n.join(";")}function u(t,n){n&&e.extendObject(t,{stroke:n.stroke,"stroke-width":n.strokeWidth,fill:n.fill,style:n.cssStyle||l(n)})}function h(e){return E.layerOptions&&E.layerOptions[e]?E.layerOptions[e]:e in t.colors?{stroke:e}:void 0}function d(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=!1),"text"!==e&&u(n,h(r)),E.scalingStroke||(n["vector-effect"]="non-scaling-stroke");var s=new t.XmlTag(e,n);s.closingTags=E.closingTags,i&&(s.innerText=i),a(s.toString(),r,o)}function v(t){var r=n(t);return e.point.scale(r,E.scale)}function m(t,n){var r=e.path.mirror(t,!1,!0);return e.path.moveRelative(e.path.scale(r,E.scale),n)}function y(t,n,r){d("text",{id:t+"_text",x:e.round(n[0],E.accuracy),y:e.round(n[1],E.accuracy)},r,t)}function g(t,n,r,i,o,a,s,l,u){d("path",{id:t,"data-route":a,d:["M",e.round(n,E.accuracy),e.round(r,E.accuracy)].concat(i).join(" ")},o),l&&y(t,s,o)}function b(e,t,n,r,i,o,a){var s=c(n,E.accuracy);g(e,t[0],t[1],s,r,i,t,o,a)}function w(t,n,r,i,o){Z[e.pathType.Circle]("",new e.paths.Circle(r,t.size/2),n,"flow",null,!1,null);var a=[-1*t.size,t.size/2];[a,e.point.mirror(a,!1,!0)].map(function(t){return new e.paths.Line(e.point.add(e.point.rotate(t,o),i),i)}).forEach(function(t){return Z[e.pathType.Line]("",t,n,"flow",null,!1,null)})}function x(e,t){H.attrs={id:e},a(H.getOpeningTag(!1),t.layer)}function k(e){a(H.getClosingTag(),e.layer)}var E={accuracy:.001,annotate:!1,origin:null,scale:1,stroke:"#000",strokeLineCap:"round",strokeWidth:"0.25mm",fill:"none",fillRule:"evenodd",fontSize:"9pt",useSvgPathOnly:!0,viewBox:!0};e.extendObject(E,o);var _,P=e.isModel(i);P&&(_=i,_.exporterOptions&&e.extendObject(E,_.exporterOptions.toSVG));var C=[],T={};if(P)_=i;else if(Array.isArray(i)){var S={};i.forEach(function(e,t){S[t]=e}),_={paths:S}}else e.isPath(i)&&(_={paths:{modelToMeasure:i}});var A=e.measure.modelExtents(_);if(!E.units){var M=t.tryGetModelUnits(i);M&&(E.units=M)}var O=t.svgUnit[E.units];if(O&&E.viewBox&&(E.scale*=O.scaleConversion),A&&!E.origin){var R=-A.low[0]*E.scale;E.origin=[R,A.high[1]*E.scale]}e.extendObject(o,E);var z;if(A&&E.viewBox){var L=e.round(A.width*E.scale,E.accuracy),N=e.round(A.height*E.scale,E.accuracy),I=[0,0,L,N],j=O?O.svgUnitType:"";z={width:L+j,height:N+j,viewBox:I.join(" ")}}var D=new t.XmlTag("svg",e.extendObject(z||{},E.svgAttrs));a(D.getOpeningTag(!1));var B={id:"svgGroup","stroke-linecap":E.strokeLineCap,"fill-rule":E.fillRule,"font-size":E.fontSize};u(B,E);var U=new t.XmlTag("g",B);if(a(U.getOpeningTag(!1)),E.useSvgPathOnly){var F={byLayers:!0};"nonzero"===E.fillRule&&(F.contain={alternateDirection:!0});var J=s(_,E.origin,F,E.accuracy);for(var V in J){var q=J[V].join(" "),W={d:q};V.length>0&&(W.id=V),d("path",W,V,null,!0)}}else{var Z={};Z[e.pathType.Line]=function(t,n,r,i,o,a,s){var l=n.origin,u=n.end;d("line",{id:t,class:i,"data-route":o,x1:e.round(l[0],E.accuracy),y1:e.round(l[1],E.accuracy),x2:e.round(u[0],E.accuracy),y2:e.round(u[1],E.accuracy)},r),a&&y(t,e.point.middle(n),r),s&&w(s,r,n.origin,n.end,e.angle.ofLineInDegrees(n))},Z[e.pathType.Circle]=function(t,n,r,i,o,a,s){var l=n.origin;d("circle",{id:t,class:i,"data-route":o,r:n.radius,cx:e.round(l[0],E.accuracy),cy:e.round(l[1],E.accuracy)},r),a&&y(t,l,r)},Z[e.pathType.Arc]=function(t,n,i,o,a,s,l){r(n);var u=e.point.fromArc(n);if(e.measure.isPointEqual(u[0],u[1]))b(t,n.origin,n.radius,i,a,s,l);else{var c=["A"];p(c,n.radius,u[1],E.accuracy,e.angle.ofArcSpan(n)>180,n.startAngle>n.endAngle),g(t,u[0][0],u[0][1],c,i,a,e.point.middle(n),s,l),l&&w(l,i,u[1],u[0],e.angle.noRevolutions(n.startAngle-90))}},Z[e.pathType.BezierSeed]=function(t,n,r,i,o,a,s){var l=[];f(l,n,E.accuracy),g(t,n.origin[0],n.origin[1],l,r,o,e.point.middle(n),a,s)};var H=new t.XmlTag("g"),Y={beforeChildWalk:function(e){return x(e.childId,e.childModel),!0},onPath:function(t){var n=Z[t.pathContext.type];if(n){var r=e.point.add(v(t.offset),E.origin);n(t.pathId,m(t.pathContext,r),t.layer,null,t.route,E.annotate,E.flow)}},afterChildWalk:function(e){k(e.childModel)}};x("0",_),e.model.walk(_,Y);for(var K in T){var X=new t.XmlTag("g",{id:K});u(X.attrs,h(K));for(var G=0;G180,r?t.startAngle>t.endAngle:t.startAngle180,t.startAngle>t.endAngle),o(i[0],a,n)},d[e.pathType.BezierSeed]=function(e,t){var n=[];return f(n,e,t),o(e.origin,n,t)},t.pathToSVGPathData=a,t.toSVGPathData=l,t.toSVG=u,t.svgUnit={},t.svgUnit[e.unitType.Inch]={svgUnitType:"in",scaleConversion:1},t.svgUnit[e.unitType.Millimeter]={svgUnitType:"mm",scaleConversion:1},t.svgUnit[e.unitType.Centimeter]={svgUnitType:"cm",scaleConversion:1},t.svgUnit[e.unitType.Foot]={svgUnitType:"in",scaleConversion:12},t.svgUnit[e.unitType.Meter]={svgUnitType:"cm",scaleConversion:100}}(e.exporter||(e.exporter={}))}(MakerJs||(MakerJs={})),function(e){!function(t){function n(n,r){function i(e){l.paths||(l.paths={}),l.paths["p_"+ ++d]=e}function o(e){l.models||(l.models={}),l.models["p_"+ ++d]=e}function a(t,n){void 0===n&&(n=0);var r=e.point.mirror([t.data[0+n],t.data[1+n]],!1,!0);return t.absolute?r:e.point.add(r,t.from)}function s(t,n){return e.measure.isPointEqual(t.from,n)||i(new e.paths.Line(t.from,n)),n}void 0===r&&(r={});var l={},u={};u.M=function(e){return p=a(e)},u.Z=function(e){return s(e,p)},u.H=function(t){var n=e.point.clone(t.from);return t.absolute?n[0]=t.data[0]:n[0]+=t.data[0],s(t,n)},u.V=function(t){var n=e.point.clone(t.from);return t.absolute?n[1]=-t.data[0]:n[1]-=t.data[0],s(t,n)},u.L=function(e){return s(e,a(e))},u.A=function(t){var n=t.data[0],s=t.data[1],l=t.data[2],u=1===t.data[3],c=1===t.data[4],f=a(t,5),p=n!==s,h=new e.paths.Line(t.from,e.point.rotate(f,l,t.from));p&&(h=e.path.distort(h,1,n/s));var d=new e.paths.Arc(h.origin,h.end,n,u,c);if(p){if(n1&&t.push.apply(t,e.controls[1]),t.push.apply(t,e.end),n(),new Bezier(t)}function a(t){var n=t.extrema().values.map(function(t){return e.round(t)}).filter(function(e,t,n){return n.indexOf(e)===t}).sort();return 0===n.length?[0,1]:(0!==n[0]&&n.unshift(0),1!==n[n.length-1]&&n.push(1),n)}function s(e){return[e.x,e.y]}function l(t,n,r,i,o){function a(r){var a=n+l*r,u=s(t.get(a)),c=e.point.middle(i,o?1-r:r);return e.measure.pointDistance(c,u)}var l=r-n;return a(.25)+a(.75)}function u(t,n,r,i){for(var o,a,u,c=new v(t,n),f=new v(t,r),p=f,h=c,d=0,m=p;d<100;){var y=s(t.get((c.t+m.t)/2));try{o=new e.paths.Arc(c.point,y,m.point)}catch(e){if(a)return a;break}void 0===u&&(u=e.measure.isPointEqual(c.point,e.point.fromAngleOnCircle(o.endAngle,o)));if(l(t,n,m.t,o,u)<=i?(o.bezierData={startT:n,endT:m.t},h=m,a=o):p=m,h.t===p.t||a&&a!==o&&e.angle.ofArcSpan(o)-e.angle.ofArcSpan(a)<.5)return a;d++,m=new v(t,(h.t+p.t)/2)}var g=new e.paths.Line(c.point,m.point);return g.bezierData={startT:n,endT:m.t},g}function c(t,n,r,i,o,a){for(var s,l=0;iu[1]&&l.reverse();for(var c=2;c--;)if(!e.measure.isPointEqual(l[c],s[c].point))return null;return n.bezierData}function p(t,n,r,i){var o=[n.links[0],n.links[n.links.length-1]];o[0].walkedPath.pathContext.bezierData.startT>o[1].walkedPath.pathContext.bezierData.startT&&(e.chain.reverse(n),o.reverse());var a=o.map(function(e){return f(t,e.walkedPath.pathContext,e.endPoints,e.walkedPath.offset)}),s={startT:a[0]?a[0].startT:null,endT:a[1]?a[1].endT:null};return null!==s.startT&&null!==s.endT?s:n.links.length>2?(null===s.startT&&(i(n.links[0].walkedPath.pathContext,r,!0),s.startT=n.links[1].walkedPath.pathContext.bezierData.startT),null===s.endT&&(i(n.links[n.links.length-1].walkedPath.pathContext,r,!0),s.endT=n.links[n.links.length-2].walkedPath.pathContext.bezierData.endT),s):null}var h,d=!1,v=function(){function t(t,n,r){this.t=n,this.point=e.point.add(s(t.get(n)),r)}return t}(),m=function(){function t(){for(var t=[],n=0;n2&&s(a.length-1,0,!0)}return t}();t.ConnectTheDots=r,r.metaParameters=[{title:"closed",type:"bool",value:!0},{title:"points",type:"select",value:[[[0,0],[40,40],[60,20],[100,100],[60,60],[40,80]],[[0,0],[100,0],[50,87]],[-10,0,10,0,0,20],"-10 0 10 0 0 20"]}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function n(e,r,i,o){this.paths={},this.paths=new t.ConnectTheDots(!0,n.getPoints(e,r,i,o)).paths}return n.circumscribedRadius=function(e,t){return e/Math.cos(t/2)},n.getPoints=function(t,r,i,o){void 0===i&&(i=0),void 0===o&&(o=!1);var a=[],s=e.angle.toRadians(i),l=2*Math.PI/t;o&&(r=n.circumscribedRadius(r,l));for(var u=0;u0&&(this.paths.TopLeft=new e.paths.Arc([-a,s],r,90,180),this.paths.TopRight=new e.paths.Arc([a,s],r,0,90)),a&&(this.paths.Top=new e.paths.Line([-a,n],[a,n]))}return t}();t.Dome=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:25},{title:"bottomless",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(){for(var t=[],n=0;n0&&(this.paths.BottomLeft=new e.paths.Arc([o,o],o,180,270),this.paths.BottomRight=new e.paths.Arc([l,o],o,270,0),this.paths.TopRight=new e.paths.Arc([l,u],o,0,90),this.paths.TopLeft=new e.paths.Arc([o,u],o,90,180)),l-o>0&&(this.paths.Bottom=new e.paths.Line([o,0],[l,0]),this.paths.Top=new e.paths.Line([l,i],[o,i])),u-o>0&&(this.paths.Right=new e.paths.Line([r,o],[r,u]),this.paths.Left=new e.paths.Line([0,u],[0,o]))}return t}();t.RoundRectangle=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100},{title:"radius",type:"range",min:0,max:50,value:11}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t,n){this.paths={},this.paths=new e.RoundRectangle(t,n,Math.min(n/2,t/2)).paths}return t}();e.Oval=t,t.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this;this.paths={};var l;if(a&&(l={models:{}},this.models={Caps:l}),!(i<=0||r<=0)&&(t=e.angle.noRevolutions(t),n=e.angle.noRevolutions(n),0!=e.round(t-n))){n0;f&&c("Inner",-i);var p=[];p.push(u("StartCap",t,180,0)),p.push(u("EndCap",n,0,180));if(e.measure.pointDistance(p[0].origin,p[1].origin)/2n?(i=r(l,u),o=270,a=360-e.angle.toDegrees(Math.acos(u/i)),s=[0,i]):(i=r(u,l),o=180-e.angle.toDegrees(Math.asin(l/i)),a=180,s=[i,0]);var c=new e.paths.Arc(s,i,o,a);this.paths.curve_start=c,this.paths.curve_end=e.path.moveRelative(e.path.mirror(c,!0,!0),[t,n])}return t}();t.SCurve=n,n.metaParameters=[{title:"width",type:"range",min:1,max:100,value:50},{title:"height",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(t){var n=function(){function t(t,n,r,i){void 0===i&&(i=!1);var o=this;this.paths={};var a;i&&(a={models:{}},this.models={Caps:a});var s=function(e,t){var n;i?(n={paths:{}},a.models[e]=n):n=o,n.paths[e]=t},l=e.angle.ofPointInDegrees(t,n),u=e.measure.pointDistance(t,n);this.paths.Top=new e.paths.Line([0,r],[u,r]),this.paths.Bottom=new e.paths.Line([0,-r],[u,-r]),s("StartCap",new e.paths.Arc([0,0],r,90,270)),s("EndCap",new e.paths.Arc([u,0],r,270,90)),e.model.rotate(this,l,[0,0]),this.origin=t}return t}();t.Slot=n,n.metaParameters=[{title:"origin",type:"select",value:[[0,0],[10,0],[10,10]]},{title:"end",type:"select",value:[[80,0],[0,30],[10,30]]},{title:"radius",type:"range",min:1,max:50,value:10}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(t){this.paths={},this.paths=new e.Rectangle(t,t).paths}return t}();e.Square=t,t.metaParameters=[{title:"side",type:"range",min:1,max:100,value:100}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={}));var MakerJs;!function(e){!function(e){var t=function(){function t(n,r,i,o){void 0===o&&(o=2),this.paths={},i||(i=r*t.InnerRadiusRatio(n,o));for(var a=e.Polygon.getPoints(n,r),s=e.Polygon.getPoints(n,i,180/n),l=[],u=0;u0&&t>1&&t0){var y,g={};y=c?{models:{deleted:c,char:f}}:f,e.model.combine(y,d,!1,!0,!1,!0,g),c=g.out_deleted[1]}u.models[p]=d,p++,f=d};t.forEachGlyph(r,0,0,i,l,h)}return n.glyphToModel=function(n,r,i){function o(e){u.paths||(u.paths={}),u.paths["p_"+ ++c]=e}function a(e){u.models||(u.models={}),u.models["p_"+ ++c]=e}var s,l,u={},c=0;return n.getPath(0,0,r).commands.map(function(n,r){var u=[[n.x,n.y],[n.x1,n.y1],[n.x2,n.y2]].map(function(t){if(void 0!==t[0])return e.point.mirror(t,!1,!0)});switch(n.type){case"M":s=u[0];break;case"Z":u[0]=s;case"L":e.measure.isPointEqual(l,u[0])||o(new e.paths.Line(l,u[0]));break;case"C":a(new t.BezierCurve(l,u[1],u[2],u[0],i));break;case"Q":a(new t.BezierCurve(l,u[1],u[0],i))}l=u[0]}),u},n}();t.Text=n,n.metaParameters=[{title:"font",type:"font",value:"*"},{title:"text",type:"text",value:"Hello"},{title:"font size",type:"range",min:10,max:200,value:72},{title:"combine",type:"bool",value:!1},{title:"center character origin",type:"bool",value:!1}]}(e.models||(e.models={}))}(MakerJs||(MakerJs={})),MakerJs.version="0.11.1";var Bezier=__webpack_require__(109)},function(e,t,n){(function(t){var n=function(){"use strict";function e(n,r,i,o){function s(n,i){if(null===n)return null;if(0==i)return n;var f,p;if("object"!=typeof n)return n;if(e.__isArray(n))f=[];else if(e.__isRegExp(n))f=new RegExp(n.source,a(n)),n.lastIndex&&(f.lastIndex=n.lastIndex);else if(e.__isDate(n))f=new Date(n.getTime());else{if(c&&t.isBuffer(n))return f=t.allocUnsafe?t.allocUnsafe(n.length):new t(n.length),n.copy(f),f;"undefined"==typeof o?(p=Object.getPrototypeOf(n),f=Object.create(p)):(f=Object.create(o),p=o)}if(r){var h=l.indexOf(n);if(-1!=h)return u[h];l.push(n),u.push(f)}for(var d in n){var v;p&&(v=Object.getOwnPropertyDescriptor(p,d)),v&&null==v.set||(f[d]=s(n[d],i-1))}return f}"object"===typeof r&&(i=r.depth,o=r.prototype,r.filter,r=r.circular);var l=[],u=[],c="undefined"!=typeof t;return"undefined"==typeof r&&(r=!0),"undefined"==typeof i&&(i=1/0),s(n,i)}function n(e){return Object.prototype.toString.call(e)}function r(e){return"object"===typeof e&&"[object Date]"===n(e)}function i(e){return"object"===typeof e&&"[object Array]"===n(e)}function o(e){return"object"===typeof e&&"[object RegExp]"===n(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=n,e.__isDate=r,e.__isArray=i,e.__isRegExp=o,e.__getRegExpFlags=a,e}();"object"===typeof e&&e.exports&&(e.exports=n)}).call(t,n(99).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"===typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function F(e){if(e=J(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function H(e){return X.toByteArray(F(e))}function Y(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var X=n(100),G=n(101),$=n(102);t.Buffer=o,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return l(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),G.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),G.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"===typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new p(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;c>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;oa?a:o+16383));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=u;for(var c=[],f=[],p="undefined"!==typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,v=h.length;d>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?p/l:p*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t,n,r,o){return new i(e,t,n,r,o)}function i(e,t,n,r,i){t=t||o,n=n||a,i=i||Array,this.nodeSize=r||64,this.points=e,this.ids=new i(e.length),this.coords=new i(2*e.length);for(var l=0;lr;){if(a-r>600){var l=a-r+1,u=n-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);i(e,t,n,Math.max(r,Math.floor(n-u*f/l+p)),Math.min(a,Math.floor(n+(l-u)*f/l+p)),s)}var h=t[2*n+s],d=r,v=a;for(o(e,t,r,n),t[2*a+s]>h&&o(e,t,r,a);dh;)v--}t[2*r+s]===h?o(e,t,r,v):(v++,o(e,t,v,a)),v<=n&&(r=v+1),n<=v&&(a=v-1)}}function o(e,t,n,r){a(e,n,r),a(t,2*n,2*r),a(t,2*n+1,2*r+1)}function a(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var f=u.pop(),p=u.pop(),h=u.pop();if(p-h<=a)for(var d=h;d<=p;d++)s=t[2*d],l=t[2*d+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[d]);else{var v=Math.floor((h+p)/2);s=t[2*v],l=t[2*v+1],s>=n&&s<=i&&l>=r&&l<=o&&c.push(e[v]);var m=(f+1)%2;(0===f?n<=s:r<=l)&&(u.push(h),u.push(v-1),u.push(m)),(0===f?i>=s:o>=l)&&(u.push(v+1),u.push(p),u.push(m))}}return c}t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,o,a){for(var s=[0,e.length-1,0],l=[],u=o*o;s.length;){var c=s.pop(),f=s.pop(),p=s.pop();if(f-p<=a)for(var h=p;h<=f;h++)i(t[2*h],t[2*h+1],n,r)<=u&&l.push(e[h]);else{var d=Math.floor((p+f)/2),v=t[2*d],m=t[2*d+1];i(v,m,n,r)<=u&&l.push(e[d]);var y=(c+1)%2;(0===c?n-o<=v:r-o<=m)&&(s.push(p),s.push(d-1),s.push(y)),(0===c?n+o>=v:r+o>=m)&&(s.push(d+1),s.push(f),s.push(y))}}return l}function i(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}t.a=r},function(e,t,n){function r(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}var i;r.prototype={constructor:r,Point:function(e,t){this.x=e,this.y=t},_findPolarAngle:function(e,t){var n,r;if(!e||!t)return 0;if(n=t.x-e.x,r=t.y-e.y,0==n&&0==r)return 0;var i=57.295779513082*Math.atan2(r,n);return this.reverse?0>=i&&(i+=360):i>=0&&(i+=360),i},addPoint:function(e,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(e,t)):this.anchorPoint.y>t&&this.anchorPoint.x>e||this.anchorPoint.y===t&&this.anchorPoint.x>e||this.anchorPoint.y>t&&this.anchorPoint.x===e?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(e,t))):void this.points.push(new this.Point(e,t))},_sortPoints:function(){var e=this;return this.points.sort(function(t,n){var r=e._findPolarAngle(e.anchorPoint,t),i=e._findPolarAngle(e.anchorPoint,n);return i>r?-1:r>i?1:0})},_checkPoints:function(e,t,n){var r=this._findPolarAngle(e,t),i=this._findPolarAngle(e,n);return r>i?!(r-i>180):!(i>r)||i-r>180},getHull:function(){var e,t,n=[];if(this.reverse=this.points.every(function(e){return e.x<0&&e.y<0}),e=this._sortPoints(),3>(t=e.length))return e.unshift(this.anchorPoint),e;for(n.push(e.shift(),e.shift());;){var r,i,o;if(n.push(e.shift()),r=n[n.length-3],i=n[n.length-2],o=n[n.length-1],this._checkPoints(r,i,o)&&n.splice(n.length-2,1),0==e.length){if(t==n.length){var a=this.anchorPoint;return n=n.filter(function(e){return!!e}),n.some(function(e){return e.x==a.x&&e.y==a.y})||n.unshift(this.anchorPoint),n}e=n,t=e.length,n=[],n.push(e.shift(),e.shift())}}}},n(108)&&(void 0!==(i=function(){return r}.call(t,n,t,e))&&(e.exports=i)),"undefined"!=typeof e&&(e.exports=r)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){e.exports=n(31)},function(e,t,n){!function(){"use strict";var t=n(32),r=function(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)};r.prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map(function(e){return t.pointsToString(e.points)}).join(", ")+"]"},addCurve:function(e){this.curves.push(e),this._3d=this._3d||e._3d},length:function(){return this.curves.map(function(e){return e.length()}).reduce(function(e,t){return e+t})},curve:function(e){return this.curves[e]},bbox:function(){for(var e=this.curves,n=e[0].bbox(),r=1;r2)for(a=0;a","\"","getOpeningTag","selfClose","attrName","attrValue","getInnerText","innerTextEscaped","getClosingTag","closingTags","wrap","content","facetSizeToResolution","arcOrCircle","facetSize","chainToJscadScript","reverseTail","tail","head","exit","beginMap","circleOptions","resolution","arcOptions","startangle","endangle","appendMap","large","makePhasedCallback","originalCb","phaseStart","phaseSpan","progress","toJscadCAG","jscadCAG","jsCadCagOptions","chainToJscadCag","fromPoints","jscadCagUnion","augend","addend","union","jscadCagSubtraction","minuend","subtrahend","convertChainsTo2D","convertToT","subtraction","unionize","complete","statusCallback","subtractChains","cs","subtracts","addChains","cag","adds","chainsResult","closedCount","resultMap","flatAdds","toJscadCSG","to2D","to3D","extrude","csg","union3D","convert2Dto3D","result2D","csgs","toJscadScript","_chainToJscadScript","scriptUnion","scriptSubtraction","nl","indent","functionName","toJscadSTL","CAG","stlSerializer","serialize","binary","toPDF","exportUnits","scaledModel","single","pathData","pathToSVGPathData","chainToSVGPathData","fixedPath","svgCoords","correctArc","offsetPoint","firstPoint","chainLinkToPathDataMap","startSvgPathData","pathToExport","exportOffset","clockwiseCircle","svgPathDataMap","getPathDataByLayer","pathDataByLayer","doChains","toSVGPathData","fillRule","findChainsOptions","pathDataArrayByLayer","pathDataStringByLayer","forcePush","layers","elements","cssStyle","elOpts","addSvgAttrs","stroke-width","tagname","scalingStroke","fixPoint","pointToFix","pointMirroredY","fixPath","pathToFix","drawText","textPoint","drawPath","annotate","flow","data-route","circleInPaths","svgCircleData","addFlowMarks","arrowEnd","beginModel","modelGroup","endModel","strokeLineCap","fontSize","useSvgPathOnly","itemToExportIsModel","unitSystem","useSvgUnit","svgUnit","scaleConversion","svgAttrs","svgUnitType","svgTag","groupAttrs","stroke-linecap","fill-rule","font-size","svgGroup","layerId1","class","svgArcData","svgBezierData","layerId2","layerGroup","halfCircle","sign","final","increasing","fromSVGPathData","pathCount","getPoint","cmd","lineTo","rx","ry","decreasing","elliptic","xAxis","scaleUp","control1","control2","prevControl2","command","control","prevControl","prevCommand","commandMatches","currPoint","regexpCommands","dataString","currCmd","layout","getChildPlacement","baseline","measureParent","parentTop","cpa","xMap","childMeasure","xRatio","cp","firstX","lastX","moveAndRotate","childrenOnPath","chosenPath","onPathLength","miterAngles","childrenOnChain","onChain","rotated","chainLength","relatives","absolutes","endLink","cloneToRadial","itemToClone","rotateFn","cloneTo","dimension","margin","measureFn","moveFn","cloneToColumn","cloneToRow","cloneToGrid","xCount","yCount","margins","getMargins","cloneToAlternatingRows","spacingFn","0","spacing","xMargin","cloneToBrick","yMargin","cloneToHoneycomb","hex","ensureBezierLib","hasLib","getScratch","bezierJsPoints","BezierToSeed","getIPoint","parentRange","seedToBezier","getExtrema","getError","arcReversed","tSpan","bp","ap","getLargestArc","lastGoodArc","TPoint","upper","lower","getArcs","getActualBezierRange","endpoints","tPoints","endpointDistancetoStart","getChainBezierRange","addToLayer","endLinks","actualBezierRanges","isArrayArg0","extremaSpan","seedsByLayer","pathToAdd","piece","controlYForCircularCubic","arcSpanInRadians","controlPointsForCircularCubic","bezierSeedFromArc","maxBezierArcspan","isPointArgs0","realArgs","numArgs","distortX","distortY","subSpan","subArc","getPoints","isClosed","skipZeroDistance","numberOfSides","firstCornerAngleInDegrees","circumscribed","Holes","holeRadius","ids","BoltCircle","boltRadius","boltCount","firstBoltAngleInDegrees","BoltRectangle","Dogbone","bottomless","maxRadius","maxSide","SQRT2","ax","ay","apexes","Dome","w2","wt","RoundRectangle","wr","Oval","sweepRadius","slotRadius","selfIntersect","capRoot","Caps","addCap","tiltAngle","offsetStartAngle","offsetEndAngle","capModel","addSweep","offsetRadius","hasInner","Rectangle","outerRadius","innerRadius","radii","Ring_outer","Ring_inner","Belt","leftRadius","rightRadius","SCurve","findRadius","arcOrigin","h2","capPath","Square","Star","skipPoints","InnerRadiusRatio","outerPoints","innerPoints","allPoints","Text","font","centerCharacterOrigin","opentypeOptions","prevDeleted","prevChar","charIndex","glyph","_fontSize","charModel","glyphToModel","deleted","forEachGlyph","getPath","commands","Buffer","circular","depth","_clone","proto","__isArray","__isRegExp","__getRegExpFlags","__isDate","useBuffer","isBuffer","allocUnsafe","allParents","allChildren","__objToStr","ignoreCase","multiline","clonePrototype","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","encodingOrOffset","fromArrayBuffer","fromString","fromObject","assertSize","alloc","encoding","isEncoding","actual","write","fromArrayLike","byteOffset","isnan","SlowBuffer","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","read","indexSize","readUInt16BE","arrLength","valLength","foundIndex","hexWrite","strLen","parsed","parseInt","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","out","toHex","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","leadSurrogate","byteArray","lo","toByteArray","dst","INSPECT_MAX_BYTES","foo","subarray","poolSize","_augment","species","allocUnsafeSlow","_isBuffer","compare","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","includes","toJSON","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","getLens","b64","validLen","lens","placeHoldersLen","_byteLength","tmp","Arr","curByte","revLookup","tripletToBase64","num","lookup","encodeChunk","uint8","output","extraBytes","len2","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","LN2","getX","getY","nodeSize","ArrayType","KDBush","defaultGetX","defaultGetY","__WEBPACK_IMPORTED_MODULE_0__sort__","__WEBPACK_IMPORTED_MODULE_1__range__","__WEBPACK_IMPORTED_MODULE_2__within__","minX","minY","maxX","maxY","sortKD","inc","swapItem","axis","nextAxis","qx","qy","sqDist","bx","by","ConvexHullGrahamScan","anchorPoint","_findPolarAngle","_sortPoints","_checkPoints","__webpack_amd_options__","addCurve","makeBezier","term","cvalues","PreboundConstructor","convertPath","terms","normalise","matcher","ARGS","normalizePath","instruction","op","lop","instructions","instructionLength","sx","sy","cx2","cy2","normalized"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAAAP,EAAAQ,EAAAC,GACAZ,EAAAa,EAAAV,EAAAQ,IACAG,OAAAC,eAAAZ,EAAAQ,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAf,GACA,GAAAQ,GAAAR,KAAAgB,WACA,WAA2B,MAAAhB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAU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AAtL,KAAA,SAEK,MAAAy6H,IACLO,GAAA,KAEA5vH,EAAAwvH,EACAtvH,EAAAuvH,EAGA,OAAAG,GAAAriG,OAGAx+B,EAAAD,QAAAogI","file":"static/js/main.b7eb699e.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 33);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nif (true) {\n module.exports = __webpack_require__(40);\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(50)();\n}\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (false) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = \"production\" !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(5);\n/* unused harmony reexport parsePath */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__[\"b\"]; });\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return stripLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return hasBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return stripBasename; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return stripTrailingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return parsePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createPath; });\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nvar createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (false) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return locationsAreEqual; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(53);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(5);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = Object(__WEBPACK_IMPORTED_MODULE_2__PathUtils__[\"d\" /* parsePath */])(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = Object(__WEBPACK_IMPORTED_MODULE_0_resolve_pathname__[\"a\" /* default */])(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nvar locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_1_value_equal__[\"a\" /* default */])(a.state, b.state);\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createTransitionManager);\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(11);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__[\"a\" /* default */]);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;\n };\n\n return Router;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRouter.propTypes = {\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node\n};\nRouter.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Router);\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (matchPath);\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Utils = __webpack_require__(14)\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar asap = __webpack_require__(36);\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (false) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (false) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(49);\n/* unused harmony reexport BrowserRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(58);\n/* unused harmony reexport MemoryRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(60);\n/* unused harmony reexport NavLink */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(62);\n/* unused harmony reexport Prompt */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(64);\n/* unused harmony reexport Redirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(10);\n/* unused harmony reexport Router */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(66);\n/* unused harmony reexport StaticRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(70);\n/* unused harmony reexport generatePath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(71);\n/* unused harmony reexport matchPath */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(72);\n/* unused harmony reexport withRouter */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canUseDOM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return removeEventListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getConfirmation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return supportsHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return supportsPopStateOnHashChange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return supportsGoWithoutReloadUsingHash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isExtraneousPopstateEvent; });\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"c\" /* createLocation */])(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nLink.propTypes = {\n onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n target: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired,\n innerRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n createHref: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Link);\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(24);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__[\"a\" /* default */]);\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nRoute.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from \n path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,\n component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n};\nRoute.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object\n })\n};\nRoute.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Route);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isarray = __webpack_require__(61)\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);\n\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (generatePath);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i5&&arguments[5]!==undefined?arguments[5]:false;_classCallCheck(this,Point);this.cx=point[0];this.cy=point[1];this.fill='#2da7cf80';this.stroke='rgb(123, 207, 225)';this.selector=selector;this.canvas=canvas;this.x=x;this.y=y;this.zoom=zoom;this.el=document.createElementNS('http://www.w3.org/2000/svg','circle');this.select=this.select.bind(this);this.move=this.move.bind(this);this.stopEditing=this.stopEditing.bind(this);this.get_point=this.get_point.bind(this);this.old_cx=point[0];this.old_cy=point[1];this.base_size=10;this.base_stroke=5;this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;}_createClass(Point,[{key:'draw',value:function draw(){this.el.setAttribute('cx',this.cx);this.el.setAttribute('cy',this.cy);this.el.setAttribute('r',this.size);this.el.style.stroke=this.stroke;this.el.style.strokeWidth=this.strokeWidth;this.el.style.fill=this.fill;}},{key:'setSize',value:function setSize(zoom){this.size=this.base_size/zoom;this.strokeWidth=this.base_stroke/zoom;this.draw();}},{key:'edit',value:function edit(){this.el.addEventListener('click',this.select);}},{key:'clear',value:function clear(){window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);this.fill='#2da7cf80';this.cx=this.old_cx;this.cy=this.old_cy;this.draw();}},{key:'stopEditing',value:function stopEditing(){window.snapping_points.push([this.cx,this.cy]);this.old_cx=this.cx;this.old_cy=this.cy;this.fill='#2da7cf80';this.draw();window.removeEventListener('mousemove',this.move);window.removeEventListener('dblclick',this.stopEditing);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis1||ub<0||ub>1){return false;}// Return a object with the x and y coordinates of the intersection\nvar x=x1+ua*(x2-x1);var y=y1+ua*(y2-y1);return{x:x,y:y};}function calc_vol(poly,scale){var measures=toD3(poly);var dist=(measures.centroid[0]-window.r_axis)*2*Math.PI;var vol=dist*measures.area*Math.pow(scale,3);return Math.abs(vol);}function distance(p1,p2){return Math.sqrt(Math.pow(p1[0]-p2[0],2)+Math.pow(p1[1]-p2[1],2));}function calcScale(poly,value,unit){if(!poly){return null;}var v1=[poly.points[0].cx,poly.points[0].cy];var v2=[poly.points[1].cx,poly.points[1].cy];var d=distance(v1,v2);var new_value=void 0;if(unit==='inch'){new_value=value*2.54;}else{new_value=value;}var pro=new_value/d/10;return pro;}function toD3(poly){var points_array=[];poly.forEach(function(point){points_array.push([point.cx,point.cy]);});return{centroid:d3.polygonCentroid(points_array),area:d3.polygonArea(points_array)};}function cleanedPoly(array){var points=[];var x=0;array.forEach(function(el){if(xend.cy&&window.maxFill=1){//message = \"Simple join\"\nif(points[0]==='start-start'){new_poly=poly1.points.reverse().concat(poly2.points);}else if(points[0]==='end-end'){new_poly=poly1.points.concat(poly2.points.reverse());}else if(points[0]==='start-end'){new_poly=poly2.points.concat(poly1.points);}else if(points[0]==='end-start'){new_poly=poly1.points.concat(poly2.points);}if(points.length===2){//message = \"closed line\"\n}return new_poly;}else{return;}}function polyPointsToPathData(points_string){return'M'+points_string.replace(/, /g,',').replace(/ $/,'').replace(/ /g,'L');}\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = __webpack_require__(32);\n\n // only used for outlines atm.\n var PolyBezier = __webpack_require__(110);\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = __webpack_require__(111);\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = __webpack_require__(31);\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(15);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(75);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__App__ = __webpack_require__(76);\n__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__[\"a\" /* HashRouter */],null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__App__[\"a\" /* default */],null)),document.getElementById('root'));\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar k=__webpack_require__(8),n=__webpack_require__(17),p=__webpack_require__(18),q=__webpack_require__(19),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"a\" /* createBrowserHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nBrowserRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n forceRefresh: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (BrowserRouter);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(51);\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"g\" /* supportsHistory */])();\n var needsHashChangeListener = !Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"h\" /* supportsPopStateOnHashChange */])();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"d\" /* isExtraneousPopstateEvent */])(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createBrowserHistory);\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (resolvePathname);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (valueEqual);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DOMUtils__ = __webpack_require__(21);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */])(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"f\" /* stripLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n },\n slash: {\n encodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */],\n decodePath: __WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */]\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"b\" /* canUseDOM */], 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"f\" /* supportsGoWithoutReloadUsingHash */])();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? __WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"c\" /* getConfirmation */] : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"g\" /* stripTrailingSlash */])(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"a\" /* addLeadingSlash */])(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!basename || Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"c\" /* hasBasename */])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"e\" /* stripBasename */])(path, basename);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path);\n };\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"b\" /* locationsAreEqual */])(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location));\n };\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(Object(__WEBPACK_IMPORTED_MODULE_3__PathUtils__[\"b\" /* createPath */])(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"a\" /* addEventListener */])(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n Object(__WEBPACK_IMPORTED_MODULE_5__DOMUtils__[\"e\" /* removeEventListener */])(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createHashHistory);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PathUtils__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LocationUtils__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(9);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__[\"a\" /* default */])();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, createKey()) : Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = __WEBPACK_IMPORTED_MODULE_1__PathUtils__[\"b\" /* createPath */];\n\n var push = function push(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = Object(__WEBPACK_IMPORTED_MODULE_2__LocationUtils__[\"a\" /* createLocation */])(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createMemoryHistory);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(10);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"b\" /* createHashHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nHashRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n hashType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (HashRouter);\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__ = __webpack_require__(59);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_MemoryRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(11);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__[\"d\" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__[\"a\" /* default */], { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,\n initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,\n keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,\n children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (MemoryRouter);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Route__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(22);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Route__[\"a\" /* default */], {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */], _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: __WEBPACK_IMPORTED_MODULE_3__Link__[\"a\" /* default */].propTypes.to,\n exact: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n strict: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n activeClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n activeStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n isActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,\n \"aria-current\": __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (NavLink);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__ = __webpack_require__(63);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Prompt__[\"a\" /* default */]);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPrompt.propTypes = {\n when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Prompt);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__ = __webpack_require__(65);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Redirect__[\"a\" /* default */]);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(26);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(prevProps.to);\n var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(this.props.to);\n\n if (Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"f\" /* locationsAreEqual */])(prevTo, nextTo)) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__[\"a\" /* default */])(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nRedirect.propTypes = {\n computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from \n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,\n from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,\n to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n }).isRequired,\n staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n }).isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Redirect);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__ = __webpack_require__(67);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_StaticRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"e\" /* createPath */])(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__[\"c\" /* createLocation */])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__[\"a\" /* default */], _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\nStaticRouter.propTypes = {\n basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,\n context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,\n location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (StaticRouter);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__ = __webpack_require__(69);\n// Written in this round about way for babel-transform-imports\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Switch__[\"a\" /* default */]);\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(12);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {\n if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__[\"a\" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSwitch.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({\n route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,\n location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Switch);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__ = __webpack_require__(26);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_generatePath__[\"a\" /* default */]);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__ = __webpack_require__(12);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_matchPath__[\"a\" /* default */]);\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__ = __webpack_require__(73);\n// Written in this round about way for babel-transform-imports\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_withRouter__[\"a\" /* default */]);\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(24);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__[\"a\" /* default */], {\n children: function children(routeComponentProps) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func\n };\n\n return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (withRouter);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css__ = __webpack_require__(28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__responsive_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__responsive_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Draw__ = __webpack_require__(77);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:\"other\";this.globalStopEditingMode();this.addCursorPoint();var new_polylines=this.state.polylines;var polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:type,selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});new_polylines.push(polyline);this.id++;this.setState({polylines:new_polylines,active_polyline:polyline});}},{key:'selectLayer',value:function selectLayer(id){var _this2=this;if(this.state.active_polyline){if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:\"Escape\"});}}this.setState({active_polyline:this.getPolylineById(id)},function(){_this2.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});_this2.state.active_polyline.el.classList.toggle('active');});}//////////////////////////////////////////////////////////////////////////////\n// UTILITIES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'unselect_polyline',value:function unselect_polyline(e){console.log(e.code);if(e.code==='Escape'||e.code==='KeyQ'){if(this.state.active_polyline){this.state.active_polyline.el.classList.remove('active');this.state.active_polyline.stopEditing({'code':'Escape'});if(this.state.active_polyline.editing){this.state.active_polyline.stopEditingPoints({'code':'Escape'});}if(this.state.active_polyline.breaking_mode){this.exitBreakLineMode({code:'Escape'});}}this.setState({active_polyline:undefined});Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(this.state.polylines);this.checkProfile('int_prof');this.checkProfile('out_prof');if(this.new_point.added){this.removeCursorPoint();}//remove 0 or 1 vertex polyline\nthis.state.polylines.forEach(function(polyline){if(polyline.points.length<2){this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==polyline.id;})});this.canvas.removeChild(polyline.el);}}.bind(this));}}},{key:'globalStopEditingMode',value:function globalStopEditingMode(){this.state.polylines.forEach(function(poly){poly.el.classList.remove('active');});if(this.state.active_polyline){this.state.active_polyline.stopEditing({'code':'Escape'});}}},{key:'addNotification',value:function addNotification(message){this.setState({notification:{id:this.not_id,message:message}});this.not_id++;}},{key:'getPolylineById',value:function getPolylineById(id){return this.state.polylines.filter(function(el){return el.id===id;})[0];}},{key:'addCursorPoint',value:function addCursorPoint(){this.canvas.appendChild(this.new_point.el);this.new_point.added=true;this.new_point.select();}},{key:'removeCursorPoint',value:function removeCursorPoint(){this.canvas.removeChild(this.new_point.el);this.new_point.added=false;}},{key:'updateToDo',value:function updateToDo(type,value){var toDo=this.state.toDo;toDo[type]=value;this.setState({toDo:toDo});}},{key:'checkProfile',value:function checkProfile(type){var poly1=this.state.polylines.filter(function(el){return el.type===type;});if(poly1.length===0){this.updateToDo(type,false);if(type==='int_prof'){if(this.inner_poly){this.canvas.removeChild(this.inner_poly);this.inner_poly=null;this.setState({vessel_capacity:null});}}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);this.vessel_poly=null;this.setState({vessel_volume:null});}}else if(poly1.length===1){this.updateToDo(type,true);}else{this.updateToDo(type,false);var profile=type==='int_prof'?'internal profile':'outer profile';this.addNotification('There should be only one '+profile);}}//////////////////////////////////////////////////////////////////////////////\n// JOIN POLYLINES //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'joinIntExt',value:function joinIntExt(){var poly1=this.state.polylines.filter(function(el){return el.type==='int_prof';})[0];var poly2=this.state.polylines.filter(function(el){return el.type==='out_prof';})[0];if(!poly1||!poly2){this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\");return;}this.vesselVolume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"f\" /* join2Polylines */])(poly1,poly2);if(!this.vesselVolume){this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\");return;}if(this.vessel_poly){this.canvas.removeChild(this.vessel_poly);}this.vessel_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.vesselVolume,'rgba(170, 170, 170, 0.6)');var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale);this.setState({vessel_volume:volume});this.canvas.appendChild(this.vessel_poly);}},{key:'create_inner_polygon',value:function create_inner_polygon(){var poly=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(poly.length===0){this.addNotification(\"To calculate vessel capacity you need an internal profile\");return;}if(this.inner_poly){this.canvas.removeChild(this.inner_poly);}//define inner polygon points based on inner profile and rotation axis\nthis.innerPolygon=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"e\" /* innerProfileToPolygon */])(poly[0].points.slice());//create svg polygon\nthis.inner_poly=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"d\" /* create_polygon */])(this.innerPolygon,'rgba(210, 204, 78, 0.28)');if(this.scale){var volume=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale);this.setState({vessel_capacity:volume});}else{this.addNotification('Can\\'t measure, define scale first');}this.canvas.appendChild(this.inner_poly);}//////////////////////////////////////////////////////////////////////////////\n// ADD REFERENCE SCALE rotation axis AND MAX FILL //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'metricForm',value:function metricForm(obj){var _this3=this;if(obj.ref_unit){this.updateToDo('ref_unit',true);this.setState({metric_value:obj.value,metric_unit:obj.unit},function(){if(_this3.metric&&_this3.metric.points.length===2){_this3.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(_this3.metric,_this3.state.metric_value,_this3.state.metric_unit);//update volume info when metric info are updated\nif(_this3.innerPolygon){_this3.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.innerPolygon,_this3.scale)});}if(_this3.vesselVolume){_this3.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(_this3.vesselVolume,_this3.scale)});}}});}else{this.updateToDo('ref_unit',false);this.scale=null;}}},{key:'defineMaxFill',value:function defineMaxFill(){//remove maxFill if present\nif(this.maxFill){this.canvas.removeChild(this.maxFill.el);this.updateToDo('maxFill',false);}//create new maxFill polyline\nthis.maxFill=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'max_fill',type:'max_fill',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({code:'Escape'});}},{key:'addMaxFill',value:function addMaxFill(e){this.maxFill.stroke='rgb(0, 255, 21)';this.maxFill.add_point(e);this.canvas.appendChild(this.maxFill.el);this.maxFill.draw();//exit editing mode\nthis.maxFill.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addMaxFill);this.maxFill.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.maxFill=this.maxFill.points[0].cy;this.updateToDo('maxFill',true);}},{key:'defineMetric',value:function defineMetric(){this.unselect_polyline({code:\"Escape\"});//remove metric if present\nif(this.metric){this.canvas.removeChild(this.metric.el);this.updateToDo('metric',false);}//create new metric polyline\nthis.metric=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:'metric',type:'metric',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addMetric);this.metric.stopEditing({code:'Escape'});}},{key:'addMetric',value:function addMetric(e){if(this.metric.points.length===0){this.metric.add_point(e);}else if(this.metric.points.length===1){//this is the 2nd point, add it and exit editing\nthis.metric.add_point(e);this.metric.stroke='red';this.metric.stopEditing({code:\"Escape\"});//set color\nthis.metric.el.classList.remove('active');//stop editing\nthis.canvas.removeEventListener('dblclick',this.addMetric);this.updateToDo('metric',true);this.removeCursorPoint();if(this.state.metric_value&&this.state.metric_unit){this.scale=Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"a\" /* calcScale */])(this.metric,this.state.metric_value,this.state.metric_unit);}//update volume info when metric info are updated\nif(this.innerPolygon){this.setState({vessel_capacity:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.innerPolygon,this.scale)});}if(this.vesselVolume){this.setState({vessel_volume:Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"b\" /* calc_vol */])(this.vesselVolume,this.scale)});}}}},{key:'definerotAxis',value:function definerotAxis(){//remove if already present\nif(this.rotAxis){this.canvas.removeChild(this.rotAxis.el);window.r_axis=null;this.updateToDo('rotAxis',false);}//start editing\nthis.addCursorPoint();this.canvas.addEventListener('dblclick',this.addRotAxis);}},{key:'addRotAxis',value:function addRotAxis(e){//create rotation axis polyline\nthis.rotAxis=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'center',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});this.rotAxis.stroke='#ff5a00';this.rotAxis.add_point(e);this.canvas.appendChild(this.rotAxis.el);this.rotAxis.draw();//exit editing mode\nthis.rotAxis.el.classList.remove('active');this.canvas.removeEventListener('dblclick',this.addRotAxis);this.rotAxis.stopEditing({'code':'Escape'});this.removeCursorPoint();//update global var and toDo\nwindow.r_axis=this.rotAxis.points[0].cx;this.updateToDo('rotAxis',true);}//////////////////////////////////////////////////////////////////////////////\n// LAYER EDITING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'colorChange',value:function colorChange(id,color){var my_polyline=this.getPolylineById(id);my_polyline.stroke=color;my_polyline.draw();}},{key:'typeChange',value:function typeChange(id,type){var _this4=this;this.setState({polylines:this.state.polylines.map(function(el){if(el.id===id){el.type=type;return el;}return el;})},function(){_this4.checkProfile('int_prof');_this4.checkProfile('out_prof');});}},{key:'delete_line',value:function delete_line(){var _this5=this;this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.canvas.removeChild(this.state.active_polyline.el);this.setState({polylines:this.state.polylines.filter(function(el){return el.id!==_this5.state.active_polyline.id;}),active_polyline:undefined},function(){_this5.checkProfile('int_prof');_this5.checkProfile('out_prof');Object(__WEBPACK_IMPORTED_MODULE_9__calc_functions__[\"g\" /* recreate_snapping_points */])(_this5.state.polylines);});}},{key:'edit_line',value:function edit_line(){this.globalStopEditingMode();if(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}this.state.active_polyline.editLine();}//////////////////////////////////////////////////////////////////////////////\n// LAYER BREAKING //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'enterBreakLineMode',value:function enterBreakLineMode(){this.globalStopEditingMode();//check if breaking selected line is possible\nif(!this.state.active_polyline){this.addNotification(\"No line selected\");return;}if(this.state.active_polyline.points.length<=2){this.addNotification(\"Line has two or less vertices and can't be subdivided\");return;}//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=true;this.setState({active_polyline:active_polyline});//add breaking points to canvas\nvar x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){this.canvas.appendChild(point.el);point.draw();point.el.addEventListener('click',this.breakLine);}x++;}.bind(this));}},{key:'exitBreakLineMode',value:function exitBreakLineMode(e){//remove breaking points from canvas\nif((e.code==='Escape'||e.code==='KeyQ')&&this.state.active_polyline.breaking_mode){var x=0;this.state.active_polyline.points.forEach(function(point){if(x>0&&x!==this.state.active_polyline.points.length-1){point.el.removeEventListener('click',this.breakLine);this.canvas.removeChild(point.el);}x++;}.bind(this));//update active polyline breaking mode status\nvar active_polyline=this.state.active_polyline;active_polyline.breaking_mode=false;this.setState({active_polyline:active_polyline});}}},{key:'breakLine',value:function breakLine(e){var _this6=this;var break_point=[e.target.getAttribute('cx'),e.target.getAttribute('cy')];this.exitBreakLineMode({code:'Escape'});//instantiate polyline list to edit\nvar new_polylines=this.state.polylines;//create a new polyline\nvar polyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:false,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});//loop over the polyine to break and add point to new polyline until you get to the breaking point\nthis.state.active_polyline.points.forEach(function(point){polyline.appendPoint([point.cx,point.cy]);if(point.cx===parseFloat(break_point[0])&&point.cy===parseFloat(break_point[1])){//save draw and exit editing mode\npolyline.el.classList.remove('active');new_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//create a new polyline with starting point the breaking point\npolyline=new __WEBPACK_IMPORTED_MODULE_3__svg_classes_Polyline__[\"a\" /* default */]({points:[],id:this.id,type:'other',selected:true,canvas:this.canvas,offsetX:this.x,offsetY:this.y,currentZoom:this.panZoomTiger.getZoom()});polyline.appendPoint([point.cx,point.cy]);}}.bind(this));//save draw and exit editing mode for sencond line\nnew_polylines.push(polyline);this.id++;polyline.draw();polyline.stopEditing({'code':'Escape'});//delete orignal broken line and exit editing mode\nthis.state.active_polyline.stopEditing({'code':'Escape'});this.canvas.removeChild(this.state.active_polyline.el);//update the state with the two new lines without the old one\nthis.setState({polylines:new_polylines.filter(function(el){return el.id!==_this6.state.active_polyline.id;}),active_polyline:polyline});}//////////////////////////////////////////////////////////////////////////////\n// HANDLE IMAGE //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'image_rotate',value:function image_rotate(e){this.bck_image.style.transform='rotate('+e.target.value+'deg)';}},{key:'fileChangedHandler',value:function fileChangedHandler(e){var img_name=e.target.value.split(\"\\\\\");img_name=img_name[img_name.length-1];this.setState({img_name:img_name});var img=new Image();img.src=window.URL.createObjectURL(e.target.files[0]);img.onload=function(){var width=img.naturalWidth;var height=img.naturalHeight;var toDo=this.state.toDo;toDo.image=true;this.setState({img_w:width,img_h:height,selectedFile:img.src,toDo:toDo});}.bind(this);}//////////////////////////////////////////////////////////////////////////////\n// DOWNLOAD //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'download_svg',value:function download_svg(){var _this7=this;if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}var saved_path=this.state.selectedFile;if(this.state.img_name){this.setState({selectedFile:this.state.img_name.replace('href')},function(){download(_this7.svg.outerHTML,\"dlText.svg\",\"text/plain\");_this7.setState({selectedFile:saved_path});});}else{download(this.svg.outerHTML,\"myVessel.svg\",\"text/plain\");}}},{key:'download_dxf',value:function download_dxf(){if(this.state.polylines.length===0){this.addNotification('No polylines to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}var makerjs=__webpack_require__(97);var models={models:{}};var x=1;this.state.polylines.forEach(function(polyline){var points=polyline.el.getAttribute('points');var closed=false;//true for SVG polygon, false for SVG polyline\nvar model=makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed,points),false,true);model=makerjs.model.scale(model,this.scale/10);models.models['my-'+x+'-line']=model;x++;}.bind(this));models.units=makerjs.units.Meter;var file=makerjs.exporter.toDXF(models,{units:makerjs.unitType.Meter});download(file,\"myVessel.dxf\",\"text/plain\");}},{key:'download_json',value:function download_json(){var title='myVessel';var coordinates=void 0,author=void 0,description='';var int_prof=this.state.polylines.filter(function(el){return el.type==='int_prof';});if(int_prof.length>0){int_prof=int_prof[0];}else{this.addNotification('No inner profile to export');return;}if(!this.scale){this.addNotification('You need to define a reference scale before export');return;}coordinates=[];int_prof.points.forEach(function(point){// scale the point - unit will be dm - convert to cm - invert y axis\ncoordinates.push([point.cx*this.scale/10,point.cy*this.scale/10*-1]);}.bind(this));coordinates=JSON.stringify(coordinates);var json='{ \"type\": \"Feature\",\\n \"geometry\": {\\n \"type\": \"LineString\",\\n \"coordinates\": '+coordinates+'\\n },\\n \"properties\": {\\n \"title\": \"'+title+'\",\\n \"description\": \"'+description+'\",\\n \"author\": \"'+author+'\"\\n }\\n }';this.addNotification('Export completed');download(json,title+'.json',\"text/plain\");}//////////////////////////////////////////////////////////////////////////////\n// RENDER //\n//////////////////////////////////////////////////////////////////////////////\n},{key:'render',value:function render(){var _this8=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'container'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__components_Notification__[\"a\" /* default */],{notification:this.state.notification}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2',null,'Draw'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'drawing'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('svg',{id:'drawing-canvas',height:'500',width:'100%',ref:function ref(svg){_this8.svg=svg;}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('g',{className:'svg-pan-zoom_viewport',id:'canvas'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('image',{ref:function ref(bck_image){_this8.bck_image=bck_image;},id:'bck-img',href:this.state.selectedFile,x:'0',y:'0',height:this.state.img_h,width:this.state.img_w}))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'tools'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title'},'Actions:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.create_new_polyline.bind(this),title:'Create new line',alt:'Create new line'},'New'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.enterBreakLineMode.bind(this),title:'Break selected line',alt:'Break selected line'},'Break'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.delete_line.bind(this),title:'Delete selected line',alt:'Delete selected line'},'Delete'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.edit_line.bind(this),title:'Edit selected line',alt:'Edit selected line'},'Edit'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'actions-title2'},'Export:'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_svg.bind(this),title:'Download SVG (no scaling)',alt:'Download SVG (no scaling)'},'SVG'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_dxf.bind(this),title:'Download all-lines as DXF (scaled: 1 unit = 1 meter)',alt:'Download all-lines as DXF (scaled: 1 unit = 1 meter)'},'DXF'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'interface-button',onClick:this.download_json.bind(this),title:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)',alt:'Download inner-profile as JSON (scaled: 1 unit = 1 meter)'},'JSON'))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section',{id:'polylines'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'layer-title'},'Layers:'),this.state.toDo.image&&__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{id:'image-layer',className:'polyline-layer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'slidecontainer'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label',{htmlFor:'myRange'},'Rotate image'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input',{type:'number',min:'0',max:'360',defaultValue:'0',className:'slider',id:'myRange',step:'0.01',onChange:this.image_rotate.bind(this)}))),this.state.polylines.map(function(el){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__components_listPoly__[\"a\" /* default */],{key:el.id,name:el.name,type:el.type,id:el.id,delete_line:_this8.delete_line.bind(_this8),edit_line:_this8.edit_line.bind(_this8),colorChange:_this8.colorChange.bind(_this8),typeChange:_this8.typeChange.bind(_this8),selectLayer:_this8.selectLayer.bind(_this8),selectedPoly:_this8.state.active_polyline?_this8.state.active_polyline.id:''});})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'basic-info'},'Double-left-click to draw a point, single left-click and hold to pan the view, single left-click to select vertices (in edit and break mode), mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line. Press ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'Esc'),' or ',__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('code',null,'q'),' to quit editing mode and deselect.'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__components_Steps__[\"a\" /* default */],{toDo:this.state.toDo,fileChangedHandler:this.fileChangedHandler.bind(this),definerotAxis:this.definerotAxis.bind(this),defineMetric:this.defineMetric.bind(this),handleForm:this.metricForm.bind(this),create_new_polyline:this.create_new_polyline.bind(this),defineMaxFill:this.defineMaxFill.bind(this)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__components_Measures__[\"a\" /* default */],{toDo:this.state.toDo,vessel_volume:this.state.vessel_volume,content_volume:this.state.vessel_capacity,joinIntExt:this.joinIntExt.bind(this),create_inner_polygon:this.create_inner_polygon.bind(this)}));}}]);return Draw;}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);/* harmony default export */ __webpack_exports__[\"a\"] = (Draw);//get point coordinates from event\n//get_point(e){\n// const matrix = this.canvas.transform.baseVal[0].matrix\n// const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n// return newPoint\n//}\n//\n//\n//\n//joinTwoPolylines(poly1, poly2){\n// const new_poly = join2Polylines(poly1, poly2)\n//\n// if(!new_poly){\n// this.addNotification(\"Not joinable\")\n// return\n// }\n// return joined_poly\n//\n// //const joined_poly = new Polyline({\n// // points: cleanedPoly(new_poly),\n// // id: this.id,\n// // type: poly1.type,\n// // selected: true,\n// // canvas: this.canvas,\n// // offsetX: this.x,\n// // offsetY: this.y,\n// // currentZoom: this.panZoomTiger.getZoom()\n// //})\n// //joined_poly.stopEditing({code:'Escape'})\n// //this.canvas.removeChild(joined_poly.el)\n// //this.id++\n//\n// //this.canvas.removeChild(poly1.el)\n// //this.canvas.removeChild(poly2.el)\n// //this.canvas.appendChild(joined_poly.el)\n// //joined_poly.draw()\n////\n// //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n// //new_polylines.push(joined_poly)\n// //this.addNotification(message)\n// //this.setState(\n// // { polylines: new_polylines,\n// // notification:{ id:this.not_id, message: message },\n// // active_polyline: joined_poly\n// // }\n// //)\n// //this.not_id++\n//}\n//joinTwoLines(){\n// //TODO\n// this.addNotification(\"Select first line\")\n//}\n//\n// Join 2 lines\n//\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Point__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MidPoint__ = __webpack_require__(79);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calc_functions__ = __webpack_require__(30);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&this.points.length>index){if(point.cx!==this.points[index-1].cx&&point.cy!==this.points[index-1].cy){var midpoint=new __WEBPACK_IMPORTED_MODULE_1__MidPoint__[\"a\" /* default */]([(point.cx+this.points[index-1].cx)/2,(point.cy+this.points[index-1].cy)/2],index,this.zoom);this.midpoints.push(midpoint);}}index++;}.bind(this));//add midpoints to canvas\nthis.midpoints.forEach(function(midpoint){this.canvas.appendChild(midpoint.el);midpoint.draw();midpoint.el.addEventListener('click',this.create);}.bind(this));}},{key:'create',value:function create(e){var index=e.target.getAttribute('index');var new_point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([parseFloat(e.target.getAttribute('cx')),parseFloat(e.target.getAttribute('cy'))],this.canvas,this.x,this.y,this.zoom);this.addPointInMiddle(index,new_point);}},{key:'addPointInMiddle',value:function addPointInMiddle(index,new_point){this.points.splice(index,0,new_point);this.canvas.appendChild(new_point.el);new_point.draw();new_point.edit();new_point.select();this.draw();}},{key:'pointsTo',value:function pointsTo(){var str='';this.points.forEach(function(point){str+=point.cx+', '+point.cy+' ';});return str;}//add point\n},{key:'add_point',value:function add_point(e){var new_point=this.get_point(e);if(this.type==='max_fill'){var point=[-1000000,new_point[1]];this.appendPoint(point);point=[1000000,new_point[1]];this.appendPoint(point);return;}if(this.type==='center'){var _point=[new_point[0],-1000000];this.appendPoint(_point);_point=[new_point[0],1000000];this.appendPoint(_point);return;}this.appendPoint(new_point);}},{key:'appendPoint',value:function appendPoint(array){window.snapping_points.push([array[0],array[1]]);var point=new __WEBPACK_IMPORTED_MODULE_0__Point__[\"a\" /* default */]([array[0],array[1]],this.canvas,this.x,this.y,this.zoom);this.points.push(point);this.draw();if(this.points.length===1){window.addEventListener('mousemove',this.previewPoint);window.addEventListener('keyup',this.stopEditing);}}},{key:'get_point',value:function get_point(e){var matrix=this.canvas.transform.baseVal[0].matrix;var newPoint=[(e.pageX-matrix.e-this.x)/matrix.a,(e.pageY-matrix.f-this.y)/matrix.a];return this.snapPoint(newPoint);}},{key:'snapPoint',value:function snapPoint(new_point){var max_dist=25/window.zoom;var founds=[];window.snapping_points.forEach(function(point){if(new_point[0]+max_dist>point[0]&&new_point[0]-max_distpoint[1]&&new_point[1]-max_dist0){//sort array by distance\nfounds.sort(function(a,b){return a.dist-b.dist;});new_point=founds[0].point;}if(window.r_axis){if(new_point[0]+max_dist>window.r_axis&&new_point[0]-window.r_axis= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && Object(__WEBPACK_IMPORTED_MODULE_0__cross__[\"a\" /* default */])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n});\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n});\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n});\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n});\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\n// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13);\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SvgUtils = __webpack_require__(13)\n , Utils = __webpack_require__(14)\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = __webpack_require__(98);\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = __webpack_require__(103);\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = __webpack_require__(107);\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = __webpack_require__(109);\r\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(Buffer) {var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(99).Buffer))\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(100)\nvar ieee754 = __webpack_require__(101)\nvar isArray = __webpack_require__(102)\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16)))\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (immutable) */ __webpack_exports__[\"default\"] = kdbush;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sort__ = __webpack_require__(104);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range__ = __webpack_require__(105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__within__ = __webpack_require__(106);\n\n\n\n\n\nfunction kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n Object(__WEBPACK_IMPORTED_MODULE_0__sort__[\"a\" /* default */])(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__range__[\"a\" /* default */])(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__within__[\"a\" /* default */])(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = sortKD;\n\nfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = range;\n\nfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = within;\n\nfunction within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==\"function\"&&__webpack_require__(108)&&!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return ConvexHullGrahamScan}.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports) {\n\n/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(31);\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {\n \"use strict\";\n\n var utils = __webpack_require__(32);\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar normalise = __webpack_require__(112);\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports) {\n\n/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// static/js/main.b7eb699e.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"/Vessel-Measuring-Tool/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap abfe1c8d28b8ab0fc77a","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react/index.js\n// module id = 0\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 1\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/invariant/browser.js\n// module id = 2\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/warning/warning.js\n// module id = 3\n// module chunks = 0","export var addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nexport var createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/PathUtils.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/node_modules/warning/browser.js\n// module id = 6\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/LocationUtils.js\n// module id = 7\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 8\n// module chunks = 0","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n warning(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\nexport default createTransitionManager;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createTransitionManager.js\n// module id = 9\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Router from \"react-router/es/Router\";\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Router.js\n// module id = 10\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n invariant(children == null || React.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? React.Children.only(children) : null;\n };\n\n return Router;\n}(React.Component);\n\nRouter.propTypes = {\n history: PropTypes.object.isRequired,\n children: PropTypes.node\n};\nRouter.contextTypes = {\n router: PropTypes.object\n};\nRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Router;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Router.js\n// module id = 11\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/matchPath.js\n// module id = 12\n// module chunks = 0","var Utils = require('./utilities')\n , _browser = 'unknown'\n ;\n\n// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\nif (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer\n _browser = 'ie';\n}\n\nmodule.exports = {\n svgNS: 'http://www.w3.org/2000/svg'\n, xmlNS: 'http://www.w3.org/XML/1998/namespace'\n, xmlnsNS: 'http://www.w3.org/2000/xmlns/'\n, xlinkNS: 'http://www.w3.org/1999/xlink'\n, evNS: 'http://www.w3.org/2001/xml-events'\n\n /**\n * Get svg dimensions: width and height\n *\n * @param {SVGSVGElement} svg\n * @return {Object} {width: 0, height: 0}\n */\n, getBoundingClientRectNormalized: function(svg) {\n if (svg.clientWidth && svg.clientHeight) {\n return {width: svg.clientWidth, height: svg.clientHeight}\n } else if (!!svg.getBoundingClientRect()) {\n return svg.getBoundingClientRect();\n } else {\n throw new Error('Cannot get BoundingClientRect for SVG.');\n }\n }\n\n /**\n * Gets g element with class of \"viewport\" or creates it if it doesn't exist\n *\n * @param {SVGSVGElement} svg\n * @return {SVGElement} g (group) element\n */\n, getOrCreateViewport: function(svg, selector) {\n var viewport = null\n\n if (Utils.isElement(selector)) {\n viewport = selector\n } else {\n viewport = svg.querySelector(selector)\n }\n\n // Check if there is just one main group in SVG\n if (!viewport) {\n var childNodes = Array.prototype.slice.call(svg.childNodes || svg.children).filter(function(el){\n return el.nodeName !== 'defs' && el.nodeName !== '#text'\n })\n\n // Node name should be SVGGElement and should have no transform attribute\n // Groups with transform are not used as viewport because it involves parsing of all transform possibilities\n if (childNodes.length === 1 && childNodes[0].nodeName === 'g' && childNodes[0].getAttribute('transform') === null) {\n viewport = childNodes[0]\n }\n }\n\n // If no favorable group element exists then create one\n if (!viewport) {\n var viewportId = 'viewport-' + new Date().toISOString().replace(/\\D/g, '');\n viewport = document.createElementNS(this.svgNS, 'g');\n viewport.setAttribute('id', viewportId);\n\n // Internet Explorer (all versions?) can't use childNodes, but other browsers prefer (require?) using childNodes\n var svgChildren = svg.childNodes || svg.children;\n if (!!svgChildren && svgChildren.length > 0) {\n for (var i = svgChildren.length; i > 0; i--) {\n // Move everything into viewport except defs\n if (svgChildren[svgChildren.length - i].nodeName !== 'defs') {\n viewport.appendChild(svgChildren[svgChildren.length - i]);\n }\n }\n }\n svg.appendChild(viewport);\n }\n\n // Parse class names\n var classNames = [];\n if (viewport.getAttribute('class')) {\n classNames = viewport.getAttribute('class').split(' ')\n }\n\n // Set class (if not set already)\n if (!~classNames.indexOf('svg-pan-zoom_viewport')) {\n classNames.push('svg-pan-zoom_viewport')\n viewport.setAttribute('class', classNames.join(' '))\n }\n\n return viewport\n }\n\n /**\n * Set SVG attributes\n *\n * @param {SVGSVGElement} svg\n */\n , setupSvgAttributes: function(svg) {\n // Setting default attributes\n svg.setAttribute('xmlns', this.svgNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS);\n svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS);\n\n // Needed for Internet Explorer, otherwise the viewport overflows\n if (svg.parentNode !== null) {\n var style = svg.getAttribute('style') || '';\n if (style.toLowerCase().indexOf('overflow') === -1) {\n svg.setAttribute('style', 'overflow: hidden; ' + style);\n }\n }\n }\n\n/**\n * How long Internet Explorer takes to finish updating its display (ms).\n */\n, internetExplorerRedisplayInterval: 300\n\n/**\n * Forces the browser to redisplay all SVG elements that rely on an\n * element defined in a 'defs' section. It works globally, for every\n * available defs element on the page.\n * The throttling is intentionally global.\n *\n * This is only needed for IE. It is as a hack to make markers (and 'use' elements?)\n * visible after pan/zoom when there are multiple SVGs on the page.\n * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/\n * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62\n */\n, refreshDefsGlobal: Utils.throttle(function() {\n var allDefs = document.querySelectorAll('defs');\n var allDefsCount = allDefs.length;\n for (var i = 0; i < allDefsCount; i++) {\n var thisDefs = allDefs[i];\n thisDefs.parentNode.insertBefore(thisDefs, thisDefs);\n }\n }, this ? this.internetExplorerRedisplayInterval : null)\n\n /**\n * Sets the current transform matrix of an element\n *\n * @param {SVGElement} element\n * @param {SVGMatrix} matrix CTM\n * @param {SVGElement} defs\n */\n, setCTM: function(element, matrix, defs) {\n var that = this\n , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')';\n\n element.setAttributeNS(null, 'transform', s);\n if ('transform' in element.style) {\n element.style.transform = s;\n } else if ('-ms-transform' in element.style) {\n element.style['-ms-transform'] = s;\n } else if ('-webkit-transform' in element.style) {\n element.style['-webkit-transform'] = s;\n }\n\n // IE has a bug that makes markers disappear on zoom (when the matrix \"a\" and/or \"d\" elements change)\n // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10\n // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/\n if (_browser === 'ie' && !!defs) {\n // this refresh is intended for redisplaying the SVG during zooming\n defs.parentNode.insertBefore(defs, defs);\n // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG\n // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that\n // are located under any other element(s).\n window.setTimeout(function() {\n that.refreshDefsGlobal();\n }, that.internetExplorerRedisplayInterval);\n }\n }\n\n /**\n * Instantiate an SVGPoint object with given event coordinates\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n * @return {SVGPoint} point\n */\n, getEventPoint: function(evt, svg) {\n var point = svg.createSVGPoint()\n\n Utils.mouseAndTouchNormalize(evt, svg)\n\n point.x = evt.clientX\n point.y = evt.clientY\n\n return point\n }\n\n /**\n * Get SVG center point\n *\n * @param {SVGSVGElement} svg\n * @return {SVGPoint}\n */\n, getSvgCenterPoint: function(svg, width, height) {\n return this.createSVGPoint(svg, width / 2, height / 2)\n }\n\n /**\n * Create a SVGPoint with given x and y\n *\n * @param {SVGSVGElement} svg\n * @param {Number} x\n * @param {Number} y\n * @return {SVGPoint}\n */\n, createSVGPoint: function(svg, x, y) {\n var point = svg.createSVGPoint()\n point.x = x\n point.y = y\n\n return point\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-utilities.js\n// module id = 13\n// module chunks = 0","module.exports = {\n /**\n * Extends an object\n *\n * @param {Object} target object to extend\n * @param {Object} source object to take properties from\n * @return {Object} extended object\n */\n extend: function(target, source) {\n target = target || {};\n for (var prop in source) {\n // Go recursively\n if (this.isObject(source[prop])) {\n target[prop] = this.extend(target[prop], source[prop])\n } else {\n target[prop] = source[prop]\n }\n }\n return target;\n }\n\n /**\n * Checks if an object is a DOM element\n *\n * @param {Object} o HTML element or String\n * @return {Boolean} returns true if object is a DOM element\n */\n, isElement: function(o){\n return (\n o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2\n (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string')\n );\n }\n\n /**\n * Checks if an object is an Object\n *\n * @param {Object} o Object\n * @return {Boolean} returns true if object is an Object\n */\n, isObject: function(o){\n return Object.prototype.toString.call(o) === '[object Object]';\n }\n\n /**\n * Checks if variable is Number\n *\n * @param {Integer|Float} n\n * @return {Boolean} returns true if variable is Number\n */\n, isNumber: function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n /**\n * Search for an SVG element\n *\n * @param {Object|String} elementOrSelector DOM Element or selector String\n * @return {Object|Null} SVG or null\n */\n, getSvg: function(elementOrSelector) {\n var element\n , svg;\n\n if (!this.isElement(elementOrSelector)) {\n // If selector provided\n if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) {\n // Try to find the element\n element = document.querySelector(elementOrSelector)\n\n if (!element) {\n throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector)\n return null\n }\n } else {\n throw new Error('Provided selector is not an HTML object nor String')\n return null\n }\n } else {\n element = elementOrSelector\n }\n\n if (element.tagName.toLowerCase() === 'svg') {\n svg = element;\n } else {\n if (element.tagName.toLowerCase() === 'object') {\n svg = element.contentDocument.documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'embed') {\n svg = element.getSVGDocument().documentElement;\n } else {\n if (element.tagName.toLowerCase() === 'img') {\n throw new Error('Cannot script an SVG in an \"img\" element. Please use an \"object\" element or an in-line SVG.');\n } else {\n throw new Error('Cannot get SVG.');\n }\n return null\n }\n }\n }\n\n return svg\n }\n\n /**\n * Attach a given context to a function\n * @param {Function} fn Function\n * @param {Object} context Context\n * @return {Function} Function with certain context\n */\n, proxy: function(fn, context) {\n return function() {\n return fn.apply(context, arguments)\n }\n }\n\n /**\n * Returns object type\n * Uses toString that returns [object SVGPoint]\n * And than parses object type from string\n *\n * @param {Object} o Any object\n * @return {String} Object type\n */\n, getType: function(o) {\n return Object.prototype.toString.apply(o).replace(/^\\[object\\s/, '').replace(/\\]$/, '')\n }\n\n /**\n * If it is a touch event than add clientX and clientY to event object\n *\n * @param {Event} evt\n * @param {SVGSVGElement} svg\n */\n, mouseAndTouchNormalize: function(evt, svg) {\n // If no clientX then fallback\n if (evt.clientX === void 0 || evt.clientX === null) {\n // Fallback\n evt.clientX = 0\n evt.clientY = 0\n\n // If it is a touch event\n if (evt.touches !== void 0 && evt.touches.length) {\n if (evt.touches[0].clientX !== void 0) {\n evt.clientX = evt.touches[0].clientX\n evt.clientY = evt.touches[0].clientY\n } else if (evt.touches[0].pageX !== void 0) {\n var rect = svg.getBoundingClientRect();\n\n evt.clientX = evt.touches[0].pageX - rect.left\n evt.clientY = evt.touches[0].pageY - rect.top\n }\n // If it is a custom event\n } else if (evt.originalEvent !== void 0) {\n if (evt.originalEvent.clientX !== void 0) {\n evt.clientX = evt.originalEvent.clientX\n evt.clientY = evt.originalEvent.clientY\n }\n }\n }\n }\n\n /**\n * Check if an event is a double click/tap\n * TODO: For touch gestures use a library (hammer.js) that takes in account other events\n * (touchmove and touchend). It should take in account tap duration and traveled distance\n *\n * @param {Event} evt\n * @param {Event} prevEvt Previous Event\n * @return {Boolean}\n */\n, isDblClick: function(evt, prevEvt) {\n // Double click detected by browser\n if (evt.detail === 2) {\n return true;\n }\n // Try to compare events\n else if (prevEvt !== void 0 && prevEvt !== null) {\n var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms\n , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2))\n\n return timeStampDiff < 250 && touchesDistance < 10\n }\n\n // Nothing found\n return false;\n }\n\n /**\n * Returns current timestamp as an integer\n *\n * @return {Number}\n */\n, now: Date.now || function() {\n return new Date().getTime();\n }\n\n // From underscore.\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n// jscs:disable\n// jshint ignore:start\n, throttle: function(func, wait, options) {\n var that = this;\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : that.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = that.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n }\n// jshint ignore:end\n// jscs:enable\n\n /**\n * Create a requestAnimationFrame simulation\n *\n * @param {Number|String} refreshRate\n * @return {Function}\n */\n, createRequestAnimationFrame: function(refreshRate) {\n var timeout = null\n\n // Convert refreshRate to timeout\n if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) {\n timeout = Math.floor(1000 / refreshRate)\n }\n\n if (timeout === null) {\n return window.requestAnimationFrame || requestTimeout(33)\n } else {\n return requestTimeout(timeout)\n }\n }\n}\n\n/**\n * Create a callback that will execute after a given timeout\n *\n * @param {Function} timeout\n * @return {Function}\n */\nfunction requestTimeout(timeout) {\n return function(callback) {\n window.setTimeout(callback, timeout)\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/utilities.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/core.js\n// module id = 15\n// module chunks = 0","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 16\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/invariant.js\n// module id = 17\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyObject.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyFunction.js\n// module id = 19\n// module chunks = 0","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/DOMUtils.js\n// module id = 21\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport { createLocation } from \"history\";\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n invariant(this.context.router, \"You should not use outside a \");\n\n invariant(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? createLocation(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return React.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(React.Component);\n\nLink.propTypes = {\n onClick: PropTypes.func,\n target: PropTypes.string,\n replace: PropTypes.bool,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired,\n createHref: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Link;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Link.js\n// module id = 22\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Route from \"react-router/es/Route\";\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Route.js\n// module id = 23\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Route.js\n// module id = 24\n// module chunks = 0","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = res[2] || defaultDelimiter\n var pattern = capture || group\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/index.js\n// module id = 25\n// module chunks = 0","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = pathToRegexp.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/generatePath.js\n// module id = 26\n// module chunks = 0","export default class Point {\n\n constructor(point, canvas, x, y, zoom, selector = false) {\n this.cx = point[0]\n this.cy = point[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n\n this.selector = selector\n this.canvas = canvas\n this.x = x\n this.y = y\n this.zoom = zoom\n\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n this.select = this.select.bind(this)\n this.move = this.move.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.get_point = this.get_point.bind(this)\n\n this.old_cx = point[0]\n this.old_cy = point[1]\n\n this.base_size = 10\n this.base_stroke = 5\n this.size = this.base_size / zoom\n this.strokeWidth = this.base_stroke / zoom\n }\n\n draw() {\n this.el.setAttribute('cx', this.cx);\n this.el.setAttribute('cy', this.cy);\n this.el.setAttribute('r', this.size);\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.fill = this.fill;\n }\n\n setSize(zoom) {\n this.size = this.base_size/zoom\n this.strokeWidth = this.base_stroke / zoom\n this.draw()\n }\n\n edit() {\n this.el.addEventListener('click', this.select)\n }\n\n clear() {\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n this.fill = '#2da7cf80'\n this.cx = this.old_cx\n this.cy = this.old_cy\n this.draw()\n }\n\n stopEditing() {\n window.snapping_points.push([this.cx, this.cy])\n this.old_cx = this.cx\n this.old_cy = this.cy\n\n this.fill = '#2da7cf80'\n this.draw()\n window.removeEventListener('mousemove', this.move)\n window.removeEventListener('dblclick', this.stopEditing)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n move(e) {\n this.cx = this.get_point(e)[0]\n this.cy = this.get_point(e)[1]\n this.draw()\n if(!this.selector){\n window.addEventListener('dblclick', this.stopEditing)\n }\n }\n\n select() {\n this.old_cx = this.cx\n this.old_cy = this.cy\n this.fill = 'yellow'\n this.draw()\n window.addEventListener('mousemove', this.move)\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Point.js","const d3 = require('d3-polygon')\n\n//http://paulbourke.net/geometry/pointlineplane/javascript.txt\n// line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/\n// Determine the intersection point of two line segments\n// Return FALSE if the lines don't intersect\nfunction intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n // Check if none of the lines are of length 0\n\tif ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n\t\treturn false\n\t}\n\tlet denominator = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1))\n // Lines are parallel\n\tif (denominator === 0) {\n\t\treturn false\n\t}\n\tlet ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator\n\tlet ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator\n // is the intersection along the segments\n\tif (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n\t\treturn false\n\t}\n // Return a object with the x and y coordinates of the intersection\n\tlet x = x1 + ua * (x2 - x1)\n\tlet y = y1 + ua * (y2 - y1)\n\n\treturn {x, y}\n}\n\nfunction calc_vol(poly, scale) {\n let measures = toD3(poly)\n let dist = (measures.centroid[0] - window.r_axis) * 2 * Math.PI\n let vol = dist * measures.area * Math.pow(scale, 3)\n return Math.abs(vol)\n}\n\nfunction distance(p1, p2) {\n return Math.sqrt(Math.pow((p1[0] - p2[0]), 2) + Math.pow((p1[1] - p2[1]), 2))\n}\n\nfunction calcScale(poly, value, unit) {\n if (!poly) {\n return null\n }\n const v1 = [\n poly.points[0].cx,\n poly.points[0].cy\n ]\n const v2 = [\n poly.points[1].cx,\n poly.points[1].cy\n ]\n const d = distance(v1, v2)\n let new_value\n if (unit === 'inch') {\n new_value = value * 2.54\n } else {\n new_value = value\n }\n const pro = (new_value / d) / 10\n return pro\n}\n\nfunction toD3(poly) {\n let points_array = []\n poly.forEach(function(point) {\n points_array.push([point.cx, point.cy])\n })\n return {centroid: d3.polygonCentroid(points_array), area: d3.polygonArea(points_array)}\n}\n\nfunction cleanedPoly(array) {\n let points = []\n let x = 0\n array.forEach(function(el) {\n if (x < array.length - 1) {\n if (el.cx !== array[x + 1].cx && el.cy !== array[x + 1].cy) {\n points.push(el)\n }\n x++\n } else {\n points.push(el)\n }\n })\n return points\n}\n\nfunction getCommonPoints(poly1, poly2) {\n let start1 = poly1[0]\n let end1 = poly1[poly1.length - 1]\n let start2 = poly2[0]\n let end2 = poly2[poly2.length - 1]\n let commons = []\n if (start1.cx === start2.cx && start1.cy === start2.cy) {\n commons.push('start-start')\n }\n if (start1.cx === end2.cx && start1.cy === end2.cy) {\n commons.push('start-end')\n }\n if (end1.cx === start2.cx && end1.cy === start2.cy) {\n commons.push('end-start')\n }\n if (end1.cx === end2.cx && end1.cy === end2.cy) {\n commons.push('end-end')\n }\n return commons\n}\n\nfunction innerProfileToPolygon(old_poly) {\n let poly = [];\n old_poly.forEach(function(point){\n poly.push(Object.assign({}, point))\n })\n let start = poly[0]\n let end = poly[poly.length - 1]\n //start polyline from bottom to top Y values are inverted topY < bottomY\n if (start.cy < end.cy) {\n poly.reverse()\n start = poly[0]\n end = poly[poly.length - 1]\n }\n let new_end = Object.assign({}, end);\n\n //set max fill\n if(window.maxFill && window.maxFill > end.cy && window.maxFill < start.cy){\n //recreate poly excluding vetices above maxFill\n let temp_poly = []\n let first_time = true\n poly.forEach(function(point){\n if(point.cy < window.maxFill){\n\t\t\t\t//this vertex is above maxFill skip\n\t\t\t\t//if this is the first vertex above add it otherwise ignore it\n\t\t\t\tif(first_time){\n temp_poly.push(point)\n first_time = false\n }\n }else{\n\t\t\t\t//this vertex is under maxFill\n\t\t\t\t//add vertex that is under maxFill limit\n temp_poly.push(point)\n }\n })\n\n poly = temp_poly\n\n start = poly[0]\n end = poly[poly.length - 1]\n end.cx = intersect(\n end.cx, end.cy, poly[poly.length-2].cx, poly[poly.length-2].cy,\n -10000000, window.maxFill, 10000000, window.maxFill\n ).x\n end.cy = window.maxFill\n new_end.cy = window.maxFill\n }\n\n\n //if not caxis use start x as center axis else use the defined center axis\n if (!window.r_axis || window.r_axis === start.cx) {\n window.r_axis = start.cx\n new_end.cx = start.cx\n poly.push(new_end)\n poly.push(start) //duplicated to close polygon\n } else {\n let new_start = Object.assign({}, start);\n new_start.cx = window.r_axis\n new_end.cx = window.r_axis\n poly.push(new_end)\n poly.push(new_start)\n poly.push(start) //duplicated to close polygon\n }\n return poly\n}\n\nfunction create_polygon(poly, color) {\n let str = ''\n poly.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n let new_poly = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n new_poly.setAttribute('points', str)\n new_poly.style.fill = color\n new_poly.style.strokeWidth = '0'\n return new_poly\n}\n\nfunction recreate_snapping_points(polylines) {\n window.snapping_points = []\n polylines.forEach(function(poly) {\n poly.points.forEach(function(point) {\n window.snapping_points.push([point.cx, point.cy])\n })\n })\n}\n\nfunction join2Polylines(poly1, poly2) {\n const points = getCommonPoints(poly1.points.slice(), poly2.points.slice())\n let new_poly = []\n\n if (points.length >= 1) {\n //message = \"Simple join\"\n if (points[0] === 'start-start') {\n new_poly = poly1.points.reverse().concat(poly2.points)\n } else if (points[0] === 'end-end') {\n new_poly = poly1.points.concat(poly2.points.reverse())\n } else if (points[0] === 'start-end') {\n new_poly = poly2.points.concat(poly1.points)\n } else if (points[0] === 'end-start') {\n new_poly = poly1.points.concat(poly2.points)\n }\n if (points.length === 2) {\n //message = \"closed line\"\n }\n return new_poly\n } else {\n return\n }\n}\n\nfunction polyPointsToPathData(points_string){\n\treturn 'M'+points_string.replace(/, /g, ',').replace(/ $/, '').replace(/ /g, 'L')\n}\n\nexport {\n calc_vol,\n distance,\n calcScale,\n toD3,\n cleanedPoly,\n getCommonPoints,\n create_polygon,\n recreate_snapping_points,\n join2Polylines,\n innerProfileToPolygon,\n\tpolyPointsToPathData\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/calc_functions.js","/**\n A javascript Bezier curve library by Pomax.\n\n Based on http://pomax.github.io/bezierinfo\n\n This code is MIT licensed.\n**/\n(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n min = Math.min,\n max = Math.max,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n sqrt = Math.sqrt,\n pi = Math.PI,\n // a zero coordinate, which is surprisingly useful\n ZERO = { x: 0, y: 0, z: 0 };\n\n // quite needed\n var utils = require(\"./utils.js\");\n\n // only used for outlines atm.\n var PolyBezier = require(\"./poly-bezier.js\");\n\n /**\n * Bezier curve constructor. The constructor argument can be one of three things:\n *\n * 1. array/4 of {x:..., y:..., z:...}, z optional\n * 2. numerical array/8 ordered x1,y1,x2,y2,x3,y3,x4,y4\n * 3. numerical array/12 ordered x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4\n *\n */\n var Bezier = function(coords) {\n var args = coords && coords.forEach ? coords : [].slice.call(arguments);\n var coordlen = false;\n if (typeof args[0] === \"object\") {\n coordlen = args.length;\n var newargs = [];\n args.forEach(function(point) {\n [\"x\", \"y\", \"z\"].forEach(function(d) {\n if (typeof point[d] !== \"undefined\") {\n newargs.push(point[d]);\n }\n });\n });\n args = newargs;\n }\n var higher = false;\n var len = args.length;\n if (coordlen) {\n if (coordlen > 4) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n higher = true;\n }\n } else {\n if (len !== 6 && len !== 8 && len !== 9 && len !== 12) {\n if (arguments.length !== 1) {\n throw new Error(\n \"Only new Bezier(point[]) is accepted for 4th and higher order curves\"\n );\n }\n }\n }\n var _3d =\n (!higher && (len === 9 || len === 12)) ||\n (coords && coords[0] && typeof coords[0].z !== \"undefined\");\n this._3d = _3d;\n var points = [];\n for (var idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) {\n var point = {\n x: args[idx],\n y: args[idx + 1]\n };\n if (_3d) {\n point.z = args[idx + 2];\n }\n points.push(point);\n }\n this.order = points.length - 1;\n this.points = points;\n var dims = [\"x\", \"y\"];\n if (_3d) dims.push(\"z\");\n this.dims = dims;\n this.dimlen = dims.length;\n\n (function(curve) {\n var order = curve.order;\n var points = curve.points;\n var a = utils.align(points, { p1: points[0], p2: points[order] });\n for (var i = 0; i < a.length; i++) {\n if (abs(a[i].y) > 0.0001) {\n curve._linear = false;\n return;\n }\n }\n curve._linear = true;\n })(this);\n\n this._t1 = 0;\n this._t2 = 1;\n this.update();\n };\n\n var svgToBeziers = require(\"./svg-to-beziers\");\n\n /**\n * turn an svg d attribute into a sequence of Bezier segments.\n */\n Bezier.SVGtoBeziers = function(d) {\n return svgToBeziers(Bezier, d);\n };\n\n function getABC(n, S, B, E, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var u = utils.projectionratio(t, n),\n um = 1 - u,\n C = {\n x: u * S.x + um * E.x,\n y: u * S.y + um * E.y\n },\n s = utils.abcratio(t, n),\n A = {\n x: B.x + (B.x - C.x) / s,\n y: B.y + (B.y - C.y) / s\n };\n return { A: A, B: B, C: C };\n }\n\n Bezier.quadraticFromPoints = function(p1, p2, p3, t) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n // shortcuts, although they're really dumb\n if (t === 0) {\n return new Bezier(p2, p2, p3);\n }\n if (t === 1) {\n return new Bezier(p1, p2, p2);\n }\n // real fitting.\n var abc = getABC(2, p1, p2, p3, t);\n return new Bezier(p1, abc.A, p3);\n };\n\n Bezier.cubicFromPoints = function(S, B, E, t, d1) {\n if (typeof t === \"undefined\") {\n t = 0.5;\n }\n var abc = getABC(3, S, B, E, t);\n if (typeof d1 === \"undefined\") {\n d1 = utils.dist(B, abc.C);\n }\n var d2 = d1 * (1 - t) / t;\n\n var selen = utils.dist(S, E),\n lx = (E.x - S.x) / selen,\n ly = (E.y - S.y) / selen,\n bx1 = d1 * lx,\n by1 = d1 * ly,\n bx2 = d2 * lx,\n by2 = d2 * ly;\n // derivation of new hull coordinates\n var e1 = { x: B.x - bx1, y: B.y - by1 },\n e2 = { x: B.x + bx2, y: B.y + by2 },\n A = abc.A,\n v1 = { x: A.x + (e1.x - A.x) / (1 - t), y: A.y + (e1.y - A.y) / (1 - t) },\n v2 = { x: A.x + (e2.x - A.x) / t, y: A.y + (e2.y - A.y) / t },\n nc1 = { x: S.x + (v1.x - S.x) / t, y: S.y + (v1.y - S.y) / t },\n nc2 = {\n x: E.x + (v2.x - E.x) / (1 - t),\n y: E.y + (v2.y - E.y) / (1 - t)\n };\n // ...done\n return new Bezier(S, nc1, nc2, E);\n };\n\n var getUtils = function() {\n return utils;\n };\n\n Bezier.getUtils = getUtils;\n\n Bezier.PolyBezier = PolyBezier;\n\n Bezier.prototype = {\n getUtils: getUtils,\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return utils.pointsToString(this.points);\n },\n toSVG: function(relative) {\n if (this._3d) return false;\n var p = this.points,\n x = p[0].x,\n y = p[0].y,\n s = [\"M\", x, y, this.order === 2 ? \"Q\" : \"C\"];\n for (var i = 1, last = p.length; i < last; i++) {\n s.push(p[i].x);\n s.push(p[i].y);\n }\n return s.join(\" \");\n },\n update: function() {\n // one-time compute derivative coordinates\n this.dpoints = [];\n for (var p = this.points, d = p.length, c = d - 1; d > 1; d--, c--) {\n var list = [];\n for (var j = 0, dpt; j < c; j++) {\n dpt = {\n x: c * (p[j + 1].x - p[j].x),\n y: c * (p[j + 1].y - p[j].y)\n };\n if (this._3d) {\n dpt.z = c * (p[j + 1].z - p[j].z);\n }\n list.push(dpt);\n }\n this.dpoints.push(list);\n p = list;\n }\n this.computedirection();\n },\n computedirection: function() {\n var points = this.points;\n var angle = utils.angle(points[0], points[this.order], points[1]);\n this.clockwise = angle > 0;\n },\n length: function() {\n return utils.length(this.derivative.bind(this));\n },\n _lut: [],\n getLUT: function(steps) {\n steps = steps || 100;\n if (this._lut.length === steps) {\n return this._lut;\n }\n this._lut = [];\n // We want a range from 0 to 1 inclusive, so\n // we decrement and then use <= rather than <:\n steps--;\n for (var t = 0; t <= steps; t++) {\n this._lut.push(this.compute(t / steps));\n }\n return this._lut;\n },\n on: function(point, error) {\n error = error || 5;\n var lut = this.getLUT(),\n hits = [],\n c,\n t = 0;\n for (var i = 0; i < lut.length; i++) {\n c = lut[i];\n if (utils.dist(c, point) < error) {\n hits.push(c);\n t += i / lut.length;\n }\n }\n if (!hits.length) return false;\n return (t /= hits.length);\n },\n project: function(point) {\n // step 1: coarse check\n var LUT = this.getLUT(),\n l = LUT.length - 1,\n closest = utils.closest(LUT, point),\n mdist = closest.mdist,\n mpos = closest.mpos;\n if (mpos === 0 || mpos === l) {\n var t = mpos / l,\n pt = this.compute(t);\n pt.t = t;\n pt.d = mdist;\n return pt;\n }\n\n // step 2: fine check\n var ft,\n t,\n p,\n d,\n t1 = (mpos - 1) / l,\n t2 = (mpos + 1) / l,\n step = 0.1 / l;\n mdist += 1;\n for (t = t1, ft = t; t < t2 + step; t += step) {\n p = this.compute(t);\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n ft = t;\n }\n }\n p = this.compute(ft);\n p.t = ft;\n p.d = mdist;\n return p;\n },\n get: function(t) {\n return this.compute(t);\n },\n point: function(idx) {\n return this.points[idx];\n },\n compute: function(t) {\n // shortcuts\n if (t === 0) {\n return this.points[0];\n }\n if (t === 1) {\n return this.points[this.order];\n }\n\n var p = this.points;\n var mt = 1 - t;\n\n // linear?\n if (this.order === 1) {\n ret = {\n x: mt * p[0].x + t * p[1].x,\n y: mt * p[0].y + t * p[1].y\n };\n if (this._3d) {\n ret.z = mt * p[0].z + t * p[1].z;\n }\n return ret;\n }\n\n // quadratic/cubic curve?\n if (this.order < 4) {\n var mt2 = mt * mt,\n t2 = t * t,\n a,\n b,\n c,\n d = 0;\n if (this.order === 2) {\n p = [p[0], p[1], p[2], ZERO];\n a = mt2;\n b = mt * t * 2;\n c = t2;\n } else if (this.order === 3) {\n a = mt2 * mt;\n b = mt2 * t * 3;\n c = mt * t2 * 3;\n d = t * t2;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z;\n }\n return ret;\n }\n\n // higher order curves: use de Casteljau's computation\n var dCpts = JSON.parse(JSON.stringify(this.points));\n while (dCpts.length > 1) {\n for (var i = 0; i < dCpts.length - 1; i++) {\n dCpts[i] = {\n x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t,\n y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t\n };\n if (typeof dCpts[i].z !== \"undefined\") {\n dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t;\n }\n }\n dCpts.splice(dCpts.length - 1, 1);\n }\n return dCpts[0];\n },\n raise: function() {\n var p = this.points,\n np = [p[0]],\n i,\n k = p.length,\n pi,\n pim;\n for (var i = 1; i < k; i++) {\n pi = p[i];\n pim = p[i - 1];\n np[i] = {\n x: (k - i) / k * pi.x + i / k * pim.x,\n y: (k - i) / k * pi.y + i / k * pim.y\n };\n }\n np[k] = p[k - 1];\n return new Bezier(np);\n },\n derivative: function(t) {\n var mt = 1 - t,\n a,\n b,\n c = 0,\n p = this.dpoints[0];\n if (this.order === 2) {\n p = [p[0], p[1], ZERO];\n a = mt;\n b = t;\n }\n if (this.order === 3) {\n a = mt * mt;\n b = mt * t * 2;\n c = t * t;\n }\n var ret = {\n x: a * p[0].x + b * p[1].x + c * p[2].x,\n y: a * p[0].y + b * p[1].y + c * p[2].y\n };\n if (this._3d) {\n ret.z = a * p[0].z + b * p[1].z + c * p[2].z;\n }\n return ret;\n },\n inflections: function() {\n return utils.inflections(this.points);\n },\n normal: function(t) {\n return this._3d ? this.__normal3(t) : this.__normal2(t);\n },\n __normal2: function(t) {\n var d = this.derivative(t);\n var q = sqrt(d.x * d.x + d.y * d.y);\n return { x: -d.y / q, y: d.x / q };\n },\n __normal3: function(t) {\n // see http://stackoverflow.com/questions/25453159\n var r1 = this.derivative(t),\n r2 = this.derivative(t + 0.01),\n q1 = sqrt(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z),\n q2 = sqrt(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z);\n r1.x /= q1;\n r1.y /= q1;\n r1.z /= q1;\n r2.x /= q2;\n r2.y /= q2;\n r2.z /= q2;\n // cross product\n var c = {\n x: r2.y * r1.z - r2.z * r1.y,\n y: r2.z * r1.x - r2.x * r1.z,\n z: r2.x * r1.y - r2.y * r1.x\n };\n var m = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);\n c.x /= m;\n c.y /= m;\n c.z /= m;\n // rotation matrix\n var R = [\n c.x * c.x,\n c.x * c.y - c.z,\n c.x * c.z + c.y,\n c.x * c.y + c.z,\n c.y * c.y,\n c.y * c.z - c.x,\n c.x * c.z - c.y,\n c.y * c.z + c.x,\n c.z * c.z\n ];\n // normal vector:\n var n = {\n x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z,\n y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z,\n z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z\n };\n return n;\n },\n hull: function(t) {\n var p = this.points,\n _p = [],\n pt,\n q = [],\n idx = 0,\n i = 0,\n l = 0;\n q[idx++] = p[0];\n q[idx++] = p[1];\n q[idx++] = p[2];\n if (this.order === 3) {\n q[idx++] = p[3];\n }\n // we lerp between all points at each iteration, until we have 1 point left.\n while (p.length > 1) {\n _p = [];\n for (i = 0, l = p.length - 1; i < l; i++) {\n pt = utils.lerp(t, p[i], p[i + 1]);\n q[idx++] = pt;\n _p.push(pt);\n }\n p = _p;\n }\n return q;\n },\n split: function(t1, t2) {\n // shortcuts\n if (t1 === 0 && !!t2) {\n return this.split(t2).left;\n }\n if (t2 === 1) {\n return this.split(t1).right;\n }\n\n // no shortcut: use \"de Casteljau\" iteration.\n var q = this.hull(t1);\n var result = {\n left:\n this.order === 2\n ? new Bezier([q[0], q[3], q[5]])\n : new Bezier([q[0], q[4], q[7], q[9]]),\n right:\n this.order === 2\n ? new Bezier([q[5], q[4], q[2]])\n : new Bezier([q[9], q[8], q[6], q[3]]),\n span: q\n };\n\n // make sure we bind _t1/_t2 information!\n result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2);\n result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2);\n result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2);\n\n // if we have no t2, we're done\n if (!t2) {\n return result;\n }\n\n // if we have a t2, split again:\n t2 = utils.map(t2, t1, 1, 0, 1);\n var subsplit = result.right.split(t2);\n return subsplit.left;\n },\n extrema: function() {\n var dims = this.dims,\n result = {},\n roots = [],\n p,\n mfn;\n dims.forEach(\n function(dim) {\n mfn = function(v) {\n return v[dim];\n };\n p = this.dpoints[0].map(mfn);\n result[dim] = utils.droots(p);\n if (this.order === 3) {\n p = this.dpoints[1].map(mfn);\n result[dim] = result[dim].concat(utils.droots(p));\n }\n result[dim] = result[dim].filter(function(t) {\n return t >= 0 && t <= 1;\n });\n roots = roots.concat(result[dim].sort(utils.numberSort));\n }.bind(this)\n );\n roots = roots.sort(utils.numberSort).filter(function(v, idx) {\n return roots.indexOf(v) === idx;\n });\n result.values = roots;\n return result;\n },\n bbox: function() {\n var extrema = this.extrema(),\n result = {};\n this.dims.forEach(\n function(d) {\n result[d] = utils.getminmax(this, d, extrema[d]);\n }.bind(this)\n );\n return result;\n },\n overlaps: function(curve) {\n var lbbox = this.bbox(),\n tbbox = curve.bbox();\n return utils.bboxoverlap(lbbox, tbbox);\n },\n offset: function(t, d) {\n if (typeof d !== \"undefined\") {\n var c = this.get(t);\n var n = this.normal(t);\n var ret = {\n c: c,\n n: n,\n x: c.x + n.x * d,\n y: c.y + n.y * d\n };\n if (this._3d) {\n ret.z = c.z + n.z * d;\n }\n return ret;\n }\n if (this._linear) {\n var nv = this.normal(0);\n var coords = this.points.map(function(p) {\n var ret = {\n x: p.x + t * nv.x,\n y: p.y + t * nv.y\n };\n if (p.z && n.z) {\n ret.z = p.z + t * nv.z;\n }\n return ret;\n });\n return [new Bezier(coords)];\n }\n var reduced = this.reduce();\n return reduced.map(function(s) {\n return s.scale(t);\n });\n },\n simple: function() {\n if (this.order === 3) {\n var a1 = utils.angle(this.points[0], this.points[3], this.points[1]);\n var a2 = utils.angle(this.points[0], this.points[3], this.points[2]);\n if ((a1 > 0 && a2 < 0) || (a1 < 0 && a2 > 0)) return false;\n }\n var n1 = this.normal(0);\n var n2 = this.normal(1);\n var s = n1.x * n2.x + n1.y * n2.y;\n if (this._3d) {\n s += n1.z * n2.z;\n }\n var angle = abs(acos(s));\n return angle < pi / 3;\n },\n reduce: function() {\n var i,\n t1 = 0,\n t2 = 0,\n step = 0.01,\n segment,\n pass1 = [],\n pass2 = [];\n // first pass: split on extrema\n var extrema = this.extrema().values;\n if (extrema.indexOf(0) === -1) {\n extrema = [0].concat(extrema);\n }\n if (extrema.indexOf(1) === -1) {\n extrema.push(1);\n }\n\n for (t1 = extrema[0], i = 1; i < extrema.length; i++) {\n t2 = extrema[i];\n segment = this.split(t1, t2);\n segment._t1 = t1;\n segment._t2 = t2;\n pass1.push(segment);\n t1 = t2;\n }\n\n // second pass: further reduce these segments to simple segments\n pass1.forEach(function(p1) {\n t1 = 0;\n t2 = 0;\n while (t2 <= 1) {\n for (t2 = t1 + step; t2 <= 1 + step; t2 += step) {\n segment = p1.split(t1, t2);\n if (!segment.simple()) {\n t2 -= step;\n if (abs(t1 - t2) < step) {\n // we can never form a reduction\n return [];\n }\n segment = p1.split(t1, t2);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2);\n pass2.push(segment);\n t1 = t2;\n break;\n }\n }\n }\n if (t1 < 1) {\n segment = p1.split(t1, 1);\n segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2);\n segment._t2 = p1._t2;\n pass2.push(segment);\n }\n });\n return pass2;\n },\n scale: function(d) {\n var order = this.order;\n var distanceFn = false;\n if (typeof d === \"function\") {\n distanceFn = d;\n }\n if (distanceFn && order === 2) {\n return this.raise().scale(distanceFn);\n }\n\n // TODO: add special handling for degenerate (=linear) curves.\n var clockwise = this.clockwise;\n var r1 = distanceFn ? distanceFn(0) : d;\n var r2 = distanceFn ? distanceFn(1) : d;\n var v = [this.offset(0, 10), this.offset(1, 10)];\n var o = utils.lli4(v[0], v[0].c, v[1], v[1].c);\n if (!o) {\n throw new Error(\"cannot scale this curve. Try reducing it first.\");\n }\n // move all points by distance 'd' wrt the origin 'o'\n var points = this.points,\n np = [];\n\n // move end points by fixed distance along normal.\n [0, 1].forEach(\n function(t) {\n var p = (np[t * order] = utils.copy(points[t * order]));\n p.x += (t ? r2 : r1) * v[t].n.x;\n p.y += (t ? r2 : r1) * v[t].n.y;\n }.bind(this)\n );\n\n if (!distanceFn) {\n // move control points to lie on the intersection of the offset\n // derivative vector, and the origin-through-control vector\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = np[t * order];\n var d = this.derivative(t);\n var p2 = { x: p.x + d.x, y: p.y + d.y };\n np[t + 1] = utils.lli4(p, p2, o, points[t + 1]);\n }.bind(this)\n );\n return new Bezier(np);\n }\n\n // move control points by \"however much necessary to\n // ensure the correct tangent to endpoint\".\n [0, 1].forEach(\n function(t) {\n if (this.order === 2 && !!t) return;\n var p = points[t + 1];\n var ov = {\n x: p.x - o.x,\n y: p.y - o.y\n };\n var rc = distanceFn ? distanceFn((t + 1) / order) : d;\n if (distanceFn && !clockwise) rc = -rc;\n var m = sqrt(ov.x * ov.x + ov.y * ov.y);\n ov.x /= m;\n ov.y /= m;\n np[t + 1] = {\n x: p.x + rc * ov.x,\n y: p.y + rc * ov.y\n };\n }.bind(this)\n );\n return new Bezier(np);\n },\n outline: function(d1, d2, d3, d4) {\n d2 = typeof d2 === \"undefined\" ? d1 : d2;\n var reduced = this.reduce(),\n len = reduced.length,\n fcurves = [],\n bcurves = [],\n p,\n alen = 0,\n tlen = this.length();\n\n var graduated = typeof d3 !== \"undefined\" && typeof d4 !== \"undefined\";\n\n function linearDistanceFunction(s, e, tlen, alen, slen) {\n return function(v) {\n var f1 = alen / tlen,\n f2 = (alen + slen) / tlen,\n d = e - s;\n return utils.map(v, 0, 1, s + f1 * d, s + f2 * d);\n };\n }\n\n // form curve oulines\n reduced.forEach(function(segment) {\n slen = segment.length();\n if (graduated) {\n fcurves.push(\n segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))\n );\n bcurves.push(\n segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))\n );\n } else {\n fcurves.push(segment.scale(d1));\n bcurves.push(segment.scale(-d2));\n }\n alen += slen;\n });\n\n // reverse the \"return\" outline\n bcurves = bcurves\n .map(function(s) {\n p = s.points;\n if (p[3]) {\n s.points = [p[3], p[2], p[1], p[0]];\n } else {\n s.points = [p[2], p[1], p[0]];\n }\n return s;\n })\n .reverse();\n\n // form the endcaps as lines\n var fs = fcurves[0].points[0],\n fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1],\n bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1],\n be = bcurves[0].points[0],\n ls = utils.makeline(bs, fs),\n le = utils.makeline(fe, be),\n segments = [ls]\n .concat(fcurves)\n .concat([le])\n .concat(bcurves),\n slen = segments.length;\n\n return new PolyBezier(segments);\n },\n outlineshapes: function(d1, d2, curveIntersectionThreshold) {\n d2 = d2 || d1;\n var outline = this.outline(d1, d2).curves;\n var shapes = [];\n for (var i = 1, len = outline.length; i < len / 2; i++) {\n var shape = utils.makeshape(\n outline[i],\n outline[len - i],\n curveIntersectionThreshold\n );\n shape.startcap.virtual = i > 1;\n shape.endcap.virtual = i < len / 2 - 1;\n shapes.push(shape);\n }\n return shapes;\n },\n intersects: function(curve, curveIntersectionThreshold) {\n if (!curve) return this.selfintersects(curveIntersectionThreshold);\n if (curve.p1 && curve.p2) {\n return this.lineIntersects(curve);\n }\n if (curve instanceof Bezier) {\n curve = curve.reduce();\n }\n return this.curveintersects(\n this.reduce(),\n curve,\n curveIntersectionThreshold\n );\n },\n lineIntersects: function(line) {\n var mx = min(line.p1.x, line.p2.x),\n my = min(line.p1.y, line.p2.y),\n MX = max(line.p1.x, line.p2.x),\n MY = max(line.p1.y, line.p2.y),\n self = this;\n return utils.roots(this.points, line).filter(function(t) {\n var p = self.get(t);\n return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY);\n });\n },\n selfintersects: function(curveIntersectionThreshold) {\n var reduced = this.reduce();\n // \"simple\" curves cannot intersect with their direct\n // neighbour, so for each segment X we check whether\n // it intersects [0:x-2][x+2:last].\n var i,\n len = reduced.length - 2,\n results = [],\n result,\n left,\n right;\n for (i = 0; i < len; i++) {\n left = reduced.slice(i, i + 1);\n right = reduced.slice(i + 2);\n result = this.curveintersects(left, right, curveIntersectionThreshold);\n results = results.concat(result);\n }\n return results;\n },\n curveintersects: function(c1, c2, curveIntersectionThreshold) {\n var pairs = [];\n // step 1: pair off any overlapping segments\n c1.forEach(function(l) {\n c2.forEach(function(r) {\n if (l.overlaps(r)) {\n pairs.push({ left: l, right: r });\n }\n });\n });\n // step 2: for each pairing, run through the convergence algorithm.\n var intersections = [];\n pairs.forEach(function(pair) {\n var result = utils.pairiteration(\n pair.left,\n pair.right,\n curveIntersectionThreshold\n );\n if (result.length > 0) {\n intersections = intersections.concat(result);\n }\n });\n return intersections;\n },\n arcs: function(errorThreshold) {\n errorThreshold = errorThreshold || 0.5;\n var circles = [];\n return this._iterate(errorThreshold, circles);\n },\n _error: function(pc, np1, s, e) {\n var q = (e - s) / 4,\n c1 = this.get(s + q),\n c2 = this.get(e - q),\n ref = utils.dist(pc, np1),\n d1 = utils.dist(pc, c1),\n d2 = utils.dist(pc, c2);\n return abs(d1 - ref) + abs(d2 - ref);\n },\n _iterate: function(errorThreshold, circles) {\n var t_s = 0,\n t_e = 1,\n safety;\n // we do a binary search to find the \"good `t` closest to no-longer-good\"\n do {\n safety = 0;\n\n // step 1: start with the maximum possible arc\n t_e = 1;\n\n // points:\n var np1 = this.get(t_s),\n np2,\n np3,\n arc,\n prev_arc;\n\n // booleans:\n var curr_good = false,\n prev_good = false,\n done;\n\n // numbers:\n var t_m = t_e,\n prev_e = 1,\n step = 0;\n\n // step 2: find the best possible arc\n do {\n prev_good = curr_good;\n prev_arc = arc;\n t_m = (t_s + t_e) / 2;\n step++;\n\n np2 = this.get(t_m);\n np3 = this.get(t_e);\n\n arc = utils.getccenter(np1, np2, np3);\n\n //also save the t values\n arc.interval = {\n start: t_s,\n end: t_e\n };\n\n var error = this._error(arc, np1, t_s, t_e);\n curr_good = error <= errorThreshold;\n\n done = prev_good && !curr_good;\n if (!done) prev_e = t_e;\n\n // this arc is fine: we can move 'e' up to see if we can find a wider arc\n if (curr_good) {\n // if e is already at max, then we're done for this arc.\n if (t_e >= 1) {\n // make sure we cap at t=1\n arc.interval.end = prev_e = 1;\n prev_arc = arc;\n // if we capped the arc segment to t=1 we also need to make sure that\n // the arc's end angle is correct with respect to the bezier end point.\n if (t_e > 1) {\n var d = {\n x: arc.x + arc.r * cos(arc.e),\n y: arc.y + arc.r * sin(arc.e)\n };\n arc.e += utils.angle({ x: arc.x, y: arc.y }, d, this.get(1));\n }\n break;\n }\n // if not, move it up by half the iteration distance\n t_e = t_e + (t_e - t_s) / 2;\n } else {\n // this is a bad arc: we need to move 'e' down to find a good arc\n t_e = t_m;\n }\n } while (!done && safety++ < 100);\n\n if (safety >= 100) {\n break;\n }\n\n // console.log(\"L835: [F] arc found\", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e);\n\n prev_arc = prev_arc ? prev_arc : arc;\n circles.push(prev_arc);\n t_s = prev_e;\n } while (t_e < 1);\n return circles;\n }\n };\n\n module.exports = Bezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/bezier.js\n// module id = 31\n// module chunks = 0","(function() {\n \"use strict\";\n\n // math-inlining.\n var abs = Math.abs,\n cos = Math.cos,\n sin = Math.sin,\n acos = Math.acos,\n atan2 = Math.atan2,\n sqrt = Math.sqrt,\n pow = Math.pow,\n // cube root function yielding real roots\n crt = function(v) {\n return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3);\n },\n // trig constants\n pi = Math.PI,\n tau = 2 * pi,\n quart = pi / 2,\n // float precision significant decimal\n epsilon = 0.000001,\n // extremas used in bbox calculation and similar algorithms\n nMax = Number.MAX_SAFE_INTEGER || 9007199254740991,\n nMin = Number.MIN_SAFE_INTEGER || -9007199254740991;\n\n // Bezier utility functions\n var utils = {\n // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\n Tvalues: [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745\n ],\n\n // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article)\n Cvalues: [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759\n ],\n\n arcfn: function(t, derivativeFn) {\n var d = derivativeFn(t);\n var l = d.x * d.x + d.y * d.y;\n if (typeof d.z !== \"undefined\") {\n l += d.z * d.z;\n }\n return sqrt(l);\n },\n\n between: function(v, m, M) {\n return (\n (m <= v && v <= M) ||\n utils.approximately(v, m) ||\n utils.approximately(v, M)\n );\n },\n\n approximately: function(a, b, precision) {\n return abs(a - b) <= (precision || epsilon);\n },\n\n length: function(derivativeFn) {\n var z = 0.5,\n sum = 0,\n len = utils.Tvalues.length,\n i,\n t;\n for (i = 0; i < len; i++) {\n t = z * utils.Tvalues[i] + z;\n sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn);\n }\n return z * sum;\n },\n\n map: function(v, ds, de, ts, te) {\n var d1 = de - ds,\n d2 = te - ts,\n v2 = v - ds,\n r = v2 / d1;\n return ts + d2 * r;\n },\n\n lerp: function(r, v1, v2) {\n var ret = {\n x: v1.x + r * (v2.x - v1.x),\n y: v1.y + r * (v2.y - v1.y)\n };\n if (!!v1.z && !!v2.z) {\n ret.z = v1.z + r * (v2.z - v1.z);\n }\n return ret;\n },\n\n pointToString: function(p) {\n var s = p.x + \"/\" + p.y;\n if (typeof p.z !== \"undefined\") {\n s += \"/\" + p.z;\n }\n return s;\n },\n\n pointsToString: function(points) {\n return \"[\" + points.map(utils.pointToString).join(\", \") + \"]\";\n },\n\n copy: function(obj) {\n return JSON.parse(JSON.stringify(obj));\n },\n\n angle: function(o, v1, v2) {\n var dx1 = v1.x - o.x,\n dy1 = v1.y - o.y,\n dx2 = v2.x - o.x,\n dy2 = v2.y - o.y,\n cross = dx1 * dy2 - dy1 * dx2,\n dot = dx1 * dx2 + dy1 * dy2;\n return atan2(cross, dot);\n },\n\n // round as string, to avoid rounding errors\n round: function(v, d) {\n var s = \"\" + v;\n var pos = s.indexOf(\".\");\n return parseFloat(s.substring(0, pos + 1 + d));\n },\n\n dist: function(p1, p2) {\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n return sqrt(dx * dx + dy * dy);\n },\n\n closest: function(LUT, point) {\n var mdist = pow(2, 63),\n mpos,\n d;\n LUT.forEach(function(p, idx) {\n d = utils.dist(point, p);\n if (d < mdist) {\n mdist = d;\n mpos = idx;\n }\n });\n return { mdist: mdist, mpos: mpos };\n },\n\n abcratio: function(t, n) {\n // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var bottom = pow(t, n) + pow(1 - t, n),\n top = bottom - 1;\n return abs(top / bottom);\n },\n\n projectionratio: function(t, n) {\n // see u(t) note on http://pomax.github.io/bezierinfo/#abc\n if (n !== 2 && n !== 3) {\n return false;\n }\n if (typeof t === \"undefined\") {\n t = 0.5;\n } else if (t === 0 || t === 1) {\n return t;\n }\n var top = pow(1 - t, n),\n bottom = pow(t, n) + top;\n return top / bottom;\n },\n\n lli8: function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var nx =\n (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\n d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (d == 0) {\n return false;\n }\n return { x: nx / d, y: ny / d };\n },\n\n lli4: function(p1, p2, p3, p4) {\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n x3 = p3.x,\n y3 = p3.y,\n x4 = p4.x,\n y4 = p4.y;\n return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4);\n },\n\n lli: function(v1, v2) {\n return utils.lli4(v1, v1.c, v2, v2.c);\n },\n\n makeline: function(p1, p2) {\n var Bezier = require(\"./bezier\");\n var x1 = p1.x,\n y1 = p1.y,\n x2 = p2.x,\n y2 = p2.y,\n dx = (x2 - x1) / 3,\n dy = (y2 - y1) / 3;\n return new Bezier(\n x1,\n y1,\n x1 + dx,\n y1 + dy,\n x1 + 2 * dx,\n y1 + 2 * dy,\n x2,\n y2\n );\n },\n\n findbbox: function(sections) {\n var mx = nMax,\n my = nMax,\n MX = nMin,\n MY = nMin;\n sections.forEach(function(s) {\n var bbox = s.bbox();\n if (mx > bbox.x.min) mx = bbox.x.min;\n if (my > bbox.y.min) my = bbox.y.min;\n if (MX < bbox.x.max) MX = bbox.x.max;\n if (MY < bbox.y.max) MY = bbox.y.max;\n });\n return {\n x: { min: mx, mid: (mx + MX) / 2, max: MX, size: MX - mx },\n y: { min: my, mid: (my + MY) / 2, max: MY, size: MY - my }\n };\n },\n\n shapeintersections: function(\n s1,\n bbox1,\n s2,\n bbox2,\n curveIntersectionThreshold\n ) {\n if (!utils.bboxoverlap(bbox1, bbox2)) return [];\n var intersections = [];\n var a1 = [s1.startcap, s1.forward, s1.back, s1.endcap];\n var a2 = [s2.startcap, s2.forward, s2.back, s2.endcap];\n a1.forEach(function(l1) {\n if (l1.virtual) return;\n a2.forEach(function(l2) {\n if (l2.virtual) return;\n var iss = l1.intersects(l2, curveIntersectionThreshold);\n if (iss.length > 0) {\n iss.c1 = l1;\n iss.c2 = l2;\n iss.s1 = s1;\n iss.s2 = s2;\n intersections.push(iss);\n }\n });\n });\n return intersections;\n },\n\n makeshape: function(forward, back, curveIntersectionThreshold) {\n var bpl = back.points.length;\n var fpl = forward.points.length;\n var start = utils.makeline(back.points[bpl - 1], forward.points[0]);\n var end = utils.makeline(forward.points[fpl - 1], back.points[0]);\n var shape = {\n startcap: start,\n forward: forward,\n back: back,\n endcap: end,\n bbox: utils.findbbox([start, forward, back, end])\n };\n var self = utils;\n shape.intersections = function(s2) {\n return self.shapeintersections(\n shape,\n shape.bbox,\n s2,\n s2.bbox,\n curveIntersectionThreshold\n );\n };\n return shape;\n },\n\n getminmax: function(curve, d, list) {\n if (!list) return { min: 0, max: 0 };\n var min = nMax,\n max = nMin,\n t,\n c;\n if (list.indexOf(0) === -1) {\n list = [0].concat(list);\n }\n if (list.indexOf(1) === -1) {\n list.push(1);\n }\n for (var i = 0, len = list.length; i < len; i++) {\n t = list[i];\n c = curve.get(t);\n if (c[d] < min) {\n min = c[d];\n }\n if (c[d] > max) {\n max = c[d];\n }\n }\n return { min: min, mid: (min + max) / 2, max: max, size: max - min };\n },\n\n align: function(points, line) {\n var tx = line.p1.x,\n ty = line.p1.y,\n a = -atan2(line.p2.y - ty, line.p2.x - tx),\n d = function(v) {\n return {\n x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a),\n y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a)\n };\n };\n return points.map(d);\n },\n\n roots: function(points, line) {\n line = line || { p1: { x: 0, y: 0 }, p2: { x: 1, y: 0 } };\n var order = points.length - 1;\n var p = utils.align(points, line);\n var reduce = function(t) {\n return 0 <= t && t <= 1;\n };\n\n if (order === 2) {\n var a = p[0].y,\n b = p[1].y,\n c = p[2].y,\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2].filter(reduce);\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / 2 * (b - c)].filter(reduce);\n }\n return [];\n }\n\n // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\n var pa = p[0].y,\n pb = p[1].y,\n pc = p[2].y,\n pd = p[3].y,\n d = -pa + 3 * pb - 3 * pc + pd,\n a = 3 * pa - 6 * pb + 3 * pc,\n b = -3 * pa + 3 * pb,\n c = pa;\n\n if (utils.approximately(d, 0)) {\n // this is not a cubic curve.\n if (utils.approximately(a, 0)) {\n // in fact, this is not a quadratic curve either.\n if (utils.approximately(b, 0)) {\n // in fact in fact, there are no solutions.\n return [];\n }\n // linear solution:\n return [-c / b].filter(reduce);\n }\n // quadratic solution:\n var q = sqrt(b * b - 4 * a * c),\n a2 = 2 * a;\n return [(q - b) / a2, (-b - q) / a2].filter(reduce);\n }\n\n // at this point, we know we need a cubic solution:\n\n a /= d;\n b /= d;\n c /= d;\n\n var p = (3 * b - a * a) / 3,\n p3 = p / 3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n discriminant = q2 * q2 + p3 * p3 * p3,\n u1,\n v1,\n x1,\n x2,\n x3;\n if (discriminant < 0) {\n var mp3 = -p / 3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi / 3) - a / 3;\n x2 = t1 * cos((phi + tau) / 3) - a / 3;\n x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3;\n return [x1, x2, x3].filter(reduce);\n } else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a / 3;\n x2 = -u1 - a / 3;\n return [x1, x2].filter(reduce);\n } else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n return [u1 - v1 - a / 3].filter(reduce);\n }\n },\n\n droots: function(p) {\n // quadratic roots are easy\n if (p.length === 3) {\n var a = p[0],\n b = p[1],\n c = p[2],\n d = a - 2 * b + c;\n if (d !== 0) {\n var m1 = -sqrt(b * b - a * c),\n m2 = -a + b,\n v1 = -(m1 + m2) / d,\n v2 = -(-m1 + m2) / d;\n return [v1, v2];\n } else if (b !== c && d === 0) {\n return [(2 * b - c) / (2 * (b - c))];\n }\n return [];\n }\n\n // linear roots are even easier\n if (p.length === 2) {\n var a = p[0],\n b = p[1];\n if (a !== b) {\n return [a / (a - b)];\n }\n return [];\n }\n },\n\n inflections: function(points) {\n if (points.length < 4) return [];\n\n // FIXME: TODO: add in inflection abstraction for quartic+ curves?\n\n var p = utils.align(points, { p1: points[0], p2: points.slice(-1)[0] }),\n a = p[2].x * p[1].y,\n b = p[3].x * p[1].y,\n c = p[1].x * p[2].y,\n d = p[3].x * p[2].y,\n v1 = 18 * (-3 * a + 2 * b + 3 * c - d),\n v2 = 18 * (3 * a - b - 3 * c),\n v3 = 18 * (c - a);\n\n if (utils.approximately(v1, 0)) {\n if (!utils.approximately(v2, 0)) {\n var t = -v3 / v2;\n if (0 <= t && t <= 1) return [t];\n }\n return [];\n }\n\n var trm = v2 * v2 - 4 * v1 * v3,\n sq = Math.sqrt(trm),\n d = 2 * v1;\n\n if (utils.approximately(d, 0)) return [];\n\n return [(sq - v2) / d, -(v2 + sq) / d].filter(function(r) {\n return 0 <= r && r <= 1;\n });\n },\n\n bboxoverlap: function(b1, b2) {\n var dims = [\"x\", \"y\"],\n len = dims.length,\n i,\n dim,\n l,\n t,\n d;\n for (i = 0; i < len; i++) {\n dim = dims[i];\n l = b1[dim].mid;\n t = b2[dim].mid;\n d = (b1[dim].size + b2[dim].size) / 2;\n if (abs(l - t) >= d) return false;\n }\n return true;\n },\n\n expandbox: function(bbox, _bbox) {\n if (_bbox.x.min < bbox.x.min) {\n bbox.x.min = _bbox.x.min;\n }\n if (_bbox.y.min < bbox.y.min) {\n bbox.y.min = _bbox.y.min;\n }\n if (_bbox.z && _bbox.z.min < bbox.z.min) {\n bbox.z.min = _bbox.z.min;\n }\n if (_bbox.x.max > bbox.x.max) {\n bbox.x.max = _bbox.x.max;\n }\n if (_bbox.y.max > bbox.y.max) {\n bbox.y.max = _bbox.y.max;\n }\n if (_bbox.z && _bbox.z.max > bbox.z.max) {\n bbox.z.max = _bbox.z.max;\n }\n bbox.x.mid = (bbox.x.min + bbox.x.max) / 2;\n bbox.y.mid = (bbox.y.min + bbox.y.max) / 2;\n if (bbox.z) {\n bbox.z.mid = (bbox.z.min + bbox.z.max) / 2;\n }\n bbox.x.size = bbox.x.max - bbox.x.min;\n bbox.y.size = bbox.y.max - bbox.y.min;\n if (bbox.z) {\n bbox.z.size = bbox.z.max - bbox.z.min;\n }\n },\n\n pairiteration: function(c1, c2, curveIntersectionThreshold) {\n var c1b = c1.bbox(),\n c2b = c2.bbox(),\n r = 100000,\n threshold = curveIntersectionThreshold || 0.5;\n if (\n c1b.x.size + c1b.y.size < threshold &&\n c2b.x.size + c2b.y.size < threshold\n ) {\n return [\n ((r * (c1._t1 + c1._t2) / 2) | 0) / r +\n \"/\" +\n ((r * (c2._t1 + c2._t2) / 2) | 0) / r\n ];\n }\n var cc1 = c1.split(0.5),\n cc2 = c2.split(0.5),\n pairs = [\n { left: cc1.left, right: cc2.left },\n { left: cc1.left, right: cc2.right },\n { left: cc1.right, right: cc2.right },\n { left: cc1.right, right: cc2.left }\n ];\n pairs = pairs.filter(function(pair) {\n return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox());\n });\n var results = [];\n if (pairs.length === 0) return results;\n pairs.forEach(function(pair) {\n results = results.concat(\n utils.pairiteration(pair.left, pair.right, threshold)\n );\n });\n results = results.filter(function(v, i) {\n return results.indexOf(v) === i;\n });\n return results;\n },\n\n getccenter: function(p1, p2, p3) {\n var dx1 = p2.x - p1.x,\n dy1 = p2.y - p1.y,\n dx2 = p3.x - p2.x,\n dy2 = p3.y - p2.y;\n var dx1p = dx1 * cos(quart) - dy1 * sin(quart),\n dy1p = dx1 * sin(quart) + dy1 * cos(quart),\n dx2p = dx2 * cos(quart) - dy2 * sin(quart),\n dy2p = dx2 * sin(quart) + dy2 * cos(quart);\n // chord midpoints\n var mx1 = (p1.x + p2.x) / 2,\n my1 = (p1.y + p2.y) / 2,\n mx2 = (p2.x + p3.x) / 2,\n my2 = (p2.y + p3.y) / 2;\n // midpoint offsets\n var mx1n = mx1 + dx1p,\n my1n = my1 + dy1p,\n mx2n = mx2 + dx2p,\n my2n = my2 + dy2p;\n // intersection of these lines:\n var arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n),\n r = utils.dist(arc, p1),\n // arc start/end values, over mid point:\n s = atan2(p1.y - arc.y, p1.x - arc.x),\n m = atan2(p2.y - arc.y, p2.x - arc.x),\n e = atan2(p3.y - arc.y, p3.x - arc.x),\n _;\n // determine arc direction (cw/ccw correction)\n if (s < e) {\n // if s m || m > e) {\n s += tau;\n }\n if (s > e) {\n _ = e;\n e = s;\n s = _;\n }\n } else {\n // if e capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 36\n// module chunks = 0","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/promise/lib/es6-extensions.js\n// module id = 37\n// module chunks = 0","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-scripts/node_modules/whatwg-fetch/fetch.js\n// module id = 38\n// module chunks = 0","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HashRouter } from 'react-router-dom'\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(, document.getElementById('root'));\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/** @license React v16.4.2\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var k=require(\"object-assign\"),n=require(\"fbjs/lib/invariant\"),p=require(\"fbjs/lib/emptyObject\"),q=require(\"fbjs/lib/emptyFunction\"),r=\"function\"===typeof Symbol&&Symbol.for,t=r?Symbol.for(\"react.element\"):60103,u=r?Symbol.for(\"react.portal\"):60106,v=r?Symbol.for(\"react.fragment\"):60107,w=r?Symbol.for(\"react.strict_mode\"):60108,x=r?Symbol.for(\"react.profiler\"):60114,y=r?Symbol.for(\"react.provider\"):60109,z=r?Symbol.for(\"react.context\"):60110,A=r?Symbol.for(\"react.async_mode\"):60111,B=\nr?Symbol.for(\"react.forward_ref\"):60112;r&&Symbol.for(\"react.timeout\");var C=\"function\"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;hthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&\"CompositionEvent\"in window,xb=null;m.canUseDOM&&\"documentMode\"in document&&(xb=document.documentMode);\nvar yb=m.canUseDOM&&\"TextEvent\"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},Cb=!1;\nfunction Db(a,b){switch(a){case \"keyup\":return-1!==vb.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function Eb(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case \"compositionend\":return Eb(b);case \"keypress\":if(32!==b.which)return null;Cb=!0;return Ab;case \"textInput\":return a=b.data,a===Ab&&Cb?null:a;default:return null}}\nfunction Hb(a,b){if(Fb)return\"compositionend\"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){J[a]=new I(a,0,!1,a,null)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});\n[\"autoReverse\",\"externalResourcesRequired\",\"preserveAlpha\"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});\n[\"capture\",\"download\"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});[\"rowSpan\",\"start\"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Ec=/[\\-:]([a-z])/g;function Fc(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ec,\nFc);J[b]=new I(b,1,!1,a,null)});\"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/1999/xlink\")});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ec,Fc);J[b]=new I(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\")});J.tabIndex=new I(\"tabIndex\",1,!1,\"tabindex\",null);\nfunction Gc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2Gd.length&&Gd.push(a)}}}\nvar Od={get _enabled(){return Id},setEnabled:Kd,isEnabled:function(){return Id},trapBubbledEvent:K,trapCapturedEvent:Nd,dispatchEvent:Md},Pd={},Qd=0,Rd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Sd(a){Object.prototype.hasOwnProperty.call(a,Rd)||(a[Rd]=Qd++,Pd[a[Rd]]={});return Pd[a[Rd]]}function Td(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Ud(a,b){var c=Td(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Td(c)}}function Vd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Wd=m.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Xd={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},Yd=null,Zd=null,$d=null,ae=!1;\nfunction be(a,b){if(ae||null==Yd||Yd!==da())return null;var c=Yd;\"selectionStart\"in c&&Vd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $d&&ea($d,c)?null:($d=c,a=H.getPooled(Xd.select,Zd,a,b),a.type=\"select\",a.target=Yd,Ya(a),a)}\nvar ce={eventTypes:Xd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Sd(e);f=sa.onSelect;for(var g=0;gb)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||eb&&(b=8),se=b=b.length?void 0:A(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Ee(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Fe(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Ge={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction He(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ie(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?He(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Je=void 0,Ke=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ge.svg||\"innerHTML\"in a)a.innerHTML=b;else{Je=Je||document.createElement(\"div\");Je.innerHTML=\"\"+b+\"\";for(b=Je.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Le(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar Me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ne=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Me).forEach(function(a){Ne.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Me[b]=Me[a]})});\nfunction Oe(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||Me.hasOwnProperty(e)&&Me[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var Pe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction Qe(a,b,c){b&&(Pe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:A(\"61\")),null!=b.style&&\"object\"!==typeof b.style?A(\"62\",c()):void 0)}\nfunction Re(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var Se=v.thatReturns(\"\");\nfunction Te(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Sd(a);b=sa[b];for(var d=0;d\\x3c/script>\",a=a.removeChild(a.firstChild)):a=\"string\"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ve(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}\nfunction We(a,b,c,d){var e=Re(b,c);switch(b){case \"iframe\":case \"object\":K(\"load\",a);var f=c;break;case \"video\":case \"audio\":for(f=0;fmf||(a.current=lf[mf],lf[mf]=null,mf--)}function N(a,b){mf++;lf[mf]=a.current;a.current=b}var of=nf(ha),O=nf(!1),pf=ha;function qf(a){return rf(a)?pf:of.current}\nfunction sf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function rf(a){return 2===a.tag&&null!=a.type.childContextTypes}function tf(a){rf(a)&&(M(O,a),M(of,a))}function uf(a){M(O,a);M(of,a)}\nfunction vf(a,b,c){of.current!==ha?A(\"168\"):void 0;N(of,b,a);N(O,c,a)}function wf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A(\"108\",uc(a)||\"Unknown\",e);return p({},b,c)}function xf(a){if(!rf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;pf=of.current;N(of,b,a);N(O,O.current,a);return!0}\nfunction yf(a,b){var c=a.stateNode;c?void 0:A(\"169\");if(b){var d=wf(a,pf);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(of,a);N(of,d,a)}else M(O,a);N(O,b,a)}\nfunction zf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction Af(a,b,c){var d=a.alternate;null===d?(d=new zf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction Bf(a,b,c){var d=a.type,e=a.key;a=a.props;if(\"function\"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if(\"string\"===typeof d)f=5;else switch(d){case ic:return Cf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new zf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch(\"object\"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A(\"130\",null==d?\nd:typeof d,\"\")}f=void 0}}b=new zf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Cf(a,b,c,d){a=new zf(10,a,d,b);a.expirationTime=c;return a}function Df(a,b,c){a=new zf(6,a,null,b);a.expirationTime=c;return a}function Ef(a,b,c){b=new zf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction Ff(a,b,c){b=new zf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Gf=null,Hf=null;function If(a){return function(b){try{return a(b)}catch(c){}}}\nfunction Jf(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Gf=If(function(a){return b.onCommitFiberRoot(c,a)});Hf=If(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Kf(a){\"function\"===typeof Gf&&Gf(a)}function Lf(a){\"function\"===typeof Hf&&Hf(a)}var Mf=!1;\nfunction Nf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Of(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}\nfunction Pf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}\nfunction Rf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Nf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Nf(a.memoizedState),f=d.updateQueue=Nf(d.memoizedState)):e=a.updateQueue=Of(f):null===f&&(f=d.updateQueue=Of(e));null===f||e===f?Qf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Qf(e,b,c),Qf(f,b,c)):(Qf(e,b,c),f.lastUpdate=b)}\nfunction Sf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Nf(a.memoizedState):Tf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Tf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Of(b));return b}\nfunction Uf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,\"function\"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e=\"function\"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Mf=!0}return d}\nfunction Vf(a,b,c,d,e){Mf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Tf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===\ng&&(f=n)),0===h||h>w)h=w}else n=Uf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}\nfunction Wf(a,b){\"function\"!==typeof a?A(\"191\",a):void 0;a.call(b)}\nfunction Xf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Wf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Wf(b,c)),a=a.nextEffect}\nfunction Yf(a,b){return{value:a,source:b,stack:vc(b)}}var Zf=nf(null),$f=nf(null),ag=nf(0);function bg(a){var b=a.type._context;N(ag,b._changedBits,a);N($f,b._currentValue,a);N(Zf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function cg(a){var b=ag.current,c=$f.current;M(Zf,a);M($f,a);M(ag,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var dg={},eg=nf(dg),fg=nf(dg),gg=nf(dg);function hg(a){a===dg?A(\"174\"):void 0;return a}\nfunction jg(a,b){N(gg,b,a);N(fg,a,a);N(eg,dg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ie(null,\"\");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Ie(b,c)}M(eg,a);N(eg,b,a)}function kg(a){M(eg,a);M(fg,a);M(gg,a)}function lg(a){fg.current===a&&(M(eg,a),M(fg,a))}function mg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}\nvar qg={isMounted:function(a){return(a=a._reactInternalFiber)?2===kd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ng();d=og(d,a);var e=Pf(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Rf(a,e,d);pg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ng();c=og(c,a);var d=Pf(c);d.tag=2;void 0!==\nb&&null!==b&&(d.callback=b);Rf(a,d,c);pg(a,c)}};function rg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return\"function\"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}\nfunction sg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&qg.enqueueReplaceState(b,b.state,null)}\nfunction tg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=qf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=sf(a,f);f=a.updateQueue;null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;\"function\"===typeof f&&(mg(a,f,e),d.state=a.memoizedState);\"function\"===typeof c.getDerivedStateFromProps||\"function\"===typeof d.getSnapshotBeforeUpdate||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(c=d.state,\"function\"===typeof d.componentWillMount&&\nd.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&qg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Vf(a,f,e,d,b),d.state=a.memoizedState));\"function\"===typeof d.componentDidMount&&(a.effectTag|=4)}var ug=Array.isArray;\nfunction vg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A(\"110\"):void 0,d=c.stateNode);d?void 0:A(\"147\",a);var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}\"string\"!==typeof a?A(\"148\"):void 0;c._owner?void 0:A(\"254\",a)}return a}\nfunction wg(a,b){\"textarea\"!==a.type&&A(\"31\",\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\")}\nfunction xg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Af(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,dq?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,\nt);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;qx?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===\nt?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n=\"object\"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=vg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Cf(f.props.children,\na.mode,h,f.key),d.return=a,a=d):(h=Bf(f,a.mode,h),h.ref=vg(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ef(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=\na,a=d):(c(a,d),d=Df(f,a.mode,h),d.return=a,a=d),g(a);if(ug(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&wg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A(\"152\",h.displayName||h.name||\"Component\")}return c(a,d)}}var yg=xg(!0),zg=xg(!1),Ag=null,Bg=null,Cg=!1;function Dg(a,b){var c=new zf(5,null,null,0);c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Eg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Fg(a){if(Cg){var b=Bg;if(b){var c=b;if(!Eg(a,b)){b=jf(c);if(!b||!Eg(a,b)){a.effectTag|=2;Cg=!1;Ag=a;return}Dg(Ag,c)}Ag=a;Bg=kf(b)}else a.effectTag|=2,Cg=!1,Ag=a}}\nfunction Gg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;Ag=a}function Hg(a){if(a!==Ag)return!1;if(!Cg)return Gg(a),Cg=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!ef(b,a.memoizedProps))for(b=Bg;b;)Dg(a,b),b=jf(b);Gg(a);Bg=Ag?jf(a.stateNode):null;return!0}function Ig(){Bg=Ag=null;Cg=!1}function Q(a,b,c){Jg(a,b,c,b.expirationTime)}function Jg(a,b,c,d){b.child=null===a?zg(b,null,c,d):yg(b,a.child,c,d)}\nfunction Kg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Lg(a,b,c,d,e){Kg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&yf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Jg(a,b,null,e),b.child=null);Jg(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&yf(b,!0);return b.child}\nfunction Mg(a){var b=a.stateNode;b.pendingContext?vf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&vf(a,b.context,!1);jg(a,b.containerInfo)}\nfunction Ng(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=\ne.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}\nfunction Rg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,bg(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b);h=0}else if(h=\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(k,\nh):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,bg(b),R(a,b)}else Ng(b,d,h,c)}b.stateNode=h;bg(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A(\"153\"):void 0;if(null!==b.child){a=b.child;var c=Af(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Af(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}\nfunction Sg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Mg(b);break;case 2:xf(b);break;case 4:jg(b,b.stateNode.containerInfo);break;case 13:bg(b)}return null}switch(b.tag){case 0:null!==a?A(\"155\"):void 0;var d=b.type,e=b.pendingProps,f=qf(b);f=sf(b,f);d=d(e,f);b.effectTag|=1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,\"function\"===\ntypeof f&&mg(b,f,e),e=xf(b),d.updater=qg,b.stateNode=d,d._reactInternalFiber=b,tg(b,c),a=Lg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=qf(b),d=sf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=xf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=qf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?sf(b,d):ha;g=new h(g,f);b.memoizedState=null!==\ng.state&&void 0!==g.state?g.state:null;g.updater=qg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);tg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=qf(b);g=sf(b,g);var r=h.getDerivedStateFromProps;(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(k!==f||n!==g)&&sg(b,d,f,g);Mf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Vf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,f),n=b.memoizedState),(k=Mf||rg(b,k,f,w,n,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillMount&&\"function\"!==typeof d.componentWillMount||(\"function\"===typeof d.componentWillMount&&d.componentWillMount(),\"function\"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),\"function\"===typeof d.componentDidMount&&\n(b.effectTag|=4)):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):(\"function\"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=qf(b),g=sf(b,g),r=h.getDerivedStateFromProps,(h=\"function\"===typeof r||\"function\"===typeof d.getSnapshotBeforeUpdate)||\"function\"!==typeof d.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof d.componentWillReceiveProps||\n(f!==k||n!==g)&&sg(b,d,k,g),Mf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Vf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Mf?(\"function\"===typeof r&&(mg(b,r,k),w=b.memoizedState),(r=Mf||rg(b,f,k,n,w,g))?(h||\"function\"!==typeof d.UNSAFE_componentWillUpdate&&\"function\"!==typeof d.componentWillUpdate||(\"function\"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),\"function\"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),\"function\"===typeof d.componentDidUpdate&&\n(b.effectTag|=4),\"function\"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):(\"function\"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof d.getSnapshotBeforeUpdate||\nf===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Lg(a,b,d,e,c);case 3:Mg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Vf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Ig(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Bg=kf(b.stateNode.containerInfo),Ag=b,d=Cg=!0;d?(b.effectTag|=2,b.child=zg(b,null,e,c)):(Ig(),Q(a,b,e));a=b.child}else Ig(),a=R(a,b);return a;case 5:a:{hg(gg.current);e=hg(eg.current);d=Ie(e,\nb.type);e!==d&&(N(fg,b,b),N(eg,d,b));null===a&&Fg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;ef(e,d)?k=null:f&&ef(e,f)&&(b.effectTag|=16);Kg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Fg(b),b.memoizedProps=b.pendingProps,\nnull;case 16:return null;case 4:return jg(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=yg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=\nb.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Rg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Ng(b,d,g,c);else if(k===f){a=\nR(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A(\"156\")}}function Tg(a){a.effectTag|=4}var Ug=void 0,Vg=void 0,Wg=void 0;Ug=function(){};Vg=function(a,b,c){(b.updateQueue=c)&&Tg(b)};Wg=function(a,b,c,d){c!==d&&Tg(b)};\nfunction Xg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return tf(b),null;case 3:kg(b);uf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Hg(b),b.effectTag&=-3;Ug(b);return null;case 5:lg(b);d=hg(gg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=hg(eg.current);g=Xe(g,e,f,c,d);Vg(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?\nA(\"166\"):void 0,null;a=hg(eg.current);if(Hg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ze(c,e,f,a,d),b.updateQueue=d,null!==d&&Tg(b);else{a=Ue(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}We(a,e,c,d);df(e,c)&&Tg(b);b.stateNode=\na}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Wg(a,b,a.memoizedProps,c);else{if(\"string\"!==typeof c)return null===b.stateNode?A(\"166\"):void 0,null;d=hg(gg.current);hg(eg.current);Hg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,$e(d,c)&&Tg(b)):(d=Ve(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return kg(b),Ug(b),null;case 13:return cg(b),null;case 12:return null;case 0:A(\"167\");\ndefault:A(\"156\")}}function Yg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Zg(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){$g(a,c)}else b.current=null}\nfunction ah(a){\"function\"===typeof Lf&&Lf(a);switch(a.tag){case 2:Zg(a);var b=a.stateNode;if(\"function\"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){$g(a,c)}break;case 5:Zg(a);break;case 4:bh(a)}}function ch(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction dh(a){a:{for(var b=a.return;null!==b;){if(ch(b)){var c=b;break a}b=b.return}A(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A(\"161\")}c.effectTag&16&&(Le(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ch(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===\ne.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}\nfunction bh(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A(\"160\"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if(ah(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?\n(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:ah(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}\nfunction eh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Ye(c,f,e,a,d))}break;case 6:null===b.stateNode?A(\"162\"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A(\"163\")}}function fh(a,b,c){c=Pf(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gh(d);Yg(a,b)};return c}\nfunction hh(a,b,c){c=Pf(c);c.tag=3;var d=a.stateNode;null!==d&&\"function\"===typeof d.componentDidCatch&&(c.callback=function(){null===ih?ih=new Set([this]):ih.add(this);var c=b.value,d=b.stack;Yg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:\"\"})});return c}\nfunction jh(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Yf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=fh(a,d,f);Sf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&\"function\"===typeof c.componentDidCatch&&(null===ih||!ih.has(c))){a.effectTag|=1024;d=hh(a,b,f);Sf(a,d,f);return}}a=a.return}while(null!==a)}\nfunction kh(a){switch(a.tag){case 2:tf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return kg(a),uf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return lg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return kg(a),null;case 13:return cg(a),null;default:return null}}var lh=ff(),mh=2,nh=lh,oh=0,ph=0,qh=!1,S=null,rh=null,T=0,sh=-1,th=!1,U=null,uh=!1,vh=!1,ih=null;\nfunction wh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:tf(b);break;case 3:kg(b);uf(b);break;case 5:lg(b);break;case 4:kg(b);break;case 13:cg(b)}a=a.return}rh=null;T=0;sh=-1;th=!1;S=null;vh=!1}\nfunction xh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Xg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&\n(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1Fh)&&(Fh=a);return a}\nfunction pg(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!qh&&0!==T&&bHh&&A(\"185\")}else break;a=a.return}}function ng(){nh=ff()-lh;return mh=(nh/10|0)+2}\nfunction Ih(a){var b=ph;ph=2+25*(((ng()-2+500)/25|0)+1);try{return a()}finally{ph=b}}function Jh(a,b,c,d,e){var f=ph;ph=1;try{return a(b,c,d,e)}finally{ph=f}}var Kh=null,V=null,Lh=0,Mh=void 0,W=!1,X=null,Y=0,Fh=0,Nh=!1,Oh=!1,Ph=null,Qh=null,Z=!1,Rh=!1,Eh=!1,Sh=null,Hh=1E3,Gh=0,Th=1;function Uh(a){if(0!==Lh){if(a>Lh)return;null!==Mh&&hf(Mh)}var b=ff()-lh;Lh=a;Mh=gf(Vh,{timeout:10*(a-2)-b})}\nfunction Bh(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Kh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Kh);else{var c=a.remainingExpirationTime;if(0===c||b=Y)&&(!Nh||ng()>=Y);)ng(),Wh(X,Y,!Nh),Yh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Wh(X,Y,!1),Yh();null!==Qh&&(Lh=0,Mh=null);0!==Y&&Uh(Y);Qh=null;Nh=!1;$h()}function ai(a,b){W?A(\"253\"):void 0;X=a;Y=b;Wh(a,b,!1);Xh();$h()}\nfunction $h(){Gh=0;if(null!==Sh){var a=Sh;Sh=null;for(var b=0;bu&&(y=u,u=l,l=y),y=Ud(q,l),D=Ud(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,\ntop:l.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;qTh?!1:Nh=!0}\nfunction gh(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=0;Oh||(Oh=!0,Ph=a)}function Ch(a){null===X?A(\"246\"):void 0;X.remainingExpirationTime=a}function ci(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Xh()}}function di(a,b){if(Z&&!Rh){Rh=!0;try{return a(b)}finally{Rh=!1}}return a(b)}function ei(a,b){W?A(\"187\"):void 0;var c=Z;Z=!0;try{return Jh(a,b)}finally{Z=c,Xh()}}\nfunction fi(a,b,c){if(Eh)return a(b,c);Z||W||0===Fh||(Zh(Fh,!1,null),Fh=0);var d=Eh,e=Z;Z=Eh=!0;try{return a(b,c)}finally{Eh=d,(Z=e)||W||Xh()}}function gi(a){var b=Z;Z=!0;try{Jh(a)}finally{(Z=b)||W||Zh(1,!1,null)}}\nfunction hi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===kd(c)&&2===c.tag?void 0:A(\"170\");for(g=c;3!==g.tag;){if(rf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A(\"171\")}g=g.stateNode.context}c=rf(c)?wf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Pf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Rf(f,e,d);pg(f,d);return d}\nfunction ii(a){var b=a._reactInternalFiber;void 0===b&&(\"function\"===typeof a.render?A(\"188\"):A(\"268\",Object.keys(a)));a=nd(b);return null===a?null:a.stateNode}function ji(a,b,c,d){var e=b.current,f=ng();e=og(f,e);return hi(a,b,c,e,d)}function ki(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}\nfunction li(a){var b=a.findFiberByHostInstance;return Jf(p({},a,{findHostInstanceByFiber:function(a){a=nd(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}\nvar mi={updateContainerAtExpirationTime:hi,createContainer:function(a,b,c){return Ff(a,b,c)},updateContainer:ji,flushRoot:ai,requestWork:Bh,computeUniqueAsyncExpiration:Dh,batchedUpdates:ci,unbatchedUpdates:di,deferredUpdates:Ih,syncUpdates:Jh,interactiveUpdates:fi,flushInteractiveUpdates:function(){W||0===Fh||(Zh(Fh,!1,null),Fh=0)},flushControlled:gi,flushSync:ei,getPublicRootInstance:ki,findHostInstance:ii,findHostInstanceWithNoPortals:function(a){a=od(a);return null===a?null:a.stateNode},injectIntoDevTools:li};\nfunction oi(a,b,c){var d=3 that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n basename: PropTypes.string,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default BrowserRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/BrowserRouter.js\n// module id = 49\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 50\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 51\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Browser history needs a DOM');\n\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n var _props$forceRefresh = props.forceRefresh,\n forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var getDOMLocation = function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n\n\n var path = pathname + search + hash;\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path, state, key);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var handlePopState = function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n\n handlePop(getDOMLocation(event.state));\n };\n\n var handleHashChange = function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n };\n\n var forceNextPop = false;\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allKeys.indexOf(fromLocation.key);\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return basename + createPath(location);\n };\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.pushState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextKeys.push(location.key);\n allKeys = nextKeys;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n window.location.href = href;\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n\n if (canUseHistory) {\n globalHistory.replaceState({ key: key, state: state }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n setState({ action: action, location: location });\n }\n } else {\n warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n window.location.replace(href);\n }\n });\n };\n\n var go = function go(n) {\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, PopStateEvent, handlePopState);\n\n if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createBrowserHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createBrowserHistory.js\n// module id = 52\n// module chunks = 0","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash = void 0;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) {\n fromParts.unshift('..');\n }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/resolve-pathname/index.js\n// module id = 53\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n if (a === b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (aType !== bType) return false;\n\n if (aType === 'object') {\n var aValue = a.valueOf();\n var bValue = b.valueOf();\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n return aKeys.every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/value-equal/index.js\n// module id = 54\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n invariant(canUseDOM, 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = stripBasename(path, basename);\n\n return createLocation(path);\n };\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + createPath(location));\n };\n\n var push = function push(path, state) {\n warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n addEventListener(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n removeEventListener(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createHashHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createHashHistory.js\n// module id = 55\n// module chunks = 0","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var getUserConfirmation = props.getUserConfirmation,\n _props$initialEntries = props.initialEntries,\n initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n _props$initialIndex = props.initialIndex,\n initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n _props$keyLength = props.keyLength,\n keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n var transitionManager = createTransitionManager();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n };\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n });\n\n // Public interface\n\n var createHref = createPath;\n\n var push = function push(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n };\n\n var replace = function replace(path, state) {\n warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n history.entries[history.index] = location;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n var action = 'POP';\n var location = history.entries[nextIndex];\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var canGo = function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n };\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return transitionManager.setPrompt(prompt);\n };\n\n var listen = function listen(listener) {\n return transitionManager.appendListener(listener);\n };\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexport default createMemoryHistory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/history/es/createMemoryHistory.js\n// module id = 56\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createHashHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n _inherits(HashRouter, _React$Component);\n\n function HashRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, HashRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n HashRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\");\n };\n\n HashRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n basename: PropTypes.string,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"]),\n children: PropTypes.node\n};\n\n\nexport default HashRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/HashRouter.js\n// module id = 57\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from \"react-router/es/MemoryRouter\";\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/MemoryRouter.js\n// module id = 58\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n _inherits(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, MemoryRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n };\n\n MemoryRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default MemoryRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/MemoryRouter.js\n// module id = 59\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Route from \"./Route\";\nimport Link from \"./Link\";\n\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n var to = _ref.to,\n exact = _ref.exact,\n strict = _ref.strict,\n location = _ref.location,\n activeClassName = _ref.activeClassName,\n className = _ref.className,\n activeStyle = _ref.activeStyle,\n style = _ref.style,\n getIsActive = _ref.isActive,\n ariaCurrent = _ref[\"aria-current\"],\n rest = _objectWithoutProperties(_ref, [\"to\", \"exact\", \"strict\", \"location\", \"activeClassName\", \"className\", \"activeStyle\", \"style\", \"isActive\", \"aria-current\"]);\n\n var path = (typeof to === \"undefined\" ? \"undefined\" : _typeof(to)) === \"object\" ? to.pathname : to;\n\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n return React.createElement(Route, {\n path: escapedPath,\n exact: exact,\n strict: strict,\n location: location,\n children: function children(_ref2) {\n var location = _ref2.location,\n match = _ref2.match;\n\n var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n return React.createElement(Link, _extends({\n to: to,\n className: isActive ? [className, activeClassName].filter(function (i) {\n return i;\n }).join(\" \") : className,\n style: isActive ? _extends({}, style, activeStyle) : style,\n \"aria-current\": isActive && ariaCurrent || null\n }, rest));\n }\n });\n};\n\nNavLink.propTypes = {\n to: Link.propTypes.to,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n location: PropTypes.object,\n activeClassName: PropTypes.string,\n className: PropTypes.string,\n activeStyle: PropTypes.object,\n style: PropTypes.object,\n isActive: PropTypes.func,\n \"aria-current\": PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"])\n};\n\nNavLink.defaultProps = {\n activeClassName: \"active\",\n \"aria-current\": \"page\"\n};\n\nexport default NavLink;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/NavLink.js\n// module id = 60\n// module chunks = 0","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/path-to-regexp/node_modules/isarray/index.js\n// module id = 61\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Prompt from \"react-router/es/Prompt\";\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Prompt.js\n// module id = 62\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n _inherits(Prompt, _React$Component);\n\n function Prompt() {\n _classCallCheck(this, Prompt);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Prompt.prototype.enable = function enable(message) {\n if (this.unblock) this.unblock();\n\n this.unblock = this.context.router.history.block(message);\n };\n\n Prompt.prototype.disable = function disable() {\n if (this.unblock) {\n this.unblock();\n this.unblock = null;\n }\n };\n\n Prompt.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.props.when) this.enable(this.props.message);\n };\n\n Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (nextProps.when) {\n if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n } else {\n this.disable();\n }\n };\n\n Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n this.disable();\n };\n\n Prompt.prototype.render = function render() {\n return null;\n };\n\n return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n when: PropTypes.bool,\n message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n when: true\n};\nPrompt.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n block: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Prompt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Prompt.js\n// module id = 63\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Redirect from \"react-router/es/Redirect\";\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Redirect.js\n// module id = 64\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = createLocation(prevProps.to);\n var nextTo = createLocation(this.props.to);\n\n if (locationsAreEqual(prevTo, nextTo)) {\n warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return generatePath(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n computedMatch: PropTypes.object, // private, from \n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired\n }).isRequired,\n staticContext: PropTypes.object\n }).isRequired\n};\n\n\nexport default Redirect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Redirect.js\n// module id = 65\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport StaticRouter from \"react-router/es/StaticRouter\";\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/StaticRouter.js\n// module id = 66\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n if (!basename) return location;\n\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n if (!basename) return location;\n\n var base = addLeadingSlash(basename);\n\n if (location.pathname.indexOf(base) !== 0) return location;\n\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n};\n\nvar createURL = function createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n return function () {\n invariant(false, \"You cannot %s with \", methodName);\n };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n _inherits(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, StaticRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n return addLeadingSlash(_this.props.basename + createURL(path));\n }, _this.handlePush = function (location) {\n var _this$props = _this.props,\n basename = _this$props.basename,\n context = _this$props.context;\n\n context.action = \"PUSH\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleReplace = function (location) {\n var _this$props2 = _this.props,\n basename = _this$props2.basename,\n context = _this$props2.context;\n\n context.action = \"REPLACE\";\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n }, _this.handleListen = function () {\n return noop;\n }, _this.handleBlock = function () {\n return noop;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n StaticRouter.prototype.getChildContext = function getChildContext() {\n return {\n router: {\n staticContext: this.props.context\n }\n };\n };\n\n StaticRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n };\n\n StaticRouter.prototype.render = function render() {\n var _props = this.props,\n basename = _props.basename,\n context = _props.context,\n location = _props.location,\n props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: this.createHref,\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n\n return React.createElement(Router, _extends({}, props, { history: history }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object.isRequired,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n basename: \"\",\n location: \"/\"\n};\nStaticRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/StaticRouter.js\n// module id = 67\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport Switch from \"react-router/es/Switch\";\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/Switch.js\n// module id = 68\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n React.Children.forEach(children, function (element) {\n if (match == null && React.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n router: PropTypes.shape({\n route: PropTypes.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n};\n\n\nexport default Switch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/Switch.js\n// module id = 69\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport generatePath from \"react-router/es/generatePath\";\n\nexport default generatePath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/generatePath.js\n// module id = 70\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport matchPath from \"react-router/es/matchPath\";\n\nexport default matchPath;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/matchPath.js\n// module id = 71\n// module chunks = 0","// Written in this round about way for babel-transform-imports\nimport withRouter from \"react-router/es/withRouter\";\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router-dom/es/withRouter.js\n// module id = 72\n// module chunks = 0","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: PropTypes.func\n };\n\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-router/es/withRouter.js\n// module id = 73\n// module chunks = 0","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\n// module id = 74\n// module chunks = 0","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport { Route, Switch, Link} from 'react-router-dom'\nimport Draw from './Draw'\n\nclass App extends Component {\n\n render() {\n return (\n
\n
\n

\n VMT Vessel Measuring Tool\n

\n\n About\n
\n\n \n\n \n\n {/* This switch handle 404 pages */}\n \n \n \n \n \n\n
\n );\n }\n}\n\nclass About extends Component{\n render(){\n return (\n
\n

About

\n

What is this?

\n

This is a simple webapp written in javascript using ReactJs Framework.\n It can be used to digitize archeological drawings of vessels in order to calculate their capacity and weight.\n

\n

How does it work?

\n

You can watch this youtube video that show how to use this app. If you have problems you can contact me or open an issue on github.

\n

\n

\n

Saving

\n

After you have digitized your drawing you can download your file in three differents formats:

\n
\n\n

Source code

\n

This is an open source project you can find the source code at this link\n on Github.\n You can download and use this webapp even without an internet connection, after you've downloded the source code\n you can open the index.html file in the build folder with any modern browser and start measuring\n your vessels.\n

\n\n

Alternatives

\n

\n There are many other projects that calculate vessel capacity, it this projects doesn't work for you you should\n check them out. You can find a list at\n this link.\n

\n\n

Limitations

\n

\n Although this webapp displays nicely on different devices, drawing capacity is currently available only using a mouse.\n

\n\n

Dependencies

\n

This app has been built using these javascript libraries:

\n \n

Back to main page

\n
\n )\n }\n}\n\nclass NoMatch extends Component{\n render(){\n return (\n
\n

404 - Not found

\n

Page not found

\n\n

Back to main page

\n
\n )\n }\n}\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.js","import React, { Component } from 'react';\nimport './App.css';\nimport './responsive.css';\nimport Polyline from './svg_classes/Polyline'\nimport Point from './svg_classes/Point'\nimport ListPoly from './components/listPoly'\nimport Notification from './components/Notification'\nimport Steps from './components/Steps'\nimport Measures from './components/Measures'\nimport { calc_vol, calcScale, join2Polylines, innerProfileToPolygon,\n create_polygon, recreate_snapping_points } from './calc_functions'\nconst svgPanZoom = require('svg-pan-zoom')\nconst download = require(\"downloadjs\")\n\nclass Draw extends Component {\n constructor(props){\n super(props)\n this.breakLine = this.breakLine.bind(this)\n this.exitBreakLineMode = this.exitBreakLineMode.bind(this)\n this.addRotAxis = this.addRotAxis.bind(this)\n this.addMetric = this.addMetric.bind(this)\n this.addMaxFill = this.addMaxFill.bind(this)\n this.resizeSvg = this.resizeSvg.bind(this)\n this.unselect_polyline = this.unselect_polyline.bind(this)\n }\n state = {\n polylines: [],\n active_polyline: undefined,\n selectedFile: '',\n img_w: 1000,\n img_h: 1000,\n notification:{id:-1,message:''},\n toDo:{image:false, rotAxis:false, metric:false,\n int_prof:false, out_prof:false, ref_unit:false, maxFill:false}\n }\n id = 0\n not_id = 0\n\n componentDidMount(){\n //init canvas\n this.canvas = document.getElementById('canvas')\n //initialize x,y needed to calculate svg coordinate in get_point()\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point = new Point([0,0], this.canvas, this.x, this.y, 1, true)\n window.addEventListener('resize', this.resizeSvg)\n\n //global vars\n window.snapping_points = []\n window.zoom = 1\n window.r_axis = null\n window.addEventListener('keyup', this.unselect_polyline)\n\n //init zoom canvas\n this.panZoomTiger = svgPanZoom('#drawing-canvas', {\n dblClickZoomEnabled: false,\n panEnabled: true,\n zoomScaleSensitivity: 0.8,\n maxZoom: 50,\n minZoom: 0.1,\n\n onZoom: function(e){\n window.zoom = e\n this.state.polylines.forEach(function(poly){\n poly.zoom = e\n poly.setSize( e )\n\n poly.points.forEach(function(point){\n point.setSize( e )\n })\n poly.midpoints.forEach(function(point){\n point.setSize( e )\n })\n })\n if(this.metric){\n this.metric.zoom = e\n this.metric.setSize( e )\n }\n if(this.rotAxis){\n this.rotAxis.zoom = e\n this.rotAxis.setSize( e )\n }\n if(this.maxFill){\n this.maxFill.zoom = e\n this.maxFill.setSize( e )\n }\n this.new_point.zoom = e\n this.new_point.setSize( e )\n }.bind(this)\n });\n }\n\n componentWillUnmount(){\n window.removeEventListener('resize', this.resizeSvg)\n window.removeEventListener('keyup', this.unselect_polyline)\n }\n\n resizeSvg(){\n this.x = this.svg.getBoundingClientRect().left + window.scrollX\n this.y = this.svg.getBoundingClientRect().top + window.scrollY\n this.new_point.x = this.x\n this.new_point.y = this.y\n this.state.polylines.forEach(function(el){\n el.y = this.y\n el.x = this.x\n }.bind(this))\n if(this.state.active_polyline){\n let a_p = this.state.active_polyline\n a_p.x = this.x\n a_p.y = this.y\n this.setState({active_polyline:a_p})\n this.state.active_polyline.points.forEach(function(p){\n p.x = this.x\n p.y = this.y\n }.bind(this))\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // CREATE, SELECT, DESELECT POLYLINE //\n //////////////////////////////////////////////////////////////////////////////\n\n create_new_polyline(type = \"other\"){\n this.globalStopEditingMode()\n\n this.addCursorPoint()\n const new_polylines = this.state.polylines\n const polyline = new Polyline({\n points: [],\n id: this.id,\n type: type,\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n new_polylines.push( polyline )\n this.id++\n this.setState(\n { polylines: new_polylines,\n active_polyline: polyline\n }\n )\n }\n\n selectLayer(id){\n if(this.state.active_polyline){\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code:\"Escape\"})\n }\n }\n this.setState({active_polyline: this.getPolylineById(id)},\n ()=> {\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n });\n this.state.active_polyline.el.classList.toggle('active')\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // UTILITIES //\n //////////////////////////////////////////////////////////////////////////////\n\n unselect_polyline(e){\n console.log(e.code)\n if( e.code === 'Escape' || e.code === 'KeyQ'){\n if(this.state.active_polyline){\n this.state.active_polyline.el.classList.remove('active')\n this.state.active_polyline.stopEditing({'code':'Escape'})\n if(this.state.active_polyline.editing){\n this.state.active_polyline.stopEditingPoints({'code':'Escape'})\n }\n if(this.state.active_polyline.breaking_mode){\n this.exitBreakLineMode({code: 'Escape'})\n }\n }\n this.setState({active_polyline:undefined})\n recreate_snapping_points(this.state.polylines)\n\n this.checkProfile('int_prof')\n this.checkProfile('out_prof')\n if(this.new_point.added){\n this.removeCursorPoint()\n }\n //remove 0 or 1 vertex polyline\n this.state.polylines.forEach(function(polyline){\n if(polyline.points.length < 2){\n this.setState({polylines: this.state.polylines.filter(el => el.id !== polyline.id)})\n this.canvas.removeChild(polyline.el)\n }\n }.bind(this))\n }\n }\n\n globalStopEditingMode(){\n this.state.polylines.forEach(function(poly){\n poly.el.classList.remove('active')\n })\n if(this.state.active_polyline){\n this.state.active_polyline.stopEditing({'code':'Escape'})\n }\n }\n\n addNotification(message){\n this.setState({notification:{ id:this.not_id, message: message }})\n this.not_id++\n }\n\n getPolylineById(id){\n return this.state.polylines.filter(el => el.id === id)[0]\n }\n\n addCursorPoint(){\n this.canvas.appendChild(this.new_point.el)\n this.new_point.added = true\n this.new_point.select()\n }\n\n removeCursorPoint(){\n this.canvas.removeChild(this.new_point.el)\n this.new_point.added = false\n }\n\n updateToDo(type, value){\n let toDo = this.state.toDo\n toDo[type] = value\n this.setState({toDo})\n }\n\n checkProfile(type){\n const poly1 = this.state.polylines.filter(el => el.type===type)\n if(poly1.length===0){\n this.updateToDo(type, false)\n if(type==='int_prof'){\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n this.inner_poly = null\n this.setState({vessel_capacity:null})\n }\n }\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n this.vessel_poly = null\n this.setState({vessel_volume:null})\n }\n }\n else if(poly1.length===1){\n this.updateToDo(type, true)\n }\n else{\n this.updateToDo(type, false)\n let profile = type === 'int_prof' ? 'internal profile' : 'outer profile'\n this.addNotification(`There should be only one ${profile}`)\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // JOIN POLYLINES //\n //////////////////////////////////////////////////////////////////////////////\n\n joinIntExt(){\n const poly1 = this.state.polylines.filter(el => el.type==='int_prof')[0]\n const poly2 = this.state.polylines.filter(el => el.type==='out_prof')[0]\n if(!poly1 || !poly2){\n this.addNotification(\"To calculate vessel volume you need both internal and outer profiles\")\n return\n }\n this.vesselVolume = join2Polylines(poly1, poly2)\n if(!this.vesselVolume){\n this.addNotification(\"To calculate vessel volume internal and outer profiles have to share at least one vertex\")\n return\n }\n\n if(this.vessel_poly){\n this.canvas.removeChild(this.vessel_poly)\n }\n this.vessel_poly = create_polygon(this.vesselVolume, 'rgba(170, 170, 170, 0.6)')\n const volume = calc_vol(this.vesselVolume, this.scale)\n this.setState({vessel_volume:volume})\n this.canvas.appendChild(this.vessel_poly)\n }\n\n create_inner_polygon(){\n let poly = this.state.polylines.filter(el => el.type==='int_prof')\n if(poly.length===0){\n this.addNotification(\"To calculate vessel capacity you need an internal profile\")\n return\n }\n if(this.inner_poly){\n this.canvas.removeChild(this.inner_poly)\n }\n //define inner polygon points based on inner profile and rotation axis\n this.innerPolygon = innerProfileToPolygon(poly[0].points.slice())\n //create svg polygon\n this.inner_poly = create_polygon(this.innerPolygon, 'rgba(210, 204, 78, 0.28)')\n\n if(this.scale){\n const volume = calc_vol(this.innerPolygon, this.scale)\n this.setState({vessel_capacity:volume})\n }else{\n this.addNotification('Can\\'t measure, define scale first')\n }\n this.canvas.appendChild(this.inner_poly)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // ADD REFERENCE SCALE rotation axis AND MAX FILL //\n //////////////////////////////////////////////////////////////////////////////\n\n metricForm(obj){\n if(obj.ref_unit){\n this.updateToDo('ref_unit', true)\n this.setState({metric_value:obj.value, metric_unit: obj.unit}, () => {\n if(this.metric && this.metric.points.length===2){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n }\n })\n }else{\n this.updateToDo('ref_unit', false)\n this.scale = null\n }\n }\n\n defineMaxFill(){\n //remove maxFill if present\n if(this.maxFill){\n this.canvas.removeChild(this.maxFill.el)\n this.updateToDo('maxFill', false)\n }\n //create new maxFill polyline\n this.maxFill = new Polyline({\n points: [],\n id: 'max_fill',\n type: 'max_fill',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({code:'Escape'})\n }\n\n addMaxFill(e){\n this.maxFill.stroke = 'rgb(0, 255, 21)'\n this.maxFill.add_point(e)\n this.canvas.appendChild(this.maxFill.el)\n this.maxFill.draw()\n //exit editing mode\n this.maxFill.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addMaxFill)\n this.maxFill.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.maxFill = this.maxFill.points[0].cy\n this.updateToDo('maxFill', true)\n }\n\n defineMetric(){\n this.unselect_polyline({code:\"Escape\"})\n //remove metric if present\n if(this.metric){\n this.canvas.removeChild(this.metric.el)\n this.updateToDo('metric', false)\n }\n //create new metric polyline\n this.metric = new Polyline({\n points: [],\n id: 'metric',\n type: 'metric',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addMetric)\n this.metric.stopEditing({code:'Escape'})\n }\n\n addMetric(e){\n if(this.metric.points.length === 0){\n this.metric.add_point(e)\n }\n else if(this.metric.points.length === 1){\n //this is the 2nd point, add it and exit editing\n this.metric.add_point(e)\n this.metric.stroke = 'red'\n this.metric.stopEditing({code:\"Escape\"})\n //set color\n this.metric.el.classList.remove('active')\n //stop editing\n this.canvas.removeEventListener('dblclick', this.addMetric)\n this.updateToDo('metric', true)\n this.removeCursorPoint()\n if(this.state.metric_value && this.state.metric_unit){\n this.scale = calcScale(this.metric, this.state.metric_value, this.state.metric_unit)\n }\n //update volume info when metric info are updated\n if(this.innerPolygon){\n this.setState({vessel_capacity:calc_vol(this.innerPolygon, this.scale)})\n }\n if(this.vesselVolume){\n this.setState({vessel_volume:calc_vol(this.vesselVolume, this.scale)})\n }\n\n }\n }\n\n definerotAxis(){\n //remove if already present\n if(this.rotAxis){\n this.canvas.removeChild(this.rotAxis.el)\n window.r_axis = null\n this.updateToDo('rotAxis', false)\n }\n //start editing\n this.addCursorPoint()\n this.canvas.addEventListener('dblclick', this.addRotAxis)\n }\n\n addRotAxis(e){\n //create rotation axis polyline\n this.rotAxis = new Polyline({\n points: [],\n id: this.id,\n type: 'center',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n this.rotAxis.stroke = '#ff5a00'\n this.rotAxis.add_point(e)\n this.canvas.appendChild(this.rotAxis.el)\n this.rotAxis.draw()\n //exit editing mode\n this.rotAxis.el.classList.remove('active')\n this.canvas.removeEventListener('dblclick', this.addRotAxis)\n this.rotAxis.stopEditing({'code':'Escape'})\n this.removeCursorPoint()\n //update global var and toDo\n window.r_axis = this.rotAxis.points[0].cx\n this.updateToDo('rotAxis', true)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER EDITING //\n //////////////////////////////////////////////////////////////////////////////\n\n colorChange(id, color){\n const my_polyline = this.getPolylineById(id)\n my_polyline.stroke = color\n my_polyline.draw()\n }\n\n typeChange(id, type){\n this.setState(\n {polylines: this.state.polylines.map(el =>\n {\n if(el.id===id){\n el.type = type\n return el\n }\n return el\n })\n }, ()=> { this.checkProfile('int_prof'); this.checkProfile('out_prof') }\n )\n }\n\n delete_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.canvas.removeChild(this.state.active_polyline.el)\n this.setState({\n polylines:this.state.polylines.filter(\n el => el.id !== this.state.active_polyline.id),\n active_polyline: undefined\n }, ()=> {\n this.checkProfile('int_prof');\n this.checkProfile('out_prof');\n recreate_snapping_points(this.state.polylines)\n }\n )\n }\n\n edit_line(){\n this.globalStopEditingMode()\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n this.state.active_polyline.editLine()\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // LAYER BREAKING //\n //////////////////////////////////////////////////////////////////////////////\n\n enterBreakLineMode(){\n this.globalStopEditingMode()\n //check if breaking selected line is possible\n if(!this.state.active_polyline){\n this.addNotification(\"No line selected\")\n return\n }\n if(this.state.active_polyline.points.length <= 2){\n this.addNotification(\"Line has two or less vertices and can't be subdivided\")\n return\n }\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = true\n this.setState({active_polyline})\n //add breaking points to canvas\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!==this.state.active_polyline.points.length-1){\n this.canvas.appendChild(point.el)\n point.draw()\n point.el.addEventListener('click', this.breakLine)\n }\n x++\n }.bind(this))\n }\n\n exitBreakLineMode(e){\n //remove breaking points from canvas\n if ((e.code === 'Escape' || e.code === 'KeyQ') && this.state.active_polyline.breaking_mode) {\n let x = 0\n this.state.active_polyline.points.forEach(function(point) {\n if(x>0 && x!== this.state.active_polyline.points.length-1){\n point.el.removeEventListener('click', this.breakLine)\n this.canvas.removeChild(point.el)\n }\n x++\n }.bind(this))\n //update active polyline breaking mode status\n let active_polyline = this.state.active_polyline\n active_polyline.breaking_mode = false\n this.setState({active_polyline})\n }\n }\n\n breakLine(e){\n const break_point = [e.target.getAttribute('cx'), e.target.getAttribute('cy')]\n this.exitBreakLineMode({code: 'Escape'})\n //instantiate polyline list to edit\n const new_polylines = this.state.polylines\n //create a new polyline\n let polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: false,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n }\n )\n //loop over the polyine to break and add point to new polyline until you get to the breaking point\n this.state.active_polyline.points.forEach(function(point) {\n polyline.appendPoint([point.cx, point.cy])\n if(point.cx===parseFloat(break_point[0]) && point.cy===parseFloat(break_point[1])){\n //save draw and exit editing mode\n polyline.el.classList.remove('active')\n new_polylines.push( polyline )\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //create a new polyline with starting point the breaking point\n polyline = new Polyline({\n points: [],\n id: this.id,\n type: 'other',\n selected: true,\n canvas: this.canvas,\n offsetX: this.x,\n offsetY: this.y,\n currentZoom: this.panZoomTiger.getZoom()\n })\n polyline.appendPoint([point.cx, point.cy])\n }\n }.bind(this))\n //save draw and exit editing mode for sencond line\n new_polylines.push(polyline)\n this.id++\n polyline.draw()\n polyline.stopEditing({'code':'Escape'})\n //delete orignal broken line and exit editing mode\n this.state.active_polyline.stopEditing({'code':'Escape'})\n this.canvas.removeChild(this.state.active_polyline.el)\n //update the state with the two new lines without the old one\n this.setState(\n { polylines: new_polylines.filter(el=>el.id!==this.state.active_polyline.id),\n active_polyline: polyline\n }\n )\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // HANDLE IMAGE //\n //////////////////////////////////////////////////////////////////////////////\n\n image_rotate(e){\n this.bck_image.style.transform = `rotate(${e.target.value}deg)`\n }\n\n fileChangedHandler(e){\n let img_name = e.target.value.split(\"\\\\\")\n img_name = img_name[img_name.length-1]\n this.setState({img_name})\n var img = new Image();\n img.src = window.URL.createObjectURL( e.target.files[0] );\n img.onload = function() {\n var width = img.naturalWidth\n var height = img.naturalHeight\n let toDo = this.state.toDo\n toDo.image = true\n this.setState({\n img_w:width,\n img_h:height,\n selectedFile: img.src,\n toDo: toDo\n })\n }.bind(this)\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // DOWNLOAD //\n //////////////////////////////////////////////////////////////////////////////\n\n download_svg(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n let saved_path = this.state.selectedFile\n if(this.state.img_name){\n this.setState({selectedFile:this.state.img_name.replace('href':'xlink:href')}, ()=> {\n download(this.svg.outerHTML, \"dlText.svg\", \"text/plain\");\n this.setState({selectedFile:saved_path})\n })\n }else{\n download(this.svg.outerHTML, \"myVessel.svg\", \"text/plain\");\n }\n }\n\n download_dxf(){\n if(this.state.polylines.length===0){\n this.addNotification('No polylines to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n var makerjs = require('makerjs');\n let models = {models:{}}\n let x = 1\n this.state.polylines.forEach(function(polyline){\n let points = polyline.el.getAttribute('points');\n let closed = false; //true for SVG polygon, false for SVG polyline\n let model = makerjs.model.mirror(new makerjs.models.ConnectTheDots(closed, points), false, true);\n model = makerjs.model.scale(model, this.scale/10)\n models.models[`my-${x}-line`] = model\n x++\n }.bind(this))\n models.units = makerjs.units.Meter;\n let file = makerjs.exporter.toDXF(models, {units:makerjs.unitType.Meter})\n download(file, \"myVessel.dxf\", \"text/plain\");\n }\n\n download_json(){\n let title = 'myVessel'\n let coordinates, author, description = ''\n\n let int_prof = this.state.polylines.filter(el=>el.type==='int_prof')\n if(int_prof.length > 0){\n int_prof = int_prof[0]\n }else{\n this.addNotification('No inner profile to export')\n return\n }\n if(!this.scale){\n this.addNotification('You need to define a reference scale before export')\n return\n }\n coordinates = []\n int_prof.points.forEach(function(point){\n // scale the point - unit will be dm - convert to cm - invert y axis\n coordinates.push( [point.cx*this.scale/10, point.cy*this.scale/10*-1] )\n }.bind(this))\n coordinates = JSON.stringify(coordinates)\n let json = `{ \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": ${coordinates}\n },\n \"properties\": {\n \"title\": \"${title}\",\n \"description\": \"${description}\",\n \"author\": \"${author}\"\n }\n }`\n this.addNotification('Export completed')\n download(json, `${title}.json`, \"text/plain\");\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // RENDER //\n //////////////////////////////////////////////////////////////////////////////\n\n render() {\n return (\n
\n\n \n\n

Draw

\n
\n {this.svg = svg}}>\n \n {this.bck_image=bck_image}}\n id=\"bck-img\" href={this.state.selectedFile} x=\"0\" y=\"0\"\n height={this.state.img_h} width={this.state.img_w}/>\n \n \n
\n
Actions:
\n \n New\n
\n \n Break\n
\n \n Delete\n \n \n Edit\n \n\n
Export:
\n \n SVG\n \n \n DXF\n \n \n JSON\n \n \n \n\n
\n
Layers:
\n {this.state.toDo.image &&
\n
\n \n \n
\n
}\n {this.state.polylines.map(el =>\n \n )}\n
\n
\n Double-left-click to draw a point, single left-click and hold to pan the view,\n single left-click to select vertices (in edit and break mode),\n mouse wheel scroll to zoom in and out. Click the listed lines in the Layer section to select a line.\n Press Esc or q to quit editing mode and deselect.\n
\n \n\n \n\n \n );\n }\n }\n\n export default Draw;\n\n //get point coordinates from event\n //get_point(e){\n // const matrix = this.canvas.transform.baseVal[0].matrix\n // const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n // return newPoint\n //}\n //\n //\n //\n //joinTwoPolylines(poly1, poly2){\n // const new_poly = join2Polylines(poly1, poly2)\n //\n // if(!new_poly){\n // this.addNotification(\"Not joinable\")\n // return\n // }\n // return joined_poly\n //\n // //const joined_poly = new Polyline({\n // // points: cleanedPoly(new_poly),\n // // id: this.id,\n // // type: poly1.type,\n // // selected: true,\n // // canvas: this.canvas,\n // // offsetX: this.x,\n // // offsetY: this.y,\n // // currentZoom: this.panZoomTiger.getZoom()\n // //})\n // //joined_poly.stopEditing({code:'Escape'})\n // //this.canvas.removeChild(joined_poly.el)\n // //this.id++\n //\n // //this.canvas.removeChild(poly1.el)\n // //this.canvas.removeChild(poly2.el)\n // //this.canvas.appendChild(joined_poly.el)\n // //joined_poly.draw()\n ////\n // //let new_polylines = this.state.polylines.filter(el => el.id!==poly1.id && el.id !==poly2.id )\n // //new_polylines.push(joined_poly)\n // //this.addNotification(message)\n // //this.setState(\n // // { polylines: new_polylines,\n // // notification:{ id:this.not_id, message: message },\n // // active_polyline: joined_poly\n // // }\n // //)\n // //this.not_id++\n //}\n //joinTwoLines(){\n // //TODO\n // this.addNotification(\"Select first line\")\n //}\n //\n // Join 2 lines\n //\n\n\n\n// WEBPACK FOOTER //\n// ./src/Draw.js","import Point from './Point'\nimport MidPoint from './MidPoint'\nimport {cleanedPoly} from './../calc_functions'\n\nexport default class Poly {\n\n constructor(obj) {\n this.points = obj.points\n this.fill = 'none'\n this.stroke = 'magenta'\n this.base_size = 5\n this.id = obj.id\n this.type = obj.type\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n this.el.classList.add('active')\n this.canvas = obj.canvas\n\n this.x = obj.offsetX\n this.y = obj.offsetY\n\n this.zoom = obj.currentZoom\n this.setSize(this.zoom)\n\n this.canvas.appendChild(this.el)\n\n this.draw = this.draw.bind(this)\n this.stopEditing = this.stopEditing.bind(this)\n this.stopEditingPoints = this.stopEditingPoints.bind(this)\n this.get_point = this.get_point.bind(this)\n this.previewPoint = this.previewPoint.bind(this)\n this.create = this.create.bind(this)\n this.add_point = this.add_point.bind(this)\n\n this.canvas.addEventListener('dblclick', this.add_point)\n\n this.editing = false\n this.breaking_mode = false\n\n this.midpoints = []\n }\n\n setSize(zoom){\n this.strokeWidth = this.base_size/zoom\n this.draw()\n }\n draw() {\n this.el.setAttribute('points', this.pointsTo())\n this.el.id = this.id\n this.el.style.fill = this.fill\n this.el.style.stroke = this.stroke\n this.el.style.strokeWidth = this.strokeWidth\n if (this.editing) {\n this.draw_midpoints()\n }\n }\n\n draw_midpoints() {\n //remove from canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n //recreate midpoints\n let index = 0\n this.points.forEach(function(point) {\n if (index > 0 && this.points.length > index) {\n if(point.cx !== this.points[index - 1].cx && point.cy !== this.points[index - 1].cy){\n const midpoint = new MidPoint(\n [ (point.cx + this.points[index - 1].cx) / 2,\n (point.cy + this.points[index - 1].cy) / 2 ],\n index, this.zoom)\n this.midpoints.push(midpoint)\n }\n }\n index++\n }.bind(this))\n //add midpoints to canvas\n this.midpoints.forEach(function(midpoint) {\n this.canvas.appendChild(midpoint.el)\n midpoint.draw()\n midpoint.el.addEventListener('click', this.create)\n }.bind(this))\n }\n\n create(e) {\n const index = e.target.getAttribute('index')\n const new_point = new Point( [parseFloat(e.target.getAttribute('cx')), parseFloat(e.target.getAttribute('cy'))],\n this.canvas, this.x, this.y, this.zoom\n )\n this.addPointInMiddle(index, new_point)\n }\n\n addPointInMiddle(index, new_point) {\n this.points.splice(index, 0, new_point)\n this.canvas.appendChild(new_point.el)\n new_point.draw()\n new_point.edit()\n new_point.select()\n this.draw()\n }\n\n pointsTo() {\n let str = ''\n this.points.forEach(function(point) {\n str += `${point.cx}, ${point.cy} `\n })\n return str\n }\n\n //add point\n add_point(e){\n let new_point = this.get_point(e)\n if(this.type==='max_fill'){\n let point = [-1000000, new_point[1]]\n this.appendPoint(point)\n point = [1000000, new_point[1]]\n this.appendPoint(point)\n return\n }\n if(this.type==='center'){\n let point = [new_point[0], -1000000]\n this.appendPoint(point)\n point = [new_point[0], 1000000]\n this.appendPoint(point)\n return\n }\n\n this.appendPoint(new_point)\n }\n\n appendPoint(array) {\n window.snapping_points.push([array[0], array[1]])\n const point = new Point([array[0], array[1]], this.canvas, this.x, this.y, this.zoom)\n this.points.push(point)\n this.draw()\n if (this.points.length === 1) {\n window.addEventListener('mousemove', this.previewPoint)\n window.addEventListener('keyup', this.stopEditing)\n }\n }\n\n get_point(e){\n const matrix = this.canvas.transform.baseVal[0].matrix\n const newPoint = [((e.pageX-matrix.e-this.x)/matrix.a),((e.pageY-matrix.f-this.y)/matrix.a)]\n return this.snapPoint(newPoint)\n }\n\n snapPoint(new_point){\n const max_dist = 25/window.zoom\n let founds = []\n window.snapping_points.forEach(function(point){\n if(new_point[0]+max_dist > point[0] && new_point[0]-max_dist < point[0] ){\n if(new_point[1]+max_dist > point[1] && new_point[1]-max_dist < point[1] ){\n const dist = Math.sqrt(\n Math.pow((new_point[0]-point[0]), 2) + Math.pow((new_point[1]-point[1]) ,2)\n )\n founds.push({point:[point[0], point[1]], dist:dist})\n }\n }\n })\n if(founds.length>0){\n //sort array by distance\n founds.sort((a,b)=>a.dist-b.dist);\n new_point = founds[0].point\n }\n if(window.r_axis){\n if(new_point[0]+max_dist > window.r_axis && new_point[0]-window.r_axis < max_dist ){\n new_point[0] = window.r_axis\n }\n }\n return new_point\n\n }\n\n previewPoint(e) {\n const new_point = this.get_point(e)\n this.points.push(new Point([new_point[0], new_point[1]], this.canvas, this.x, this.y, this.zoom))\n this.draw()\n this.removeLastPoint()\n }\n\n editLine() {\n this.editing = true\n window.addEventListener('keyup', this.stopEditingPoints)\n this.points.forEach(function(point) {\n point.x = this.x\n point.y = this.y\n this.canvas.appendChild(point.el)\n point.draw()\n point.edit()\n }.bind(this))\n this.draw_midpoints()\n window.addEventListener('mousemove', this.draw)\n }\n\n stopEditingPoints(e) {\n this.editing = false\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n window.removeEventListener('mousemove', this.draw)\n }\n this.midpoints.forEach(function(midpoint) {\n this.canvas.removeChild(midpoint.el)\n }.bind(this))\n this.midpoints = []\n this.points.forEach(function(point) {\n this.canvas.removeChild(point.el)\n point.clear()\n }.bind(this))\n this.points = cleanedPoly(this.points)\n this.draw()\n window.removeEventListener('keyup', this.stopEditingPoints)\n }\n\n removeLastPoint() {\n this.points.pop()\n }\n\n stopEditing(e) {\n if (e.code === 'Escape' || e.code === 'KeyQ') {\n this.draw()\n this.canvas.removeEventListener('dblclick', this.add_point)\n window.removeEventListener('mousemove', this.previewPoint)\n window.removeEventListener('keyup', this.stopEditing)\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/Polyline.js","export default class MidPoint {\n\n constructor(points, index, zoom) {\n this.cx = points[0]\n this.cy = points[1]\n this.fill = '#2da7cf80'\n this.stroke = 'rgb(123, 207, 225)'\n this.strokeWidth = '2'\n this.index = index\n this.el = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n this.zoom = zoom\n\n this.base_size = 17\n this.size = this.base_size / zoom\n this.base_stroke = 5\n this.strokeWidth = this.base_stroke / zoom\n\n }\n\n setSize(zoom) {\n this.zoom = zoom\n this.strokeWidth = this.base_stroke / zoom\n this.size = this.base_size / zoom\n this.draw()\n }\n\n draw() {\n this.el.setAttribute('x', this.cx - (this.size/2))\n this.el.setAttribute('y', this.cy - (this.size/2))\n this.el.setAttribute('cx', this.cx)\n this.el.setAttribute('cy', this.cy)\n this.el.setAttribute('height', this.size)\n this.el.setAttribute('width', this.size)\n this.el.setAttribute('index', this.index)\n this.el.style.fill = this.fill\n this.el.style.strokeWidth = this.strokeWidth\n this.el.style.stroke = this.stroke\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/svg_classes/MidPoint.js","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/area.js\n// module id = 81\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/centroid.js\n// module id = 82\n// module chunks = 0","import cross from \"./cross\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/hull.js\n// module id = 83\n// module chunks = 0","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/cross.js\n// module id = 84\n// module chunks = 0","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/contains.js\n// module id = 85\n// module chunks = 0","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-polygon/src/length.js\n// module id = 86\n// module chunks = 0","import React, { Component } from 'react';\n\nexport default class ListPoly extends Component {\n state = {\n types : [\n {val: 'other', text: 'Other'},\n {val: 'int_prof', text: 'Inner profile'},\n {val: 'out_prof', text: 'Outer profile'},\n {val: 'handle', text: 'Handle'},\n ],\n colors : [\n {val: 'magenta', text: 'Magenta'},\n {val: '#1d47ff', text: 'Blue'},\n {val: '#ff3b30', text: 'Red'},\n {val: '#4bea4b', text: 'Green'},\n {val: 'black', text: 'Black'},\n {val: 'white', text: 'White'},\n ]\n }\n\n colorChange(e){\n this.props.colorChange(this.props.id, e.target.value)\n this.color.value = e.target.value\n }\n\n typeChange(e){\n this.props.typeChange(this.props.id, e.target.value)\n this.type.value = e.target.value\n }\n\n render(){\n return (\n this.props.selectLayer(this.props.id)}\n >\n
\n \n
\n
\n \n
\n
\n \n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/listPoly.js","import React, { Component } from 'react';\n\nexport default class Notification extends Component {\n state = {\n id: -1\n }\n componentWillReceiveProps(nextProps){\n if(nextProps.notification.id!==this.state.id){\n this.setState({id:nextProps.notification.id})\n this.notification.innerHTML = nextProps.notification.message\n this.notification.style.display = \"block\"\n setTimeout(()=>this.notification.style.display=\"none\", 1500)\n }\n }\n render(){\n return (\n
this.notification=notification}>
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Notification.js","import React, { Component } from 'react';\n\nexport default class Steps extends Component {\n metricForm(){\n const value = this.ref_val.value\n const unit = this.reference_unit.value\n if(value&&unit){\n this.props.handleForm({ref_unit: true, value:value, unit:unit})\n }else{\n this.props.handleForm({ref_unit: false, value:value, unit:unit})\n }\n }\n\n render(){\n return (\n
\n

Steps:

\n
    \n
  • \n
    \n
    \n
    \n 1. Select image\n
    \n
    \n \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 2. Draw rotation axis\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 3. Draw reference scale\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 4. Define reference scale length\n
    \n
    \n {this.ref_val = ref_val}}>\n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 5. Draw inner profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 6. Draw outer profile\n
    \n
    \n \n
    \n
  • \n
  • \n
    \n
    \n
    \n 7- Draw max fill limit\n
    \n
    \n \n
    \n
  • \n
\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Steps.js","import React, { Component } from 'react';\n\nexport default class Measures extends Component {\n state = {\n vessel_weight: 0,\n total_weight: 0,\n\n vessel_volume: 0,\n vessel_unit: 1,\n vessel_specific_weight: 2,\n\n content_specific_weight: 1,\n content_volume: 0,\n }\n\n componentWillReceiveProps(nProp){\n this.setState({content_volume:nProp.content_volume, vessel_volume:nProp.vessel_volume}, () => this.vesselWeightCalc())\n }\n\n vesselWeightCalc(){\n this.setState({ vessel_weight: this.state.vessel_unit * this.state.vessel_specific_weight * this.state.vessel_volume}, () => {\n this.contentWeightCalc()\n })\n }\n\n contentWeightCalc(){\n this.setState(\n { total_weight: this.state.vessel_weight + (this.state.content_volume * this.state.content_specific_weight)}\n )\n }\n\n contentWeightSetter(e){\n this.setState({content_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselUnitSetter(e){\n this.setState({vessel_unit:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n VesselSpecWeightSetter(e){\n this.setState({vessel_specific_weight:parseFloat(e.target.value)}, () => {\n this.vesselWeightCalc()\n })\n }\n\n render(){\n return (\n
\n

Measures:

\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n

Volume

\n }\n
\n { this.props.toDo.int_prof && this.props.toDo.ref_unit\n && this.props.toDo.metric &&\n
\n \n Calculate capacity\n
\n\n { this.props.content_volume &&\n
\n Volume: {this.props.content_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n
\n }\n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n
\n \n Calculate vessel volume\n
\n\n { this.props.vessel_volume &&\n
\n Volume: {this.props.vessel_volume.toFixed(2)} dm3 (liters)\n
\n }\n\n \n }\n \n { this.props.toDo.out_prof && this.props.toDo.int_prof\n && this.props.toDo.ref_unit && this.props.toDo.metric &&\n this.props.vessel_volume && this.props.content_volume &&\n
\n

Weight

\n
\n

Insert specfic weight of vessel's material to calculate vessel weight:

\n \n \n
Vessel weight:\n {this.state.vessel_weight.toFixed(2)}\n Kg\n
\n
\n
\n

Insert type of content to calculate full weight:

\n \n
Full weight:\n {this.state.total_weight.toFixed(2)}\n Kg\n
\n
\n\n
\n }\n { (!this.props.toDo.int_prof || !this.props.toDo.ref_unit\n || !this.props.toDo.metric) &&\n
\n

No calculations available, follow the steps listed on the left

\n
\n }\n
\n )\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Measures.js","var SvgPanZoom = require('./svg-pan-zoom.js');\n\nmodule.exports = SvgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/browserify.js\n// module id = 91\n// module chunks = 0","var Wheel = require('./uniwheel')\n, ControlIcons = require('./control-icons')\n, Utils = require('./utilities')\n, SvgUtils = require('./svg-utilities')\n, ShadowViewport = require('./shadow-viewport')\n\nvar SvgPanZoom = function(svg, options) {\n this.init(svg, options)\n}\n\nvar optionsDefaults = {\n viewportSelector: '.svg-pan-zoom_viewport' // Viewport selector. Can be querySelector string or SVGElement\n, panEnabled: true // enable or disable panning (default enabled)\n, controlIconsEnabled: false // insert icons to give user an option in addition to mouse events to control pan/zoom (default disabled)\n, zoomEnabled: true // enable or disable zooming (default enabled)\n, dblClickZoomEnabled: true // enable or disable zooming by double clicking (default enabled)\n, mouseWheelZoomEnabled: true // enable or disable zooming by mouse wheel (default enabled)\n, preventMouseEventsDefault: true // enable or disable preventDefault for mouse events\n, zoomScaleSensitivity: 0.1 // Zoom sensitivity\n, minZoom: 0.5 // Minimum Zoom level\n, maxZoom: 10 // Maximum Zoom level\n, fit: true // enable or disable viewport fit in SVG (default true)\n, contain: false // enable or disable viewport contain the svg (default false)\n, center: true // enable or disable viewport centering in SVG (default true)\n, refreshRate: 'auto' // Maximum number of frames per second (altering SVG's viewport)\n, beforeZoom: null\n, onZoom: null\n, beforePan: null\n, onPan: null\n, customEventsHandler: null\n, eventsListenerElement: null\n, onUpdatedCTM: null\n}\n\nSvgPanZoom.prototype.init = function(svg, options) {\n var that = this\n\n this.svg = svg\n this.defs = svg.querySelector('defs')\n\n // Add default attributes to SVG\n SvgUtils.setupSvgAttributes(this.svg)\n\n // Set options\n this.options = Utils.extend(Utils.extend({}, optionsDefaults), options)\n\n // Set default state\n this.state = 'none'\n\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Init shadow viewport\n this.viewport = ShadowViewport(SvgUtils.getOrCreateViewport(this.svg, this.options.viewportSelector), {\n svg: this.svg\n , width: this.width\n , height: this.height\n , fit: this.options.fit\n , contain: this.options.contain\n , center: this.options.center\n , refreshRate: this.options.refreshRate\n // Put callbacks into functions as they can change through time\n , beforeZoom: function(oldScale, newScale) {\n if (that.viewport && that.options.beforeZoom) {return that.options.beforeZoom(oldScale, newScale)}\n }\n , onZoom: function(scale) {\n if (that.viewport && that.options.onZoom) {return that.options.onZoom(scale)}\n }\n , beforePan: function(oldPoint, newPoint) {\n if (that.viewport && that.options.beforePan) {return that.options.beforePan(oldPoint, newPoint)}\n }\n , onPan: function(point) {\n if (that.viewport && that.options.onPan) {return that.options.onPan(point)}\n }\n , onUpdatedCTM: function(ctm) {\n if (that.viewport && that.options.onUpdatedCTM) {return that.options.onUpdatedCTM(ctm)}\n }\n })\n\n // Wrap callbacks into public API context\n var publicInstance = this.getPublicInstance()\n publicInstance.setBeforeZoom(this.options.beforeZoom)\n publicInstance.setOnZoom(this.options.onZoom)\n publicInstance.setBeforePan(this.options.beforePan)\n publicInstance.setOnPan(this.options.onPan)\n publicInstance.setOnUpdatedCTM(this.options.onUpdatedCTM)\n\n if (this.options.controlIconsEnabled) {\n ControlIcons.enable(this)\n }\n\n // Init events handlers\n this.lastMouseWheelEventTime = Date.now()\n this.setupHandlers()\n}\n\n/**\n * Register event handlers\n */\nSvgPanZoom.prototype.setupHandlers = function() {\n var that = this\n , prevEvt = null // use for touchstart event to detect double tap\n ;\n\n this.eventListeners = {\n // Mouse down group\n mousedown: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n , touchstart: function(evt) {\n var result = that.handleMouseDown(evt, prevEvt);\n prevEvt = evt\n return result;\n }\n\n // Mouse up group\n , mouseup: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchend: function(evt) {\n return that.handleMouseUp(evt);\n }\n\n // Mouse move group\n , mousemove: function(evt) {\n return that.handleMouseMove(evt);\n }\n , touchmove: function(evt) {\n return that.handleMouseMove(evt);\n }\n\n // Mouse leave group\n , mouseleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchleave: function(evt) {\n return that.handleMouseUp(evt);\n }\n , touchcancel: function(evt) {\n return that.handleMouseUp(evt);\n }\n }\n\n // Init custom events handler if available\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.init({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n\n // Custom event handler may halt builtin listeners\n var haltEventListeners = this.options.customEventsHandler.haltEventListeners\n if (haltEventListeners && haltEventListeners.length) {\n for (var i = haltEventListeners.length - 1; i >= 0; i--) {\n if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) {\n delete this.eventListeners[haltEventListeners[i]]\n }\n }\n }\n }\n\n // Bind eventListeners\n for (var event in this.eventListeners) {\n // Attach event to eventsListenerElement or SVG if not available\n (this.options.eventsListenerElement || this.svg)\n .addEventListener(event, this.eventListeners[event], false)\n }\n\n // Zoom using mouse wheel\n if (this.options.mouseWheelZoomEnabled) {\n this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true\n this.enableMouseWheelZoom()\n }\n}\n\n/**\n * Enable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.enableMouseWheelZoom = function() {\n if (!this.options.mouseWheelZoomEnabled) {\n var that = this\n\n // Mouse wheel listener\n this.wheelListener = function(evt) {\n return that.handleMouseWheel(evt);\n }\n\n // Bind wheelListener\n Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n\n this.options.mouseWheelZoomEnabled = true\n }\n}\n\n/**\n * Disable ability to zoom using mouse wheel\n */\nSvgPanZoom.prototype.disableMouseWheelZoom = function() {\n if (this.options.mouseWheelZoomEnabled) {\n Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false)\n this.options.mouseWheelZoomEnabled = false\n }\n}\n\n/**\n * Handle mouse wheel event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseWheel = function(evt) {\n if (!this.options.zoomEnabled || this.state !== 'none') {\n return;\n }\n\n if (this.options.preventMouseEventsDefault){\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n }\n\n // Default delta in case that deltaY is not available\n var delta = evt.deltaY || 1\n , timeDelta = Date.now() - this.lastMouseWheelEventTime\n , divider = 3 + Math.max(0, 30 - timeDelta)\n\n // Update cache\n this.lastMouseWheelEventTime = Date.now()\n\n // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0)\n if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) {\n delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY\n }\n\n delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider\n\n var inversedScreenCTM = this.svg.getScreenCTM().inverse()\n , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM)\n , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior\n\n this.zoomAtPoint(zoom, relativeMousePoint)\n}\n\n/**\n * Zoom in at a SVG point\n *\n * @param {SVGPoint} point\n * @param {Float} zoomScale Number representing how much to zoom\n * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value.\n * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%)\n */\nSvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) {\n var originalState = this.viewport.getOriginalState()\n\n if (!zoomAbsolute) {\n // Fit zoomScale in set bounds\n if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) {\n zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom()\n } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) {\n zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom()\n }\n } else {\n // Fit zoomScale in set bounds\n zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale))\n // Find relative scale to achieve desired scale\n zoomScale = zoomScale/this.getZoom()\n }\n\n var oldCTM = this.viewport.getCTM()\n , relativePoint = point.matrixTransform(oldCTM.inverse())\n , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y)\n , newCTM = oldCTM.multiply(modifier)\n\n if (newCTM.a !== oldCTM.a) {\n this.viewport.setCTM(newCTM)\n }\n}\n\n/**\n * Zoom at center point\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.zoom = function(scale, absolute) {\n this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute)\n}\n\n/**\n * Zoom used by public instance\n *\n * @param {Float} scale\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoom = function(scale, absolute) {\n if (absolute) {\n scale = this.computeFromRelativeZoom(scale)\n }\n\n this.zoom(scale, absolute)\n}\n\n/**\n * Zoom at point used by public instance\n *\n * @param {Float} scale\n * @param {SVGPoint|Object} point An object that has x and y attributes\n * @param {Boolean} absolute Marks zoom scale as relative or absolute\n */\nSvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) {\n if (absolute) {\n // Transform zoom into a relative value\n scale = this.computeFromRelativeZoom(scale)\n }\n\n // If not a SVGPoint but has x and y then create a SVGPoint\n if (Utils.getType(point) !== 'SVGPoint') {\n if('x' in point && 'y' in point) {\n point = SvgUtils.createSVGPoint(this.svg, point.x, point.y)\n } else {\n throw new Error('Given point is invalid')\n }\n }\n\n this.zoomAtPoint(scale, point, absolute)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getZoom = function() {\n return this.viewport.getZoom()\n}\n\n/**\n * Get zoom scale for public usage\n *\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.getRelativeZoom = function() {\n return this.viewport.getRelativeZoom()\n}\n\n/**\n * Compute actual zoom from public zoom\n *\n * @param {Float} zoom\n * @return {Float} zoom scale\n */\nSvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) {\n return zoom * this.viewport.getOriginalState().zoom\n}\n\n/**\n * Set zoom to initial state\n */\nSvgPanZoom.prototype.resetZoom = function() {\n var originalState = this.viewport.getOriginalState()\n\n this.zoom(originalState.zoom, true);\n}\n\n/**\n * Set pan to initial state\n */\nSvgPanZoom.prototype.resetPan = function() {\n this.pan(this.viewport.getOriginalState());\n}\n\n/**\n * Set pan and zoom to initial state\n */\nSvgPanZoom.prototype.reset = function() {\n this.resetZoom()\n this.resetPan()\n}\n\n/**\n * Handle double click event\n * See handleMouseDown() for alternate detection method\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleDblClick = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n // Check if target was a control button\n if (this.options.controlIconsEnabled) {\n var targetClass = evt.target.getAttribute('class') || ''\n if (targetClass.indexOf('svg-pan-zoom-control') > -1) {\n return false\n }\n }\n\n var zoomFactor\n\n if (evt.shiftKey) {\n zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed\n } else {\n zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2\n }\n\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse())\n this.zoomAtPoint(zoomFactor, point)\n}\n\n/**\n * Handle click event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n Utils.mouseAndTouchNormalize(evt, this.svg)\n\n // Double click detection; more consistent than ondblclick\n if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){\n this.handleDblClick(evt)\n } else {\n // Pan mode\n this.state = 'pan'\n this.firstEventCTM = this.viewport.getCTM()\n this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n }\n}\n\n/**\n * Handle mouse move event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseMove = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan' && this.options.panEnabled) {\n // Pan mode\n var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse())\n , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y)\n\n this.viewport.setCTM(viewportCTM)\n }\n}\n\n/**\n * Handle mouse button release event\n *\n * @param {Event} evt\n */\nSvgPanZoom.prototype.handleMouseUp = function(evt) {\n if (this.options.preventMouseEventsDefault) {\n if (evt.preventDefault) {\n evt.preventDefault()\n } else {\n evt.returnValue = false\n }\n }\n\n if (this.state === 'pan') {\n // Quit pan mode\n this.state = 'none'\n }\n}\n\n/**\n * Adjust viewport size (only) so it will fit in SVG\n * Does not center image\n */\nSvgPanZoom.prototype.fit = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport size (only) so it will contain the SVG\n * Does not center image\n */\nSvgPanZoom.prototype.contain = function() {\n var viewBox = this.viewport.getViewBox()\n , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height)\n\n this.zoom(newScale, true)\n}\n\n/**\n * Adjust viewport pan (only) so it will be centered in SVG\n * Does not zoom/fit/contain image\n */\nSvgPanZoom.prototype.center = function() {\n var viewBox = this.viewport.getViewBox()\n , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5\n , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5\n\n this.getPublicInstance().pan({x: offsetX, y: offsetY})\n}\n\n/**\n * Update content cached BorderBox\n * Use when viewport contents change\n */\nSvgPanZoom.prototype.updateBBox = function() {\n this.viewport.simpleViewBoxCache()\n}\n\n/**\n * Pan to a rendered position\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.pan = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e = point.x\n viewportCTM.f = point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Relatively pan the graph by a specified rendered position vector\n *\n * @param {Object} point {x: 0, y: 0}\n */\nSvgPanZoom.prototype.panBy = function(point) {\n var viewportCTM = this.viewport.getCTM()\n viewportCTM.e += point.x\n viewportCTM.f += point.y\n this.viewport.setCTM(viewportCTM)\n}\n\n/**\n * Get pan vector\n *\n * @return {Object} {x: 0, y: 0}\n */\nSvgPanZoom.prototype.getPan = function() {\n var state = this.viewport.getState()\n\n return {x: state.x, y: state.y}\n}\n\n/**\n * Recalculates cached svg dimensions and controls position\n */\nSvgPanZoom.prototype.resize = function() {\n // Get dimensions\n var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg)\n this.width = boundingClientRectNormalized.width\n this.height = boundingClientRectNormalized.height\n\n // Recalculate original state\n var viewport = this.viewport\n viewport.options.width = this.width\n viewport.options.height = this.height\n viewport.processCTM()\n\n // Reposition control icons by re-enabling them\n if (this.options.controlIconsEnabled) {\n this.getPublicInstance().disableControlIcons()\n this.getPublicInstance().enableControlIcons()\n }\n}\n\n/**\n * Unbind mouse events, free callbacks and destroy public instance\n */\nSvgPanZoom.prototype.destroy = function() {\n var that = this\n\n // Free callbacks\n this.beforeZoom = null\n this.onZoom = null\n this.beforePan = null\n this.onPan = null\n this.onUpdatedCTM = null\n\n // Destroy custom event handlers\n if (this.options.customEventsHandler != null) { // jshint ignore:line\n this.options.customEventsHandler.destroy({\n svgElement: this.svg\n , eventsListenerElement: this.options.eventsListenerElement\n , instance: this.getPublicInstance()\n })\n }\n\n // Unbind eventListeners\n for (var event in this.eventListeners) {\n (this.options.eventsListenerElement || this.svg)\n .removeEventListener(event, this.eventListeners[event], false)\n }\n\n // Unbind wheelListener\n this.disableMouseWheelZoom()\n\n // Remove control icons\n this.getPublicInstance().disableControlIcons()\n\n // Reset zoom and pan\n this.reset()\n\n // Remove instance from instancesStore\n instancesStore = instancesStore.filter(function(instance){\n return instance.svg !== that.svg\n })\n\n // Delete options and its contents\n delete this.options\n\n // Delete viewport to make public shadow viewport functions uncallable\n delete this.viewport\n\n // Destroy public instance and rewrite getPublicInstance\n delete this.publicInstance\n delete this.pi\n this.getPublicInstance = function(){\n return null\n }\n}\n\n/**\n * Returns a public instance object\n *\n * @return {Object} Public instance object\n */\nSvgPanZoom.prototype.getPublicInstance = function() {\n var that = this\n\n // Create cache\n if (!this.publicInstance) {\n this.publicInstance = this.pi = {\n // Pan\n enablePan: function() {that.options.panEnabled = true; return that.pi}\n , disablePan: function() {that.options.panEnabled = false; return that.pi}\n , isPanEnabled: function() {return !!that.options.panEnabled}\n , pan: function(point) {that.pan(point); return that.pi}\n , panBy: function(point) {that.panBy(point); return that.pi}\n , getPan: function() {return that.getPan()}\n // Pan event\n , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zoom and Control Icons\n , enableZoom: function() {that.options.zoomEnabled = true; return that.pi}\n , disableZoom: function() {that.options.zoomEnabled = false; return that.pi}\n , isZoomEnabled: function() {return !!that.options.zoomEnabled}\n , enableControlIcons: function() {\n if (!that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = true\n ControlIcons.enable(that)\n }\n return that.pi\n }\n , disableControlIcons: function() {\n if (that.options.controlIconsEnabled) {\n that.options.controlIconsEnabled = false;\n ControlIcons.disable(that)\n }\n return that.pi\n }\n , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled}\n // Double click zoom\n , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi}\n , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi}\n , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled}\n // Mouse wheel zoom\n , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi}\n , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi}\n , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled}\n // Zoom scale and bounds\n , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi}\n , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi}\n , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi}\n // Zoom event\n , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Zooming\n , zoom: function(scale) {that.publicZoom(scale, true); return that.pi}\n , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi}\n , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi}\n , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi}\n , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi}\n , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi}\n , getZoom: function() {return that.getRelativeZoom()}\n // CTM update\n , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi}\n // Reset\n , resetZoom: function() {that.resetZoom(); return that.pi}\n , resetPan: function() {that.resetPan(); return that.pi}\n , reset: function() {that.reset(); return that.pi}\n // Fit, Contain and Center\n , fit: function() {that.fit(); return that.pi}\n , contain: function() {that.contain(); return that.pi}\n , center: function() {that.center(); return that.pi}\n // Size and Resize\n , updateBBox: function() {that.updateBBox(); return that.pi}\n , resize: function() {that.resize(); return that.pi}\n , getSizes: function() {\n return {\n width: that.width\n , height: that.height\n , realZoom: that.getZoom()\n , viewBox: that.viewport.getViewBox()\n }\n }\n // Destroy\n , destroy: function() {that.destroy(); return that.pi}\n }\n }\n\n return this.publicInstance\n}\n\n/**\n * Stores pairs of instances of SvgPanZoom and SVG\n * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom}\n *\n * @type {Array}\n */\nvar instancesStore = []\n\nvar svgPanZoom = function(elementOrSelector, options){\n var svg = Utils.getSvg(elementOrSelector)\n\n if (svg === null) {\n return null\n } else {\n // Look for existent instance\n for(var i = instancesStore.length - 1; i >= 0; i--) {\n if (instancesStore[i].svg === svg) {\n return instancesStore[i].instance.getPublicInstance()\n }\n }\n\n // If instance not found - create one\n instancesStore.push({\n svg: svg\n , instance: new SvgPanZoom(svg, options)\n })\n\n // Return just pushed instance\n return instancesStore[instancesStore.length - 1].instance.getPublicInstance()\n }\n}\n\nmodule.exports = svgPanZoom;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/svg-pan-zoom.js\n// module id = 92\n// module chunks = 0","// uniwheel 0.1.2 (customized)\n// A unified cross browser mouse wheel event handler\n// https://github.com/teemualap/uniwheel\n\nmodule.exports = (function(){\n\n //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel\n\n var prefix = \"\", _addEventListener, _removeEventListener, onwheel, support, fns = [];\n\n // detect event model\n if ( window.addEventListener ) {\n _addEventListener = \"addEventListener\";\n _removeEventListener = \"removeEventListener\";\n } else {\n _addEventListener = \"attachEvent\";\n _removeEventListener = \"detachEvent\";\n prefix = \"on\";\n }\n\n // detect available wheel event\n support = \"onwheel\" in document.createElement(\"div\") ? \"wheel\" : // Modern browsers support \"wheel\"\n document.onmousewheel !== undefined ? \"mousewheel\" : // Webkit and IE support at least \"mousewheel\"\n \"DOMMouseScroll\"; // let's assume that remaining browsers are older Firefox\n\n\n function createCallback(element,callback,capture) {\n\n var fn = function(originalEvent) {\n\n !originalEvent && ( originalEvent = window.event );\n\n // create a normalized event object\n var event = {\n // keep a ref to the original event object\n originalEvent: originalEvent,\n target: originalEvent.target || originalEvent.srcElement,\n type: \"wheel\",\n deltaMode: originalEvent.type == \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n delatZ: 0,\n preventDefault: function() {\n originalEvent.preventDefault ?\n originalEvent.preventDefault() :\n originalEvent.returnValue = false;\n }\n };\n\n // calculate deltaY (and deltaX) according to the event\n if ( support == \"mousewheel\" ) {\n event.deltaY = - 1/40 * originalEvent.wheelDelta;\n // Webkit also support wheelDeltaX\n originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );\n } else {\n event.deltaY = originalEvent.detail;\n }\n\n // it's time to fire the callback\n return callback( event );\n\n };\n\n fns.push({\n element: element,\n fn: fn,\n capture: capture\n });\n\n return fn;\n }\n\n function getCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns[i].fn;\n }\n }\n return function(){};\n }\n\n function removeCallback(element,capture) {\n for (var i = 0; i < fns.length; i++) {\n if (fns[i].element === element && fns[i].capture === capture) {\n return fns.splice(i,1);\n }\n }\n }\n\n function _addWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = createCallback(elem,callback,useCapture);\n }\n\n elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false );\n\n }\n\n function _removeWheelListener( elem, eventName, callback, useCapture ) {\n\n var cb;\n\n if (support === \"wheel\") {\n cb = callback;\n } else {\n cb = getCallback(elem,useCapture);\n }\n\n elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false );\n\n removeCallback(elem,useCapture);\n\n }\n\n function addWheelListener( elem, callback, useCapture ) {\n _addWheelListener( elem, support, callback, useCapture );\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _addWheelListener( elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n function removeWheelListener(elem,callback,useCapture){\n _removeWheelListener(elem,support,callback,useCapture);\n\n // handle MozMousePixelScroll in older Firefox\n if( support == \"DOMMouseScroll\" ) {\n _removeWheelListener(elem, \"MozMousePixelScroll\", callback, useCapture);\n }\n }\n\n return {\n on: addWheelListener,\n off: removeWheelListener\n };\n\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/uniwheel.js\n// module id = 93\n// module chunks = 0","var SvgUtils = require('./svg-utilities');\n\nmodule.exports = {\n enable: function(instance) {\n // Select (and create if necessary) defs\n var defs = instance.svg.querySelector('defs')\n if (!defs) {\n defs = document.createElementNS(SvgUtils.svgNS, 'defs')\n instance.svg.appendChild(defs)\n }\n\n // Check for style element, and create it if it doesn't exist\n var styleEl = defs.querySelector('style#svg-pan-zoom-controls-styles');\n if (!styleEl) {\n var style = document.createElementNS(SvgUtils.svgNS, 'style')\n style.setAttribute('id', 'svg-pan-zoom-controls-styles')\n style.setAttribute('type', 'text/css')\n style.textContent = '.svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }'\n defs.appendChild(style)\n }\n\n // Zoom Group\n var zoomGroup = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomGroup.setAttribute('id', 'svg-pan-zoom-controls');\n zoomGroup.setAttribute('transform', 'translate(' + ( instance.width - 70 ) + ' ' + ( instance.height - 76 ) + ') scale(0.75)');\n zoomGroup.setAttribute('class', 'svg-pan-zoom-control');\n\n // Control elements\n zoomGroup.appendChild(this._createZoomIn(instance))\n zoomGroup.appendChild(this._createZoomReset(instance))\n zoomGroup.appendChild(this._createZoomOut(instance))\n\n // Finally append created element\n instance.svg.appendChild(zoomGroup)\n\n // Cache control instance\n instance.controlIcons = zoomGroup\n }\n\n, _createZoomIn: function(instance) {\n var zoomIn = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomIn.setAttribute('id', 'svg-pan-zoom-zoom-in');\n zoomIn.setAttribute('transform', 'translate(30.5 5) scale(0.015)');\n zoomIn.setAttribute('class', 'svg-pan-zoom-control');\n zoomIn.addEventListener('click', function() {instance.getPublicInstance().zoomIn()}, false)\n zoomIn.addEventListener('touchstart', function() {instance.getPublicInstance().zoomIn()}, false)\n\n var zoomInBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomInBackground.setAttribute('x', '0');\n zoomInBackground.setAttribute('y', '0');\n zoomInBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomInBackground.setAttribute('height', '1400');\n zoomInBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomIn.appendChild(zoomInBackground);\n\n var zoomInShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomInShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z');\n zoomInShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomIn.appendChild(zoomInShape);\n\n return zoomIn\n }\n\n, _createZoomReset: function(instance){\n // reset\n var resetPanZoomControl = document.createElementNS(SvgUtils.svgNS, 'g');\n resetPanZoomControl.setAttribute('id', 'svg-pan-zoom-reset-pan-zoom');\n resetPanZoomControl.setAttribute('transform', 'translate(5 35) scale(0.4)');\n resetPanZoomControl.setAttribute('class', 'svg-pan-zoom-control');\n resetPanZoomControl.addEventListener('click', function() {instance.getPublicInstance().reset()}, false);\n resetPanZoomControl.addEventListener('touchstart', function() {instance.getPublicInstance().reset()}, false);\n\n var resetPanZoomControlBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n resetPanZoomControlBackground.setAttribute('x', '2');\n resetPanZoomControlBackground.setAttribute('y', '2');\n resetPanZoomControlBackground.setAttribute('width', '182'); // larger than expected because the whole group is transformed to scale down\n resetPanZoomControlBackground.setAttribute('height', '58');\n resetPanZoomControlBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n resetPanZoomControl.appendChild(resetPanZoomControlBackground);\n\n var resetPanZoomControlShape1 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape1.setAttribute('d', 'M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z');\n resetPanZoomControlShape1.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape1);\n\n var resetPanZoomControlShape2 = document.createElementNS(SvgUtils.svgNS, 'path');\n resetPanZoomControlShape2.setAttribute('d', 'M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z');\n resetPanZoomControlShape2.setAttribute('class', 'svg-pan-zoom-control-element');\n resetPanZoomControl.appendChild(resetPanZoomControlShape2);\n\n return resetPanZoomControl\n }\n\n, _createZoomOut: function(instance){\n // zoom out\n var zoomOut = document.createElementNS(SvgUtils.svgNS, 'g');\n zoomOut.setAttribute('id', 'svg-pan-zoom-zoom-out');\n zoomOut.setAttribute('transform', 'translate(30.5 70) scale(0.015)');\n zoomOut.setAttribute('class', 'svg-pan-zoom-control');\n zoomOut.addEventListener('click', function() {instance.getPublicInstance().zoomOut()}, false);\n zoomOut.addEventListener('touchstart', function() {instance.getPublicInstance().zoomOut()}, false);\n\n var zoomOutBackground = document.createElementNS(SvgUtils.svgNS, 'rect'); // TODO change these background space fillers to rounded rectangles so they look prettier\n zoomOutBackground.setAttribute('x', '0');\n zoomOutBackground.setAttribute('y', '0');\n zoomOutBackground.setAttribute('width', '1500'); // larger than expected because the whole group is transformed to scale down\n zoomOutBackground.setAttribute('height', '1400');\n zoomOutBackground.setAttribute('class', 'svg-pan-zoom-control-background');\n zoomOut.appendChild(zoomOutBackground);\n\n var zoomOutShape = document.createElementNS(SvgUtils.svgNS, 'path');\n zoomOutShape.setAttribute('d', 'M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z');\n zoomOutShape.setAttribute('class', 'svg-pan-zoom-control-element');\n zoomOut.appendChild(zoomOutShape);\n\n return zoomOut\n }\n\n, disable: function(instance) {\n if (instance.controlIcons) {\n instance.controlIcons.parentNode.removeChild(instance.controlIcons)\n instance.controlIcons = null\n }\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/control-icons.js\n// module id = 94\n// module chunks = 0","var SvgUtils = require('./svg-utilities')\n , Utils = require('./utilities')\n ;\n\nvar ShadowViewport = function(viewport, options){\n this.init(viewport, options)\n}\n\n/**\n * Initialization\n *\n * @param {SVGElement} viewport\n * @param {Object} options\n */\nShadowViewport.prototype.init = function(viewport, options) {\n // DOM Elements\n this.viewport = viewport\n this.options = options\n\n // State cache\n this.originalState = {zoom: 1, x: 0, y: 0}\n this.activeState = {zoom: 1, x: 0, y: 0}\n\n this.updateCTMCached = Utils.proxy(this.updateCTM, this)\n\n // Create a custom requestAnimationFrame taking in account refreshRate\n this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate)\n\n // ViewBox\n this.viewBox = {x: 0, y: 0, width: 0, height: 0}\n this.cacheViewBox()\n\n // Process CTM\n var newCTM = this.processCTM()\n\n // Update viewport CTM and cache zoom and pan\n this.setCTM(newCTM)\n\n // Update CTM in this frame\n this.updateCTM()\n}\n\n/**\n * Cache initial viewBox value\n * If no viewBox is defined, then use viewport size/position instead for viewBox values\n */\nShadowViewport.prototype.cacheViewBox = function() {\n var svgViewBox = this.options.svg.getAttribute('viewBox')\n\n if (svgViewBox) {\n var viewBoxValues = svgViewBox.split(/[\\s\\,]/).filter(function(v){return v}).map(parseFloat)\n\n // Cache viewbox x and y offset\n this.viewBox.x = viewBoxValues[0]\n this.viewBox.y = viewBoxValues[1]\n this.viewBox.width = viewBoxValues[2]\n this.viewBox.height = viewBoxValues[3]\n\n var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height)\n\n // Update active state\n this.activeState.zoom = zoom\n this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2\n this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2\n\n // Force updating CTM\n this.updateCTMOnNextFrame()\n\n this.options.svg.removeAttribute('viewBox')\n } else {\n this.simpleViewBoxCache()\n }\n}\n\n/**\n * Recalculate viewport sizes and update viewBox cache\n */\nShadowViewport.prototype.simpleViewBoxCache = function() {\n var bBox = this.viewport.getBBox()\n\n this.viewBox.x = bBox.x\n this.viewBox.y = bBox.y\n this.viewBox.width = bBox.width\n this.viewBox.height = bBox.height\n}\n\n/**\n * Returns a viewbox object. Safe to alter\n *\n * @return {Object} viewbox object\n */\nShadowViewport.prototype.getViewBox = function() {\n return Utils.extend({}, this.viewBox)\n}\n\n/**\n * Get initial zoom and pan values. Save them into originalState\n * Parses viewBox attribute to alter initial sizes\n *\n * @return {CTM} CTM object based on options\n */\nShadowViewport.prototype.processCTM = function() {\n var newCTM = this.getCTM()\n\n if (this.options.fit || this.options.contain) {\n var newScale;\n if (this.options.fit) {\n newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n } else {\n newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height);\n }\n\n newCTM.a = newScale; //x-scale\n newCTM.d = newScale; //y-scale\n newCTM.e = -this.viewBox.x * newScale; //x-transform\n newCTM.f = -this.viewBox.y * newScale; //y-transform\n }\n\n if (this.options.center) {\n var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5\n , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5\n\n newCTM.e = offsetX\n newCTM.f = offsetY\n }\n\n // Cache initial values. Based on activeState and fix+center opitons\n this.originalState.zoom = newCTM.a\n this.originalState.x = newCTM.e\n this.originalState.y = newCTM.f\n\n return newCTM\n}\n\n/**\n * Return originalState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getOriginalState = function() {\n return Utils.extend({}, this.originalState)\n}\n\n/**\n * Return actualState object. Safe to alter\n *\n * @return {Object}\n */\nShadowViewport.prototype.getState = function() {\n return Utils.extend({}, this.activeState)\n}\n\n/**\n * Get zoom scale\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getZoom = function() {\n return this.activeState.zoom\n}\n\n/**\n * Get zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.getRelativeZoom = function() {\n return this.activeState.zoom / this.originalState.zoom\n}\n\n/**\n * Compute zoom scale for pubilc usage\n *\n * @return {Float} zoom scale\n */\nShadowViewport.prototype.computeRelativeZoom = function(scale) {\n return scale / this.originalState.zoom\n}\n\n/**\n * Get pan\n *\n * @return {Object}\n */\nShadowViewport.prototype.getPan = function() {\n return {x: this.activeState.x, y: this.activeState.y}\n}\n\n/**\n * Return cached viewport CTM value that can be safely modified\n *\n * @return {SVGMatrix}\n */\nShadowViewport.prototype.getCTM = function() {\n var safeCTM = this.options.svg.createSVGMatrix()\n\n // Copy values manually as in FF they are not itterable\n safeCTM.a = this.activeState.zoom\n safeCTM.b = 0\n safeCTM.c = 0\n safeCTM.d = this.activeState.zoom\n safeCTM.e = this.activeState.x\n safeCTM.f = this.activeState.y\n\n return safeCTM\n}\n\n/**\n * Set a new CTM\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.setCTM = function(newCTM) {\n var willZoom = this.isZoomDifferent(newCTM)\n , willPan = this.isPanDifferent(newCTM)\n\n if (willZoom || willPan) {\n // Before zoom\n if (willZoom) {\n // If returns false then cancel zooming\n if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) {\n newCTM.a = newCTM.d = this.activeState.zoom\n willZoom = false\n } else {\n this.updateCache(newCTM);\n this.options.onZoom(this.getRelativeZoom())\n }\n }\n\n // Before pan\n if (willPan) {\n var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f})\n // If prevent pan is an object\n , preventPanX = false\n , preventPanY = false\n\n // If prevent pan is Boolean false\n if (preventPan === false) {\n // Set x and y same as before\n newCTM.e = this.getPan().x\n newCTM.f = this.getPan().y\n\n preventPanX = preventPanY = true\n } else if (Utils.isObject(preventPan)) {\n // Check for X axes attribute\n if (preventPan.x === false) {\n // Prevent panning on x axes\n newCTM.e = this.getPan().x\n preventPanX = true\n } else if (Utils.isNumber(preventPan.x)) {\n // Set a custom pan value\n newCTM.e = preventPan.x\n }\n\n // Check for Y axes attribute\n if (preventPan.y === false) {\n // Prevent panning on x axes\n newCTM.f = this.getPan().y\n preventPanY = true\n } else if (Utils.isNumber(preventPan.y)) {\n // Set a custom pan value\n newCTM.f = preventPan.y\n }\n }\n\n // Update willPan flag\n // Check if newCTM is still different\n if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) {\n willPan = false\n } else {\n this.updateCache(newCTM);\n this.options.onPan(this.getPan());\n }\n }\n\n // Check again if should zoom or pan\n if (willZoom || willPan) {\n this.updateCTMOnNextFrame()\n }\n }\n}\n\nShadowViewport.prototype.isZoomDifferent = function(newCTM) {\n return this.activeState.zoom !== newCTM.a\n}\n\nShadowViewport.prototype.isPanDifferent = function(newCTM) {\n return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f\n}\n\n\n/**\n * Update cached CTM and active state\n *\n * @param {SVGMatrix} newCTM\n */\nShadowViewport.prototype.updateCache = function(newCTM) {\n this.activeState.zoom = newCTM.a\n this.activeState.x = newCTM.e\n this.activeState.y = newCTM.f\n}\n\nShadowViewport.prototype.pendingUpdate = false\n\n/**\n * Place a request to update CTM on next Frame\n */\nShadowViewport.prototype.updateCTMOnNextFrame = function() {\n if (!this.pendingUpdate) {\n // Lock\n this.pendingUpdate = true\n\n // Throttle next update\n this.requestAnimationFrame.call(window, this.updateCTMCached)\n }\n}\n\n/**\n * Update viewport CTM with cached CTM\n */\nShadowViewport.prototype.updateCTM = function() {\n var ctm = this.getCTM()\n\n // Updates SVG element\n SvgUtils.setCTM(this.viewport, ctm, this.defs)\n\n // Free the lock\n this.pendingUpdate = false\n\n // Notify about the update\n if(this.options.onUpdatedCTM) {\n this.options.onUpdatedCTM(ctm)\n }\n}\n\nmodule.exports = function(viewport, options){\n return new ShadowViewport(viewport, options)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/svg-pan-zoom/src/shadow-viewport.js\n// module id = 95\n// module chunks = 0","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i 0) {\r\n return [s.substr(0, p), s.substr(p + 1)];\r\n }\r\n else {\r\n return ['', s];\r\n }\r\n }\r\n /**\r\n * Split a decimal into its whole and fractional parts as strings.\r\n *\r\n * Example: get whole and fractional parts of 42.056\r\n * ```\r\n * makerjs.splitDecimal(42.056); //returns [\"42\", \"056\"]\r\n * ```\r\n *\r\n * @param n The number to split.\r\n * @returns Array of 2 strings when n contains a decimal point, or an array of one string when n is an integer.\r\n */\r\n function splitDecimal(n) {\r\n var s = n.toString();\r\n if (s.indexOf('e') > 0) {\r\n //max digits is 20 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\r\n s = n.toFixed(20).match(/.*[^(0+$)]/)[0]; //regex trims trailing zeros\r\n }\r\n return split(s, '.');\r\n }\r\n MakerJs.splitDecimal = splitDecimal;\r\n /**\r\n * Numeric rounding\r\n *\r\n * Example: round to 3 decimal places\r\n * ```\r\n * makerjs.round(3.14159, .001); //returns 3.142\r\n * ```\r\n *\r\n * @param n The number to round off.\r\n * @param accuracy Optional exemplar of number of decimal places.\r\n * @returns Rounded number.\r\n */\r\n function round(n, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0000001; }\r\n //optimize for early exit for integers\r\n if (n % 1 === 0)\r\n return n;\r\n var exp = 1 - String(Math.ceil(1 / accuracy)).length;\r\n //Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\r\n // If the exp is undefined or zero...\r\n if (typeof exp === 'undefined' || +exp === 0) {\r\n return Math.round(n);\r\n }\r\n n = +n;\r\n exp = +exp;\r\n // If the value is not a number or the exp is not an integer...\r\n if (isNaN(n) || !(typeof exp === 'number' && exp % 1 === 0)) {\r\n return NaN;\r\n }\r\n // If the value is negative...\r\n if (n < 0) {\r\n return -round(-n, accuracy);\r\n }\r\n // Shift\r\n var a = split(n.toString(), 'e');\r\n n = Math.round(+(a[0] + 'e' + (a[1] ? (+a[1] - exp) : -exp)));\r\n // Shift back\r\n a = split(n.toString(), 'e');\r\n return +(a[0] + 'e' + (a[1] ? (+a[1] + exp) : exp));\r\n }\r\n MakerJs.round = round;\r\n /**\r\n * Create a string representation of a route array.\r\n *\r\n * @param route Array of strings which are segments of a route.\r\n * @returns String of the flattened array.\r\n */\r\n function createRouteKey(route) {\r\n var converted = [];\r\n for (var i = 0; i < route.length; i++) {\r\n var element = route[i];\r\n var newElement;\r\n if (i % 2 === 0) {\r\n newElement = (i > 0 ? '.' : '') + element;\r\n }\r\n else {\r\n newElement = JSON.stringify([element]);\r\n }\r\n converted.push(newElement);\r\n }\r\n return converted.join('');\r\n }\r\n MakerJs.createRouteKey = createRouteKey;\r\n /**\r\n * Travel along a route inside of a model to extract a specific node in its tree.\r\n *\r\n * @param modelContext Model to travel within.\r\n * @param route String of a flattened route, or a string array of route segments.\r\n * @returns Model or Path object within the modelContext tree.\r\n */\r\n function travel(modelContext, route) {\r\n if (!modelContext || !route)\r\n return null;\r\n var routeArray;\r\n if (Array.isArray(route)) {\r\n routeArray = route;\r\n }\r\n else {\r\n routeArray = JSON.parse(route);\r\n }\r\n var props = routeArray.slice();\r\n var ref = modelContext;\r\n var origin = modelContext.origin || [0, 0];\r\n while (props.length) {\r\n var prop = props.shift();\r\n ref = ref[prop];\r\n if (!ref)\r\n return null;\r\n if (ref.origin && props.length) {\r\n origin = MakerJs.point.add(origin, ref.origin);\r\n }\r\n }\r\n return {\r\n result: ref,\r\n offset: origin\r\n };\r\n }\r\n MakerJs.travel = travel;\r\n /**\r\n * @private\r\n */\r\n var clone = require('clone');\r\n /**\r\n * Clone an object.\r\n *\r\n * @param objectToClone The object to clone.\r\n * @returns A new clone of the original object.\r\n */\r\n function cloneObject(objectToClone) {\r\n return clone(objectToClone);\r\n }\r\n MakerJs.cloneObject = cloneObject;\r\n /**\r\n * Copy the properties from one object to another object.\r\n *\r\n * Example:\r\n * ```\r\n * makerjs.extendObject({ abc: 123 }, { xyz: 789 }); //returns { abc: 123, xyz: 789 }\r\n * ```\r\n *\r\n * @param target The object to extend. It will receive the new properties.\r\n * @param other An object containing properties to merge in.\r\n * @returns The original object after merging.\r\n */\r\n function extendObject(target, other) {\r\n if (target && other) {\r\n for (var key in other) {\r\n if (typeof other[key] !== 'undefined') {\r\n target[key] = other[key];\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n MakerJs.extendObject = extendObject;\r\n /**\r\n * Test to see if a variable is a function.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a function type.\r\n */\r\n function isFunction(value) {\r\n return typeof value === 'function';\r\n }\r\n MakerJs.isFunction = isFunction;\r\n /**\r\n * Test to see if a variable is a number.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is a number type.\r\n */\r\n function isNumber(value) {\r\n return typeof value === 'number';\r\n }\r\n MakerJs.isNumber = isNumber;\r\n /**\r\n * Test to see if a variable is an object.\r\n *\r\n * @param value The object to test.\r\n * @returns True if the object is an object type.\r\n */\r\n function isObject(value) {\r\n return typeof value === 'object';\r\n }\r\n MakerJs.isObject = isObject;\r\n //points\r\n /**\r\n * Test to see if an object implements the required properties of a point.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPoint(item) {\r\n return item && Array.isArray(item) && item.length == 2 && isNumber(item[0]) && isNumber(item[1]);\r\n }\r\n MakerJs.isPoint = isPoint;\r\n /**\r\n * Test to see if an object implements the required properties of a path.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPath(item) {\r\n return item && item.type && isPoint(item.origin);\r\n }\r\n MakerJs.isPath = isPath;\r\n /**\r\n * Test to see if an object implements the required properties of a line.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathLine(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Line && isPoint(item.end);\r\n }\r\n MakerJs.isPathLine = isPathLine;\r\n /**\r\n * Test to see if an object implements the required properties of a circle.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathCircle(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Circle && isNumber(item.radius);\r\n }\r\n MakerJs.isPathCircle = isPathCircle;\r\n /**\r\n * Test to see if an object implements the required properties of an arc.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArc(item) {\r\n return isPath(item) && item.type == MakerJs.pathType.Arc && isNumber(item.radius) && isNumber(item.startAngle) && isNumber(item.endAngle);\r\n }\r\n MakerJs.isPathArc = isPathArc;\r\n /**\r\n * Test to see if an object implements the required properties of an arc in a bezier curve.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isPathArcInBezierCurve(item) {\r\n return isPathArc(item) && isObject(item.bezierData) && isNumber(item.bezierData.startT) && isNumber(item.bezierData.endT);\r\n }\r\n MakerJs.isPathArcInBezierCurve = isPathArcInBezierCurve;\r\n /**\r\n * String-based enumeration of all paths types.\r\n *\r\n * Examples: use pathType instead of string literal when creating a circle.\r\n * ```\r\n * var circle: IPathCircle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //typescript\r\n * var circle = { type: pathType.Circle, origin: [0, 0], radius: 7 }; //javascript\r\n * ```\r\n */\r\n MakerJs.pathType = {\r\n Line: \"line\",\r\n Circle: \"circle\",\r\n Arc: \"arc\",\r\n BezierSeed: \"bezier-seed\"\r\n };\r\n /**\r\n * Test to see if an object implements the required properties of a model.\r\n */\r\n function isModel(item) {\r\n return item && (item.paths || item.models);\r\n }\r\n MakerJs.isModel = isModel;\r\n /**\r\n * Test to see if an object implements the required properties of a chain.\r\n *\r\n * @param item The item to test.\r\n */\r\n function isChain(item) {\r\n var x = item;\r\n return x && x.links && Array.isArray(x.links) && isNumber(x.pathLength);\r\n }\r\n MakerJs.isChain = isChain;\r\n /**\r\n * @private\r\n */\r\n var Cascade = /** @class */ (function () {\r\n function Cascade(_module, $initial) {\r\n this._module = _module;\r\n this.$initial = $initial;\r\n for (var methodName in this._module)\r\n this._shadow(methodName);\r\n this.$result = $initial;\r\n }\r\n Cascade.prototype._shadow = function (methodName) {\r\n var _this = this;\r\n this[methodName] = function () {\r\n return _this._apply(_this._module[methodName], arguments);\r\n };\r\n };\r\n Cascade.prototype._apply = function (fn, carriedArguments) {\r\n var args = [].slice.call(carriedArguments);\r\n args.unshift(this.$result);\r\n this.$result = fn.apply(undefined, args);\r\n return this;\r\n };\r\n Cascade.prototype.$reset = function () {\r\n this.$result = this.$initial;\r\n return this;\r\n };\r\n return Cascade;\r\n }());\r\n function $(context) {\r\n if (isModel(context)) {\r\n return new Cascade(MakerJs.model, context);\r\n }\r\n else if (isPath(context)) {\r\n return new Cascade(MakerJs.path, context);\r\n }\r\n else if (isPoint(context)) {\r\n return new Cascade(MakerJs.point, context);\r\n }\r\n }\r\n MakerJs.$ = $;\r\n})(MakerJs || (MakerJs = {}));\r\n//CommonJs\r\nmodule.exports = MakerJs;\r\n//This file is generated by ./target/cascadable.js\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var angle;\r\n (function (angle) {\r\n /**\r\n * @private\r\n */\r\n function getFractionalPart(n) {\r\n return MakerJs.splitDecimal(n)[1];\r\n }\r\n /**\r\n * @private\r\n */\r\n function setFractionalPart(n, fractionalPart) {\r\n if (fractionalPart) {\r\n return +(MakerJs.splitDecimal(n)[0] + '.' + fractionalPart);\r\n }\r\n else {\r\n return n;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function copyFractionalPart(src, dest) {\r\n if ((src < 0 && dest < 0) || (src > 0 && dest > 0)) {\r\n return setFractionalPart(dest, getFractionalPart(src));\r\n }\r\n return dest;\r\n }\r\n /**\r\n * Ensures an angle is not greater than 360\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Same polar angle but not greater than 360 degrees.\r\n */\r\n function noRevolutions(angleInDegrees) {\r\n var revolutions = Math.floor(angleInDegrees / 360);\r\n if (revolutions === 0)\r\n return angleInDegrees;\r\n var a = angleInDegrees - (360 * revolutions);\r\n return copyFractionalPart(angleInDegrees, a);\r\n }\r\n angle.noRevolutions = noRevolutions;\r\n /**\r\n * Convert an angle from degrees to radians.\r\n *\r\n * @param angleInDegrees Angle in degrees.\r\n * @returns Angle in radians.\r\n */\r\n function toRadians(angleInDegrees) {\r\n return noRevolutions(angleInDegrees) * Math.PI / 180.0;\r\n }\r\n angle.toRadians = toRadians;\r\n /**\r\n * Convert an angle from radians to degrees.\r\n *\r\n * @param angleInRadians Angle in radians.\r\n * @returns Angle in degrees.\r\n */\r\n function toDegrees(angleInRadians) {\r\n return angleInRadians * 180.0 / Math.PI;\r\n }\r\n angle.toDegrees = toDegrees;\r\n /**\r\n * Get an arc's end angle, ensured to be greater than its start angle.\r\n *\r\n * @param arc An arc path object.\r\n * @returns End angle of arc.\r\n */\r\n function ofArcEnd(arc) {\r\n //compensate for values past zero. This allows easy compute of total angle size.\r\n //for example 0 = 360\r\n if (arc.endAngle < arc.startAngle) {\r\n var revolutions = Math.ceil((arc.startAngle - arc.endAngle) / 360);\r\n var a = revolutions * 360 + arc.endAngle;\r\n return copyFractionalPart(arc.endAngle, a);\r\n }\r\n return arc.endAngle;\r\n }\r\n angle.ofArcEnd = ofArcEnd;\r\n /**\r\n * Get the angle in the middle of an arc's start and end angles.\r\n *\r\n * @param arc An arc path object.\r\n * @param ratio Optional number between 0 and 1 specifying percentage between start and end angles. Default is .5\r\n * @returns Middle angle of arc.\r\n */\r\n function ofArcMiddle(arc, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n return arc.startAngle + ofArcSpan(arc) * ratio;\r\n }\r\n angle.ofArcMiddle = ofArcMiddle;\r\n /**\r\n * Total angle of an arc between its start and end angles.\r\n *\r\n * @param arc The arc to measure.\r\n * @returns Angle of arc.\r\n */\r\n function ofArcSpan(arc) {\r\n var endAngle = angle.ofArcEnd(arc);\r\n var a = endAngle - arc.startAngle;\r\n if (MakerJs.round(a) > 360) {\r\n return noRevolutions(a);\r\n }\r\n else {\r\n return a;\r\n }\r\n }\r\n angle.ofArcSpan = ofArcSpan;\r\n /**\r\n * Angle of a line path.\r\n *\r\n * @param line The line path to find the angle of.\r\n * @returns Angle of the line path, in degrees.\r\n */\r\n function ofLineInDegrees(line) {\r\n return noRevolutions(toDegrees(ofPointInRadians(line.origin, line.end)));\r\n }\r\n angle.ofLineInDegrees = ofLineInDegrees;\r\n /**\r\n * Angle of a line through a point, in degrees.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in degrees.\r\n */\r\n function ofPointInDegrees(origin, pointToFindAngle) {\r\n return toDegrees(ofPointInRadians(origin, pointToFindAngle));\r\n }\r\n angle.ofPointInDegrees = ofPointInDegrees;\r\n /**\r\n * Angle of a line through a point, in radians.\r\n *\r\n * @param pointToFindAngle The point to find the angle.\r\n * @param origin Point of origin of the angle.\r\n * @returns Angle of the line throught the point, in radians.\r\n */\r\n function ofPointInRadians(origin, pointToFindAngle) {\r\n var d = MakerJs.point.subtract(pointToFindAngle, origin);\r\n var x = d[0];\r\n var y = d[1];\r\n return Math.atan2(-y, -x) + Math.PI;\r\n }\r\n angle.ofPointInRadians = ofPointInRadians;\r\n /**\r\n * Mirror an angle on either or both x and y axes.\r\n *\r\n * @param angleInDegrees The angle to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored angle.\r\n */\r\n function mirror(angleInDegrees, mirrorX, mirrorY) {\r\n if (mirrorY) {\r\n angleInDegrees = 360 - angleInDegrees;\r\n }\r\n if (mirrorX) {\r\n angleInDegrees = (angleInDegrees < 180 ? 180 : 540) - angleInDegrees;\r\n }\r\n return angleInDegrees;\r\n }\r\n angle.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var linkLineMap = {};\r\n linkLineMap[MakerJs.pathType.Arc] = function (arc, first, reversed) {\r\n var fromEnd = first != reversed;\r\n var angleToRotate = fromEnd ? arc.endAngle - 90 : arc.startAngle + 90;\r\n var origin = MakerJs.point.fromArc(arc)[fromEnd ? 1 : 0];\r\n var end = MakerJs.point.rotate(MakerJs.point.add(origin, [arc.radius, 0]), angleToRotate, origin);\r\n return new MakerJs.paths.Line(first ? [end, origin] : [origin, end]);\r\n };\r\n linkLineMap[MakerJs.pathType.Line] = function (line, first, reversed) {\r\n return reversed ? new MakerJs.paths.Line(line.end, line.origin) : line;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getLinkLine(chainLink, first) {\r\n if (chainLink) {\r\n var p = chainLink.walkedPath.pathContext;\r\n var fn = linkLineMap[p.type];\r\n if (fn) {\r\n return fn(p, first, chainLink.reversed);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the angle of a joint between 2 chain links.\r\n *\r\n * @param linkA First chain link.\r\n * @param linkB Second chain link.\r\n * @returns Angle between chain links.\r\n */\r\n function ofChainLinkJoint(linkA, linkB) {\r\n if (arguments.length < 2)\r\n return null;\r\n var linkLines = [linkA, linkB].map(function (link, i) { return getLinkLine(link, i === 0); });\r\n var result = noRevolutions(ofLineInDegrees(linkLines[1]) - ofLineInDegrees(linkLines[0]));\r\n if (result > 180)\r\n result -= 360;\r\n return result;\r\n }\r\n angle.ofChainLinkJoint = ofChainLinkJoint;\r\n })(angle = MakerJs.angle || (MakerJs.angle = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var point;\r\n (function (point) {\r\n /**\r\n * Add two points together and return the result as a new point object.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns A new point object.\r\n */\r\n function add(a, b, subtract) {\r\n var newPoint = clone(a);\r\n if (!b)\r\n return newPoint;\r\n for (var i = 2; i--;) {\r\n if (subtract) {\r\n newPoint[i] -= b[i];\r\n }\r\n else {\r\n newPoint[i] += b[i];\r\n }\r\n }\r\n return newPoint;\r\n }\r\n point.add = add;\r\n /**\r\n * Get the average of two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns New point object which is the average of a and b.\r\n */\r\n function average(a, b) {\r\n function avg(i) {\r\n return (a[i] + b[i]) / 2;\r\n }\r\n return [avg(0), avg(1)];\r\n }\r\n point.average = average;\r\n /**\r\n * Clone a point into a new point.\r\n *\r\n * @param pointToClone The point to clone.\r\n * @returns A new point with same values as the original.\r\n */\r\n function clone(pointToClone) {\r\n if (!pointToClone)\r\n return point.zero();\r\n return [pointToClone[0], pointToClone[1]];\r\n }\r\n point.clone = clone;\r\n /**\r\n * From an array of points, find the closest point to a given reference point.\r\n *\r\n * @param referencePoint The reference point.\r\n * @param pointOptions Array of points to choose from.\r\n * @returns The first closest point from the pointOptions.\r\n */\r\n function closest(referencePoint, pointOptions) {\r\n var smallest = {\r\n index: 0,\r\n distance: -1\r\n };\r\n for (var i = 0; i < pointOptions.length; i++) {\r\n var distance = MakerJs.measure.pointDistance(referencePoint, pointOptions[i]);\r\n if (smallest.distance == -1 || distance < smallest.distance) {\r\n smallest.distance = distance;\r\n smallest.index = i;\r\n }\r\n }\r\n return pointOptions[smallest.index];\r\n }\r\n point.closest = closest;\r\n /**\r\n * @private\r\n */\r\n var zero_cos = {};\r\n zero_cos[Math.PI / 2] = true;\r\n zero_cos[3 * Math.PI / 2] = true;\r\n /**\r\n * @private\r\n */\r\n var zero_sin = {};\r\n zero_sin[Math.PI] = true;\r\n zero_sin[2 * Math.PI] = true;\r\n /**\r\n * Get a point from its polar coordinates.\r\n *\r\n * @param angleInRadians The angle of the polar coordinate, in radians.\r\n * @param radius The radius of the polar coordinate.\r\n * @returns A new point object.\r\n */\r\n function fromPolar(angleInRadians, radius) {\r\n return [\r\n (angleInRadians in zero_cos) ? 0 : MakerJs.round(radius * Math.cos(angleInRadians)),\r\n (angleInRadians in zero_sin) ? 0 : MakerJs.round(radius * Math.sin(angleInRadians))\r\n ];\r\n }\r\n point.fromPolar = fromPolar;\r\n /**\r\n * Get a point on a circle or arc path, at a given angle.\r\n * @param angleInDegrees The angle at which you want to find the point, in degrees.\r\n * @param circle A circle or arc.\r\n * @returns A new point object.\r\n */\r\n function fromAngleOnCircle(angleInDegrees, circle) {\r\n return add(circle.origin, fromPolar(MakerJs.angle.toRadians(angleInDegrees), circle.radius));\r\n }\r\n point.fromAngleOnCircle = fromAngleOnCircle;\r\n /**\r\n * Get the two end points of an arc path.\r\n *\r\n * @param arc The arc path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the start angle, [1] is the point object corresponding to the end angle.\r\n */\r\n function fromArc(arc) {\r\n return [fromAngleOnCircle(arc.startAngle, arc), fromAngleOnCircle(arc.endAngle, arc)];\r\n }\r\n point.fromArc = fromArc;\r\n /**\r\n * @private\r\n */\r\n var pathEndsMap = {};\r\n pathEndsMap[MakerJs.pathType.Arc] = function (arc) {\r\n return point.fromArc(arc);\r\n };\r\n pathEndsMap[MakerJs.pathType.Line] = function (line) {\r\n return [line.origin, line.end];\r\n };\r\n pathEndsMap[MakerJs.pathType.BezierSeed] = pathEndsMap[MakerJs.pathType.Line];\r\n /**\r\n * Get the two end points of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @returns Array with 2 elements: [0] is the point object corresponding to the origin, [1] is the point object corresponding to the end.\r\n */\r\n function fromPathEnds(pathContext, pathOffset) {\r\n var result = null;\r\n var fn = pathEndsMap[pathContext.type];\r\n if (fn) {\r\n result = fn(pathContext);\r\n if (pathOffset) {\r\n result = result.map(function (p) { return add(p, pathOffset); });\r\n }\r\n }\r\n return result;\r\n }\r\n point.fromPathEnds = fromPathEnds;\r\n /**\r\n * @private\r\n */\r\n function verticalIntersectionPoint(verticalLine, nonVerticalSlope) {\r\n var x = verticalLine.origin[0];\r\n var y = nonVerticalSlope.slope * x + nonVerticalSlope.yIntercept;\r\n return [x, y];\r\n }\r\n /**\r\n * Calculates the intersection of slopes of two lines.\r\n *\r\n * @param lineA First line to use for slope.\r\n * @param lineB Second line to use for slope.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns point of intersection of the two slopes, or null if the slopes did not intersect.\r\n */\r\n function fromSlopeIntersection(lineA, lineB, options) {\r\n if (options === void 0) { options = {}; }\r\n var slopeA = MakerJs.measure.lineSlope(lineA);\r\n var slopeB = MakerJs.measure.lineSlope(lineB);\r\n //see if slope are parallel \r\n if (MakerJs.measure.isSlopeParallel(slopeA, slopeB)) {\r\n if (MakerJs.measure.isSlopeEqual(slopeA, slopeB)) {\r\n //check for overlap\r\n options.out_AreOverlapped = MakerJs.measure.isLineOverlapping(lineA, lineB, options.excludeTangents);\r\n }\r\n return null;\r\n }\r\n var pointOfIntersection;\r\n if (!slopeA.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineA, slopeB);\r\n }\r\n else if (!slopeB.hasSlope) {\r\n pointOfIntersection = verticalIntersectionPoint(lineB, slopeA);\r\n }\r\n else {\r\n // find intersection by line equation\r\n var x = (slopeB.yIntercept - slopeA.yIntercept) / (slopeA.slope - slopeB.slope);\r\n var y = slopeA.slope * x + slopeA.yIntercept;\r\n pointOfIntersection = [x, y];\r\n }\r\n return pointOfIntersection;\r\n }\r\n point.fromSlopeIntersection = fromSlopeIntersection;\r\n /**\r\n * @private\r\n */\r\n function midCircle(circle, midAngle) {\r\n return point.add(circle.origin, point.fromPolar(MakerJs.angle.toRadians(midAngle), circle.radius));\r\n }\r\n /**\r\n * @private\r\n */\r\n var middleMap = {};\r\n middleMap[MakerJs.pathType.Arc] = function (arc, ratio) {\r\n var midAngle = MakerJs.angle.ofArcMiddle(arc, ratio);\r\n return midCircle(arc, midAngle);\r\n };\r\n middleMap[MakerJs.pathType.Circle] = function (circle, ratio) {\r\n return midCircle(circle, 360 * ratio);\r\n };\r\n middleMap[MakerJs.pathType.Line] = function (line, ratio) {\r\n function ration(a, b) {\r\n return a + (b - a) * ratio;\r\n }\r\n ;\r\n return [\r\n ration(line.origin[0], line.end[0]),\r\n ration(line.origin[1], line.end[1])\r\n ];\r\n };\r\n middleMap[MakerJs.pathType.BezierSeed] = function (seed, ratio) {\r\n return MakerJs.models.BezierCurve.computePoint(seed, ratio);\r\n };\r\n /**\r\n * Get the middle point of a path.\r\n *\r\n * @param pathContext The path object.\r\n * @param ratio Optional ratio (between 0 and 1) of point along the path. Default is .5 for middle.\r\n * @returns Point on the path, in the middle of the path.\r\n */\r\n function middle(pathContext, ratio) {\r\n if (ratio === void 0) { ratio = .5; }\r\n var midPoint = null;\r\n var fn = middleMap[pathContext.type];\r\n if (fn) {\r\n midPoint = fn(pathContext, ratio);\r\n }\r\n return midPoint;\r\n }\r\n point.middle = middle;\r\n /**\r\n * Create a clone of a point, mirrored on either or both x and y axes.\r\n *\r\n * @param pointToMirror The point to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored point.\r\n */\r\n function mirror(pointToMirror, mirrorX, mirrorY) {\r\n var p = clone(pointToMirror);\r\n if (mirrorX) {\r\n p[0] = -p[0];\r\n }\r\n if (mirrorY) {\r\n p[1] = -p[1];\r\n }\r\n return p;\r\n }\r\n point.mirror = mirror;\r\n /**\r\n * Round the values of a point.\r\n *\r\n * @param pointContext The point to serialize.\r\n * @param accuracy Optional exemplar number of decimal places.\r\n * @returns A new point with the values rounded.\r\n */\r\n function rounded(pointContext, accuracy) {\r\n return [MakerJs.round(pointContext[0], accuracy), MakerJs.round(pointContext[1], accuracy)];\r\n }\r\n point.rounded = rounded;\r\n /**\r\n * Rotate a point.\r\n *\r\n * @param pointToRotate The point to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns A new point.\r\n */\r\n function rotate(pointToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n var pointAngleInRadians = MakerJs.angle.ofPointInRadians(rotationOrigin, pointToRotate);\r\n var d = MakerJs.measure.pointDistance(rotationOrigin, pointToRotate);\r\n var rotatedPoint = fromPolar(pointAngleInRadians + MakerJs.angle.toRadians(angleInDegrees), d);\r\n return add(rotationOrigin, rotatedPoint);\r\n }\r\n point.rotate = rotate;\r\n /**\r\n * Scale a point's coordinates.\r\n *\r\n * @param pointToScale The point to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns A new point.\r\n */\r\n function scale(pointToScale, scaleValue) {\r\n var p = clone(pointToScale);\r\n for (var i = 2; i--;) {\r\n p[i] *= scaleValue;\r\n }\r\n return p;\r\n }\r\n point.scale = scale;\r\n /**\r\n * Distort a point's coordinates.\r\n *\r\n * @param pointToDistort The point to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new point.\r\n */\r\n function distort(pointToDistort, scaleX, scaleY) {\r\n return [pointToDistort[0] * scaleX, pointToDistort[1] * scaleY];\r\n }\r\n point.distort = distort;\r\n /**\r\n * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true).\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns A new point object.\r\n */\r\n function subtract(a, b) {\r\n return add(a, b, true);\r\n }\r\n point.subtract = subtract;\r\n /**\r\n * A point at 0,0 coordinates.\r\n * NOTE: It is important to call this as a method, with the empty parentheses.\r\n *\r\n * @returns A new point.\r\n */\r\n function zero() {\r\n return [0, 0];\r\n }\r\n point.zero = zero;\r\n })(point = MakerJs.point || (MakerJs.point = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * Add a path to a model. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[pathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childPath The path to add.\r\n * @param parentModel The model to add to.\r\n * @param pathId The id of the path.\r\n * @param overwrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original path (for cascading).\r\n */\r\n function addTo(childPath, parentModel, pathId, overwrite) {\r\n if (overwrite === void 0) { overwrite = false; }\r\n MakerJs.model.addPath(parentModel, childPath, pathId, overwrite);\r\n return childPath;\r\n }\r\n path.addTo = addTo;\r\n /**\r\n * @private\r\n */\r\n function copyLayer(pathA, pathB) {\r\n if (pathA && pathB && typeof pathA.layer !== 'undefined') {\r\n pathB.layer = pathA.layer;\r\n }\r\n //carry extra props if this is an IPathArcInBezierCurve\r\n if (pathA && pathB && ('bezierData' in pathA)) {\r\n pathB.bezierData = pathA.bezierData;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var copyPropsMap = {};\r\n copyPropsMap[MakerJs.pathType.Circle] = function (srcCircle, destCircle, offset) {\r\n destCircle.radius = srcCircle.radius;\r\n };\r\n copyPropsMap[MakerJs.pathType.Arc] = function (srcArc, destArc, offset) {\r\n copyPropsMap[MakerJs.pathType.Circle](srcArc, destArc, offset);\r\n destArc.startAngle = srcArc.startAngle;\r\n destArc.endAngle = srcArc.endAngle;\r\n };\r\n copyPropsMap[MakerJs.pathType.Line] = function (srcLine, destLine, offset) {\r\n destLine.end = MakerJs.point.add(srcLine.end, offset);\r\n };\r\n copyPropsMap[MakerJs.pathType.BezierSeed] = function (srcSeed, destSeed, offset) {\r\n copyPropsMap[MakerJs.pathType.Line](srcSeed, destSeed, offset);\r\n destSeed.controls = srcSeed.controls.map(function (p) { return MakerJs.point.add(p, offset); });\r\n };\r\n /**\r\n * Create a clone of a path. This is faster than cloneObject.\r\n *\r\n * @param pathToClone The path to clone.\r\n * @param offset Optional point to move path a relative distance.\r\n * @returns Cloned path.\r\n */\r\n function clone(pathToClone, offset) {\r\n var result = { type: pathToClone.type, origin: MakerJs.point.add(pathToClone.origin, offset) };\r\n var fn = copyPropsMap[pathToClone.type];\r\n if (fn) {\r\n fn(pathToClone, result, offset);\r\n }\r\n copyLayer(pathToClone, result);\r\n return result;\r\n }\r\n path.clone = clone;\r\n /**\r\n * Copy the schema properties of one path to another.\r\n *\r\n * @param srcPath The source path to copy property values from.\r\n * @param destPath The destination path to copy property values to.\r\n * @returns The source path.\r\n */\r\n function copyProps(srcPath, destPath) {\r\n var fn = copyPropsMap[srcPath.type];\r\n if (fn) {\r\n destPath.origin = MakerJs.point.clone(srcPath.origin);\r\n fn(srcPath, destPath);\r\n }\r\n copyLayer(srcPath, destPath);\r\n return srcPath;\r\n }\r\n path.copyProps = copyProps;\r\n /**\r\n * @private\r\n */\r\n var mirrorMap = {};\r\n mirrorMap[MakerJs.pathType.Line] = function (line, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Line(origin, MakerJs.point.mirror(line.end, mirrorX, mirrorY));\r\n };\r\n mirrorMap[MakerJs.pathType.Circle] = function (circle, origin, mirrorX, mirrorY) {\r\n return new MakerJs.paths.Circle(origin, circle.radius);\r\n };\r\n mirrorMap[MakerJs.pathType.Arc] = function (arc, origin, mirrorX, mirrorY) {\r\n var startAngle = MakerJs.angle.mirror(arc.startAngle, mirrorX, mirrorY);\r\n var endAngle = MakerJs.angle.mirror(MakerJs.angle.ofArcEnd(arc), mirrorX, mirrorY);\r\n var xor = mirrorX != mirrorY;\r\n return new MakerJs.paths.Arc(origin, arc.radius, xor ? endAngle : startAngle, xor ? startAngle : endAngle);\r\n };\r\n mirrorMap[MakerJs.pathType.BezierSeed] = function (seed, origin, mirrorX, mirrorY) {\r\n var mirrored = mirrorMap[MakerJs.pathType.Line](seed, origin, mirrorX, mirrorY);\r\n mirrored.type = MakerJs.pathType.BezierSeed;\r\n mirrored.controls = seed.controls.map(function (c) { return MakerJs.point.mirror(c, mirrorX, mirrorY); });\r\n return mirrored;\r\n };\r\n /**\r\n * Set the layer of a path. This is equivalent to:\r\n * ```\r\n * pathContext.layer = layer;\r\n * ```\r\n *\r\n * @param pathContext The path to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original path (for cascading).\r\n */\r\n function layer(pathContext, layer) {\r\n pathContext.layer = layer;\r\n return pathContext;\r\n }\r\n path.layer = layer;\r\n /**\r\n * Create a clone of a path, mirrored on either or both x and y axes.\r\n *\r\n * @param pathToMirror The path to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored path.\r\n */\r\n function mirror(pathToMirror, mirrorX, mirrorY) {\r\n var newPath = null;\r\n if (pathToMirror) {\r\n var origin = MakerJs.point.mirror(pathToMirror.origin, mirrorX, mirrorY);\r\n var fn = mirrorMap[pathToMirror.type];\r\n if (fn) {\r\n newPath = fn(pathToMirror, origin, mirrorX, mirrorY);\r\n }\r\n }\r\n copyLayer(pathToMirror, newPath);\r\n return newPath;\r\n }\r\n path.mirror = mirror;\r\n /**\r\n * @private\r\n */\r\n var moveMap = {};\r\n moveMap[MakerJs.pathType.Line] = function (line, origin) {\r\n var delta = MakerJs.point.subtract(line.end, line.origin);\r\n line.end = MakerJs.point.add(origin, delta);\r\n };\r\n /**\r\n * Move a path to an absolute point.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param origin The new origin for the path.\r\n * @returns The original path (for cascading).\r\n */\r\n function move(pathToMove, origin) {\r\n if (pathToMove) {\r\n var fn = moveMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, origin);\r\n }\r\n pathToMove.origin = origin;\r\n }\r\n return pathToMove;\r\n }\r\n path.move = move;\r\n /**\r\n * @private\r\n */\r\n var moveRelativeMap = {};\r\n moveRelativeMap[MakerJs.pathType.Line] = function (line, delta, subtract) {\r\n line.end = MakerJs.point.add(line.end, delta, subtract);\r\n };\r\n moveRelativeMap[MakerJs.pathType.BezierSeed] = function (seed, delta, subtract) {\r\n moveRelativeMap[MakerJs.pathType.Line](seed, delta, subtract);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.add(c, delta, subtract); });\r\n };\r\n /**\r\n * Move a path's origin by a relative amount.\r\n *\r\n * @param pathToMove The path to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @param subtract Optional boolean to subtract instead of add.\r\n * @returns The original path (for cascading).\r\n */\r\n function moveRelative(pathToMove, delta, subtract) {\r\n if (pathToMove && delta) {\r\n pathToMove.origin = MakerJs.point.add(pathToMove.origin, delta, subtract);\r\n var fn = moveRelativeMap[pathToMove.type];\r\n if (fn) {\r\n fn(pathToMove, delta, subtract);\r\n }\r\n }\r\n return pathToMove;\r\n }\r\n path.moveRelative = moveRelative;\r\n /**\r\n * Move some paths relatively during a task execution, then unmove them.\r\n *\r\n * @param pathsToMove The paths to move.\r\n * @param deltas The x & y adjustments as a point object array.\r\n * @param task The function to call while the paths are temporarily moved.\r\n */\r\n function moveTemporary(pathsToMove, deltas, task) {\r\n var subtract = false;\r\n function move(pathToOffset, i) {\r\n if (deltas[i]) {\r\n moveRelative(pathToOffset, deltas[i], subtract);\r\n }\r\n }\r\n pathsToMove.map(move);\r\n task();\r\n subtract = true;\r\n pathsToMove.map(move);\r\n }\r\n path.moveTemporary = moveTemporary;\r\n /**\r\n * @private\r\n */\r\n var rotateMap = {};\r\n rotateMap[MakerJs.pathType.Line] = function (line, angleInDegrees, rotationOrigin) {\r\n line.end = MakerJs.point.rotate(line.end, angleInDegrees, rotationOrigin);\r\n };\r\n rotateMap[MakerJs.pathType.Arc] = function (arc, angleInDegrees, rotationOrigin) {\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle + angleInDegrees);\r\n arc.endAngle = MakerJs.angle.noRevolutions(arc.endAngle + angleInDegrees);\r\n };\r\n rotateMap[MakerJs.pathType.BezierSeed] = function (seed, angleInDegrees, rotationOrigin) {\r\n rotateMap[MakerJs.pathType.Line](seed, angleInDegrees, rotationOrigin);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.rotate(c, angleInDegrees, rotationOrigin); });\r\n };\r\n /**\r\n * Rotate a path.\r\n *\r\n * @param pathToRotate The path to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original path (for cascading).\r\n */\r\n function rotate(pathToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!pathToRotate || !angleInDegrees)\r\n return pathToRotate;\r\n pathToRotate.origin = MakerJs.point.rotate(pathToRotate.origin, angleInDegrees, rotationOrigin);\r\n var fn = rotateMap[pathToRotate.type];\r\n if (fn) {\r\n fn(pathToRotate, angleInDegrees, rotationOrigin);\r\n }\r\n return pathToRotate;\r\n }\r\n path.rotate = rotate;\r\n /**\r\n * @private\r\n */\r\n var scaleMap = {};\r\n scaleMap[MakerJs.pathType.Line] = function (line, scaleValue) {\r\n line.end = MakerJs.point.scale(line.end, scaleValue);\r\n };\r\n scaleMap[MakerJs.pathType.BezierSeed] = function (seed, scaleValue) {\r\n scaleMap[MakerJs.pathType.Line](seed, scaleValue);\r\n seed.controls = seed.controls.map(function (c) { return MakerJs.point.scale(c, scaleValue); });\r\n };\r\n scaleMap[MakerJs.pathType.Circle] = function (circle, scaleValue) {\r\n circle.radius *= scaleValue;\r\n };\r\n scaleMap[MakerJs.pathType.Arc] = scaleMap[MakerJs.pathType.Circle];\r\n /**\r\n * Scale a path.\r\n *\r\n * @param pathToScale The path to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @returns The original path (for cascading).\r\n */\r\n function scale(pathToScale, scaleValue) {\r\n if (!pathToScale || scaleValue === 1 || !scaleValue)\r\n return pathToScale;\r\n pathToScale.origin = MakerJs.point.scale(pathToScale.origin, scaleValue);\r\n var fn = scaleMap[pathToScale.type];\r\n if (fn) {\r\n fn(pathToScale, scaleValue);\r\n }\r\n return pathToScale;\r\n }\r\n path.scale = scale;\r\n /**\r\n * @private\r\n */\r\n var distortMap = {};\r\n distortMap[MakerJs.pathType.Arc] = function (arc, scaleX, scaleY) {\r\n return new MakerJs.models.EllipticArc(arc, scaleX, scaleY);\r\n };\r\n distortMap[MakerJs.pathType.Circle] = function (circle, scaleX, scaleY) {\r\n var ellipse = new MakerJs.models.Ellipse(circle.radius * scaleX, circle.radius * scaleY);\r\n ellipse.origin = MakerJs.point.distort(circle.origin, scaleX, scaleY);\r\n return ellipse;\r\n };\r\n distortMap[MakerJs.pathType.Line] = function (line, scaleX, scaleY) {\r\n return new MakerJs.paths.Line([line.origin, line.end].map(function (p) { return MakerJs.point.distort(p, scaleX, scaleY); }));\r\n };\r\n distortMap[MakerJs.pathType.BezierSeed] = function (seed, scaleX, scaleY) {\r\n var d = MakerJs.point.distort;\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: d(seed.origin, scaleX, scaleY),\r\n controls: seed.controls.map(function (c) { return d(c, scaleX, scaleY); }),\r\n end: d(seed.end, scaleX, scaleY)\r\n };\r\n };\r\n /**\r\n * Distort a path - scale x and y individually.\r\n *\r\n * @param pathToDistort The path to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds).\r\n */\r\n function distort(pathToDistort, scaleX, scaleY) {\r\n if (!pathToDistort || !scaleX || !scaleY)\r\n return null;\r\n var fn = distortMap[pathToDistort.type];\r\n if (fn) {\r\n var distorted = fn(pathToDistort, scaleX, scaleY);\r\n if (typeof pathToDistort.layer !== 'undefined') {\r\n distorted.layer = pathToDistort.layer;\r\n }\r\n return distorted;\r\n }\r\n return null;\r\n }\r\n path.distort = distort;\r\n /**\r\n * Connect 2 lines at their slope intersection point.\r\n *\r\n * @param lineA First line to converge.\r\n * @param lineB Second line to converge.\r\n * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point.\r\n * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point.\r\n * @returns point of convergence.\r\n */\r\n function converge(lineA, lineB, useOriginA, useOriginB) {\r\n var p = MakerJs.point.fromSlopeIntersection(lineA, lineB);\r\n if (p) {\r\n var lines = [lineA, lineB];\r\n var useOrigin = [useOriginA, useOriginB];\r\n if (arguments.length === 2) {\r\n //converge to closest\r\n lines.forEach(function (line, i) {\r\n useOrigin[i] = (MakerJs.point.closest(p, [line.origin, line.end]) === line.origin);\r\n });\r\n }\r\n function setPoint(line, useOrigin) {\r\n var setP;\r\n if (useOrigin) {\r\n setP = line.origin;\r\n }\r\n else {\r\n setP = line.end;\r\n }\r\n setP[0] = p[0];\r\n setP[1] = p[1];\r\n }\r\n lines.forEach(function (line, i) {\r\n setPoint(line, useOrigin[i]);\r\n });\r\n }\r\n return p;\r\n }\r\n path.converge = converge;\r\n /**\r\n * @private\r\n */\r\n var alterMap = {};\r\n alterMap[MakerJs.pathType.Arc] = function (arc, pathLength, distance, useOrigin) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var delta = ((pathLength + distance) * span / pathLength) - span;\r\n if (useOrigin) {\r\n arc.startAngle -= delta;\r\n }\r\n else {\r\n arc.endAngle += delta;\r\n }\r\n };\r\n alterMap[MakerJs.pathType.Circle] = function (circle, pathLength, distance, useOrigin) {\r\n circle.radius *= (pathLength + distance) / pathLength;\r\n };\r\n alterMap[MakerJs.pathType.Line] = function (line, pathLength, distance, useOrigin) {\r\n var delta = MakerJs.point.scale(MakerJs.point.subtract(line.end, line.origin), distance / pathLength);\r\n if (useOrigin) {\r\n line.origin = MakerJs.point.subtract(line.origin, delta);\r\n }\r\n else {\r\n line.end = MakerJs.point.add(line.end, delta);\r\n }\r\n };\r\n /**\r\n * Alter a path by lengthening or shortening it.\r\n *\r\n * @param pathToAlter Path to alter.\r\n * @param distance Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.\r\n * @param useOrigin Optional flag to alter from the origin instead of the end of the path.\r\n * @returns The original path (for cascading), or null if the path could not be altered.\r\n */\r\n function alterLength(pathToAlter, distance, useOrigin) {\r\n if (useOrigin === void 0) { useOrigin = false; }\r\n if (!pathToAlter || !distance)\r\n return null;\r\n var fn = alterMap[pathToAlter.type];\r\n if (fn) {\r\n var pathLength = MakerJs.measure.pathLength(pathToAlter);\r\n if (!pathLength || -distance >= pathLength)\r\n return null;\r\n fn(pathToAlter, pathLength, distance, useOrigin);\r\n return pathToAlter;\r\n }\r\n return null;\r\n }\r\n path.alterLength = alterLength;\r\n /**\r\n * Get points along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param numberOfPoints Number of points to divide the path.\r\n * @returns Array of points which are on the path spread at a uniform interval.\r\n */\r\n function toPoints(pathContext, numberOfPoints) {\r\n //avoid division by zero when there is only one point\r\n if (numberOfPoints == 1) {\r\n return [MakerJs.point.middle(pathContext)];\r\n }\r\n var points = [];\r\n var base = numberOfPoints;\r\n if (pathContext.type != MakerJs.pathType.Circle)\r\n base--;\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n points.push(MakerJs.point.middle(pathContext, i / base));\r\n }\r\n return points;\r\n }\r\n path.toPoints = toPoints;\r\n /**\r\n * @private\r\n */\r\n var numberOfKeyPointsMap = {};\r\n numberOfKeyPointsMap[MakerJs.pathType.Line] = function (line) {\r\n return 2;\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Circle] = function (circle, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(circle);\r\n if (!len)\r\n return 0;\r\n maxPointDistance = maxPointDistance || len;\r\n return Math.max(8, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n numberOfKeyPointsMap[MakerJs.pathType.Arc] = function (arc, maxPointDistance) {\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (!len)\r\n return 0;\r\n var minPoints = Math.ceil(MakerJs.angle.ofArcSpan(arc) / 45) + 1;\r\n return Math.max(minPoints, Math.ceil(len / (maxPointDistance || len)));\r\n };\r\n /**\r\n * Get key points (a minimal a number of points) along a path.\r\n *\r\n * @param pathContext Path to get points from.\r\n * @param maxArcFacet Optional maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the path.\r\n */\r\n function toKeyPoints(pathContext, maxArcFacet) {\r\n if (pathContext.type == MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(pathContext);\r\n var curveKeyPoints;\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n if (chains.length == 1) {\r\n var c = chains[0];\r\n switch (c.links[0].walkedPath.pathId) {\r\n case 'arc_0':\r\n case 'line_0':\r\n break;\r\n default:\r\n MakerJs.chain.reverse(c);\r\n }\r\n curveKeyPoints = MakerJs.chain.toKeyPoints(c);\r\n }\r\n else if (loose.length === 1) {\r\n curveKeyPoints = toKeyPoints(loose[0].pathContext);\r\n }\r\n });\r\n return curveKeyPoints;\r\n }\r\n else {\r\n var fn = numberOfKeyPointsMap[pathContext.type];\r\n if (fn) {\r\n var numberOfKeyPoints = fn(pathContext, maxArcFacet);\r\n if (numberOfKeyPoints) {\r\n return toPoints(pathContext, numberOfKeyPoints);\r\n }\r\n }\r\n }\r\n return [];\r\n }\r\n path.toKeyPoints = toKeyPoints;\r\n /**\r\n * Center a path at [0, 0].\r\n *\r\n * @param pathToCenter The path to center.\r\n * @returns The original path (for cascading).\r\n */\r\n function center(pathToCenter) {\r\n var m = MakerJs.measure.pathExtents(pathToCenter);\r\n var c = MakerJs.point.average(m.high, m.low);\r\n var o = MakerJs.point.subtract(pathToCenter.origin || [0, 0], c);\r\n move(pathToCenter, o);\r\n return pathToCenter;\r\n }\r\n path.center = center;\r\n /**\r\n * Move a path so its bounding box begins at [0, 0].\r\n *\r\n * @param pathToZero The path to zero.\r\n * @returns The original path (for cascading).\r\n */\r\n function zero(pathToZero) {\r\n var m = MakerJs.measure.pathExtents(pathToZero);\r\n var z = MakerJs.point.subtract(pathToZero.origin || [0, 0], m.low);\r\n move(pathToZero, z);\r\n return pathToZero;\r\n }\r\n path.zero = zero;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path_1) {\r\n /**\r\n * @private\r\n */\r\n var breakPathFunctionMap = {};\r\n breakPathFunctionMap[MakerJs.pathType.Arc] = function (arc, pointOfBreak) {\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(arc.origin, pointOfBreak);\r\n if (MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.startAngle) || MakerJs.measure.isAngleEqual(angleAtBreakPoint, arc.endAngle)) {\r\n return null;\r\n }\r\n function getAngleStrictlyBetweenArcAngles() {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var endAngle = startAngle + MakerJs.angle.ofArcEnd(arc) - arc.startAngle;\r\n var tries = [0, 1, -1];\r\n for (var i = 0; i < tries.length; i++) {\r\n var add = +360 * tries[i];\r\n if (MakerJs.measure.isBetween(angleAtBreakPoint + add, startAngle, endAngle, true)) {\r\n return arc.startAngle + angleAtBreakPoint + add - startAngle;\r\n }\r\n }\r\n return null;\r\n }\r\n var angleAtBreakPointBetween = getAngleStrictlyBetweenArcAngles();\r\n if (angleAtBreakPointBetween == null) {\r\n return null;\r\n }\r\n var savedEndAngle = arc.endAngle;\r\n arc.endAngle = angleAtBreakPointBetween;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(arc);\r\n copy.startAngle = angleAtBreakPointBetween;\r\n copy.endAngle = savedEndAngle;\r\n return copy;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Circle] = function (circle, pointOfBreak) {\r\n //breaking a circle turns it into an arc\r\n circle.type = MakerJs.pathType.Arc;\r\n var arc = circle;\r\n var angleAtBreakPoint = MakerJs.angle.ofPointInDegrees(circle.origin, pointOfBreak);\r\n arc.startAngle = angleAtBreakPoint;\r\n arc.endAngle = angleAtBreakPoint + 360;\r\n return null;\r\n };\r\n breakPathFunctionMap[MakerJs.pathType.Line] = function (line, pointOfBreak) {\r\n if (!MakerJs.measure.isBetweenPoints(pointOfBreak, line, true)) {\r\n return null;\r\n }\r\n var savedEndPoint = line.end;\r\n line.end = pointOfBreak;\r\n //clone the original to carry other properties\r\n var copy = MakerJs.cloneObject(line);\r\n copy.origin = pointOfBreak;\r\n copy.end = savedEndPoint;\r\n return copy;\r\n };\r\n /**\r\n * Breaks a path in two. The supplied path will end at the supplied pointOfBreak,\r\n * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.\r\n * For Circle, the original path will be converted in place to an Arc, and null is returned.\r\n *\r\n * @param pathToBreak The path to break.\r\n * @param pointOfBreak The point at which to break the path.\r\n * @returns A new path of the same type, when path type is line or arc. Returns null for circle.\r\n */\r\n function breakAtPoint(pathToBreak, pointOfBreak) {\r\n if (pathToBreak && pointOfBreak) {\r\n var fn = breakPathFunctionMap[pathToBreak.type];\r\n if (fn) {\r\n var result = fn(pathToBreak, pointOfBreak);\r\n if (result && ('layer' in pathToBreak)) {\r\n result.layer = pathToBreak.layer;\r\n }\r\n return result;\r\n }\r\n }\r\n return null;\r\n }\r\n path_1.breakAtPoint = breakAtPoint;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var paths;\r\n (function (paths) {\r\n /**\r\n * Class for arc path.\r\n */\r\n var Arc = /** @class */ (function () {\r\n function Arc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n function getSpan(origin) {\r\n var startAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 1 : 0]);\r\n var endAngle = MakerJs.angle.ofPointInDegrees(origin, args[clockwise ? 0 : 1]);\r\n if (endAngle < startAngle) {\r\n endAngle += 360;\r\n }\r\n return {\r\n origin: origin,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n size: endAngle - startAngle\r\n };\r\n }\r\n switch (args.length) {\r\n case 5:\r\n //SVG style arc designation\r\n var pointA = args[0];\r\n var pointB = args[1];\r\n this.radius = args[2];\r\n var largeArc = args[3];\r\n var clockwise = args[4];\r\n var span;\r\n //make sure arc can reach. if not, scale up.\r\n var smallestRadius = MakerJs.measure.pointDistance(pointA, pointB) / 2;\r\n if (MakerJs.round(this.radius - smallestRadius) <= 0) {\r\n this.radius = smallestRadius;\r\n span = getSpan(MakerJs.point.average(pointA, pointB));\r\n }\r\n else {\r\n //find the 2 potential origins\r\n var origins = MakerJs.path.intersection(new Circle(pointA, this.radius), new Circle(pointB, this.radius));\r\n var spans = [];\r\n for (var i = origins.intersectionPoints.length; i--;) {\r\n span = getSpan(origins.intersectionPoints[i]);\r\n //insert sorted by size ascending\r\n if (spans.length == 0 || span.size > spans[0].size) {\r\n spans.push(span);\r\n }\r\n else {\r\n spans.unshift(span);\r\n }\r\n }\r\n var index = largeArc ? 1 : 0;\r\n span = spans[index];\r\n }\r\n this.origin = span.origin;\r\n this.startAngle = span.startAngle;\r\n this.endAngle = span.endAngle;\r\n break;\r\n case 4:\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n this.startAngle = args[2];\r\n this.endAngle = args[3];\r\n break;\r\n case 3:\r\n if (MakerJs.isPoint(args[2])) {\r\n //from 3 points\r\n Circle.apply(this, args);\r\n var angles = [];\r\n for (var i = 0; i < 3; i++) {\r\n angles.push(MakerJs.angle.ofPointInDegrees(this.origin, args[i]));\r\n }\r\n this.startAngle = angles[0];\r\n this.endAngle = angles[2];\r\n //swap start and end angles if this arc does not contain the midpoint\r\n if (!MakerJs.measure.isBetweenArcAngles(angles[1], this, false)) {\r\n this.startAngle = angles[2];\r\n this.endAngle = angles[0];\r\n }\r\n //do not fall through if this was 3 points\r\n break;\r\n }\r\n //fall through to below if 2 points\r\n case 2:\r\n //from 2 points (and optional clockwise flag)\r\n var clockwise = args[2];\r\n Circle.call(this, args[0], args[1]);\r\n this.startAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 1 : 0]);\r\n this.endAngle = MakerJs.angle.ofPointInDegrees(this.origin, args[clockwise ? 0 : 1]);\r\n break;\r\n }\r\n //do this after Circle.apply / Circle.call to make sure this is an arc\r\n this.type = MakerJs.pathType.Arc;\r\n }\r\n return Arc;\r\n }());\r\n paths.Arc = Arc;\r\n /**\r\n * Class for circle path.\r\n */\r\n var Circle = /** @class */ (function () {\r\n function Circle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Circle;\r\n switch (args.length) {\r\n case 1:\r\n this.origin = [0, 0];\r\n this.radius = args[0];\r\n break;\r\n case 2:\r\n if (MakerJs.isNumber(args[1])) {\r\n this.origin = args[0];\r\n this.radius = args[1];\r\n }\r\n else {\r\n //Circle from 2 points\r\n this.origin = MakerJs.point.average(args[0], args[1]);\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n break;\r\n default:\r\n //Circle from 3 points\r\n //create 2 lines with 2nd point in common\r\n var lines = [\r\n new Line(args[0], args[1]),\r\n new Line(args[1], args[2])\r\n ];\r\n //create perpendicular lines\r\n var perpendiculars = [];\r\n for (var i = 2; i--;) {\r\n var midpoint = MakerJs.point.middle(lines[i]);\r\n perpendiculars.push(MakerJs.path.rotate(lines[i], 90, midpoint));\r\n }\r\n //find intersection of slopes of perpendiculars\r\n var origin = MakerJs.point.fromSlopeIntersection(perpendiculars[0], perpendiculars[1]);\r\n if (origin) {\r\n this.origin = origin;\r\n //radius is distance to any of the 3 points\r\n this.radius = MakerJs.measure.pointDistance(this.origin, args[0]);\r\n }\r\n else {\r\n throw 'invalid parameters - attempted to construct a circle from 3 points on a line: ' + JSON.stringify(args);\r\n }\r\n break;\r\n }\r\n }\r\n return Circle;\r\n }());\r\n paths.Circle = Circle;\r\n /**\r\n * Class for line path.\r\n */\r\n var Line = /** @class */ (function () {\r\n function Line() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.Line;\r\n switch (args.length) {\r\n case 1:\r\n var points = args[0];\r\n this.origin = points[0];\r\n this.end = points[1];\r\n break;\r\n case 2:\r\n this.origin = args[0];\r\n this.end = args[1];\r\n break;\r\n }\r\n }\r\n return Line;\r\n }());\r\n paths.Line = Line;\r\n /**\r\n * Class for chord, which is simply a line path that connects the endpoints of an arc.\r\n *\r\n * @param arc Arc to use as the basic for the chord.\r\n */\r\n var Chord = /** @class */ (function () {\r\n function Chord(arc) {\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = arcPoints[0];\r\n this.end = arcPoints[1];\r\n }\r\n return Chord;\r\n }());\r\n paths.Chord = Chord;\r\n /**\r\n * Class for a parallel line path.\r\n *\r\n * @param toLine A line to be parallel to.\r\n * @param distance Distance between parallel and original line.\r\n * @param nearPoint Any point to determine which side of the line to place the parallel.\r\n */\r\n var Parallel = /** @class */ (function () {\r\n function Parallel(toLine, distance, nearPoint) {\r\n this.type = MakerJs.pathType.Line;\r\n this.origin = MakerJs.point.clone(toLine.origin);\r\n this.end = MakerJs.point.clone(toLine.end);\r\n var angleOfLine = MakerJs.angle.ofLineInDegrees(this);\r\n function getNewOrigin(offsetAngle) {\r\n var origin = MakerJs.point.add(toLine.origin, MakerJs.point.fromPolar(MakerJs.angle.toRadians(angleOfLine + offsetAngle), distance));\r\n return {\r\n origin: origin,\r\n nearness: MakerJs.measure.pointDistance(origin, nearPoint)\r\n };\r\n }\r\n var newOrigins = [getNewOrigin(-90), getNewOrigin(90)];\r\n var newOrigin = (newOrigins[0].nearness < newOrigins[1].nearness) ? newOrigins[0].origin : newOrigins[1].origin;\r\n MakerJs.path.move(this, newOrigin);\r\n }\r\n return Parallel;\r\n }());\r\n paths.Parallel = Parallel;\r\n })(paths = MakerJs.paths || (MakerJs.paths = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Add a path as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.paths[childPathId] = childPath;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param modelContext The model to add to.\r\n * @param pathContext The path to add.\r\n * @param pathId The id of the path.\r\n * @param overWrite Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addPath(modelContext, pathContext, pathId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? pathId : getSimilarPathId(modelContext, pathId);\r\n modelContext.paths = modelContext.paths || {};\r\n modelContext.paths[id] = pathContext;\r\n return modelContext;\r\n }\r\n model.addPath = addPath;\r\n /**\r\n * Add a model as a child. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param parentModel The model to add to.\r\n * @param childModel The model to add.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addModel(parentModel, childModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n var id = overWrite ? childModelId : getSimilarModelId(parentModel, childModelId);\r\n parentModel.models = parentModel.models || {};\r\n parentModel.models[id] = childModel;\r\n return parentModel;\r\n }\r\n model.addModel = addModel;\r\n /**\r\n * Add a model as a child of another model. This is basically equivalent to:\r\n * ```\r\n * parentModel.models[childModelId] = childModel;\r\n * ```\r\n * with additional checks to make it safe for cascading.\r\n *\r\n * @param childModel The model to add.\r\n * @param parentModel The model to add to.\r\n * @param childModelId The id of the child model.\r\n * @param overWrite Optional flag to overwrite any model referenced by childModelId. Default is false, which will create an id similar to childModelId.\r\n * @returns The original model (for cascading).\r\n */\r\n function addTo(childModel, parentModel, childModelId, overWrite) {\r\n if (overWrite === void 0) { overWrite = false; }\r\n addModel(parentModel, childModel, childModelId, overWrite);\r\n return childModel;\r\n }\r\n model.addTo = addTo;\r\n /**\r\n * Clone a model. Alias of makerjs.cloneObject(modelToClone)\r\n *\r\n * @param modelToClone The model to clone.\r\n * @returns A clone of the model you passed.\r\n */\r\n function clone(modelToClone) {\r\n return MakerJs.cloneObject(modelToClone);\r\n }\r\n model.clone = clone;\r\n /**\r\n * Count the number of child models within a given model.\r\n *\r\n * @param modelContext The model containing other models.\r\n * @returns Number of child models.\r\n */\r\n function countChildModels(modelContext) {\r\n var count = 0;\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n model.countChildModels = countChildModels;\r\n /**\r\n * @private\r\n */\r\n function getSimilarId(map, id) {\r\n if (!map)\r\n return id;\r\n var i = 0;\r\n var newId = id;\r\n while (newId in map) {\r\n i++;\r\n newId = [id, i].join('_');\r\n }\r\n return newId;\r\n }\r\n /**\r\n * Get an unused id in the models map with the same prefix.\r\n *\r\n * @param modelContext The model containing the models map.\r\n * @param modelId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarModelId(modelContext, modelId) {\r\n return getSimilarId(modelContext.models, modelId);\r\n }\r\n model.getSimilarModelId = getSimilarModelId;\r\n /**\r\n * Get an unused id in the paths map with the same prefix.\r\n *\r\n * @param modelContext The model containing the paths map.\r\n * @param pathId The id to use directly (if unused), or as a prefix.\r\n */\r\n function getSimilarPathId(modelContext, pathId) {\r\n return getSimilarId(modelContext.paths, pathId);\r\n }\r\n model.getSimilarPathId = getSimilarPathId;\r\n /**\r\n * Set the layer of a model. This is equivalent to:\r\n * ```\r\n * modelContext.layer = layer;\r\n * ```\r\n *\r\n * @param modelContext The model to set the layer.\r\n * @param layer The layer name.\r\n * @returns The original model (for cascading).\r\n */\r\n function layer(modelContext, layer) {\r\n modelContext.layer = layer;\r\n return modelContext;\r\n }\r\n model.layer = layer;\r\n /**\r\n * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other.\r\n *\r\n * @param modelToOriginate The model to originate.\r\n * @param origin Optional offset reference point.\r\n * @returns The original model (for cascading).\r\n */\r\n function originate(modelToOriginate, origin) {\r\n function innerOriginate(m, o) {\r\n if (!m)\r\n return;\r\n var newOrigin = MakerJs.point.add(m.origin, o);\r\n if (m.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.moveRelative(m.seed, newOrigin);\r\n }\r\n if (m.paths) {\r\n for (var id in m.paths) {\r\n MakerJs.path.moveRelative(m.paths[id], newOrigin);\r\n }\r\n }\r\n if (m.models) {\r\n for (var id in m.models) {\r\n innerOriginate(m.models[id], newOrigin);\r\n }\r\n }\r\n m.origin = MakerJs.point.zero();\r\n }\r\n innerOriginate(modelToOriginate, origin ? MakerJs.point.subtract([0, 0], origin) : [0, 0]);\r\n if (origin) {\r\n modelToOriginate.origin = origin;\r\n }\r\n return modelToOriginate;\r\n }\r\n model.originate = originate;\r\n /**\r\n * Center a model at [0, 0].\r\n *\r\n * @param modelToCenter The model to center.\r\n * @param centerX Boolean to center on the x axis. Default is true.\r\n * @param centerY Boolean to center on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function center(modelToCenter, centerX, centerY) {\r\n if (centerX === void 0) { centerX = true; }\r\n if (centerY === void 0) { centerY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToCenter);\r\n var o = modelToCenter.origin || [0, 0];\r\n if (centerX)\r\n o[0] -= m.center[0];\r\n if (centerY)\r\n o[1] -= m.center[1];\r\n modelToCenter.origin = o;\r\n return modelToCenter;\r\n }\r\n model.center = center;\r\n /**\r\n * Create a clone of a model, mirrored on either or both x and y axes.\r\n *\r\n * @param modelToMirror The model to mirror.\r\n * @param mirrorX Boolean to mirror on the x axis.\r\n * @param mirrorY Boolean to mirror on the y axis.\r\n * @returns Mirrored model.\r\n */\r\n function mirror(modelToMirror, mirrorX, mirrorY) {\r\n var newModel = {};\r\n if (!modelToMirror)\r\n return null;\r\n if (modelToMirror.origin) {\r\n newModel.origin = MakerJs.point.mirror(modelToMirror.origin, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.type) {\r\n newModel.type = modelToMirror.type;\r\n }\r\n if ('layer' in modelToMirror) {\r\n newModel.layer = modelToMirror.layer;\r\n }\r\n if (modelToMirror.units) {\r\n newModel.units = modelToMirror.units;\r\n }\r\n if (modelToMirror.type === MakerJs.models.BezierCurve.typeName) {\r\n newModel.type = MakerJs.models.BezierCurve.typeName;\r\n newModel.seed = MakerJs.path.mirror(modelToMirror.seed, mirrorX, mirrorY);\r\n }\r\n if (modelToMirror.paths) {\r\n newModel.paths = {};\r\n for (var id in modelToMirror.paths) {\r\n var pathToMirror = modelToMirror.paths[id];\r\n if (!pathToMirror)\r\n continue;\r\n var pathMirrored = MakerJs.path.mirror(pathToMirror, mirrorX, mirrorY);\r\n if (!pathMirrored)\r\n continue;\r\n newModel.paths[id] = pathMirrored;\r\n }\r\n }\r\n if (modelToMirror.models) {\r\n newModel.models = {};\r\n for (var id in modelToMirror.models) {\r\n var childModelToMirror = modelToMirror.models[id];\r\n if (!childModelToMirror)\r\n continue;\r\n var childModelMirrored = mirror(childModelToMirror, mirrorX, mirrorY);\r\n if (!childModelMirrored)\r\n continue;\r\n newModel.models[id] = childModelMirrored;\r\n }\r\n }\r\n return newModel;\r\n }\r\n model.mirror = mirror;\r\n /**\r\n * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for cascading.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param origin The new position of the model.\r\n * @returns The original model (for cascading).\r\n */\r\n function move(modelToMove, origin) {\r\n modelToMove.origin = MakerJs.point.clone(origin);\r\n return modelToMove;\r\n }\r\n model.move = move;\r\n /**\r\n * Move a model's origin by a relative amount.\r\n *\r\n * @param modelToMove The model to move.\r\n * @param delta The x & y adjustments as a point object.\r\n * @returns The original model (for cascading).\r\n */\r\n function moveRelative(modelToMove, delta) {\r\n if (modelToMove) {\r\n modelToMove.origin = MakerJs.point.add(modelToMove.origin || MakerJs.point.zero(), delta);\r\n }\r\n return modelToMove;\r\n }\r\n model.moveRelative = moveRelative;\r\n /**\r\n * Prefix the ids of paths in a model.\r\n *\r\n * @param modelToPrefix The model to prefix.\r\n * @param prefix The prefix to prepend on paths ids.\r\n * @returns The original model (for cascading).\r\n */\r\n function prefixPathIds(modelToPrefix, prefix) {\r\n var walkedPaths = [];\r\n //first collect the paths because we don't want to modify keys during an iteration on keys\r\n walk(modelToPrefix, {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n });\r\n //now modify the ids in our own iteration\r\n for (var i = 0; i < walkedPaths.length; i++) {\r\n var walkedPath = walkedPaths[i];\r\n delete walkedPath.modelContext.paths[walkedPath.pathId];\r\n walkedPath.modelContext.paths[prefix + walkedPath.pathId] = walkedPath.pathContext;\r\n }\r\n return modelToPrefix;\r\n }\r\n model.prefixPathIds = prefixPathIds;\r\n /**\r\n * Rotate a model.\r\n *\r\n * @param modelToRotate The model to rotate.\r\n * @param angleInDegrees The amount of rotation, in degrees.\r\n * @param rotationOrigin The center point of rotation.\r\n * @returns The original model (for cascading).\r\n */\r\n function rotate(modelToRotate, angleInDegrees, rotationOrigin) {\r\n if (rotationOrigin === void 0) { rotationOrigin = [0, 0]; }\r\n if (!modelToRotate || !angleInDegrees)\r\n return modelToRotate;\r\n var offsetOrigin = MakerJs.point.subtract(rotationOrigin, modelToRotate.origin);\r\n if (modelToRotate.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.rotate(modelToRotate.seed, angleInDegrees, offsetOrigin);\r\n }\r\n if (modelToRotate.paths) {\r\n for (var id in modelToRotate.paths) {\r\n MakerJs.path.rotate(modelToRotate.paths[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n if (modelToRotate.models) {\r\n for (var id in modelToRotate.models) {\r\n rotate(modelToRotate.models[id], angleInDegrees, offsetOrigin);\r\n }\r\n }\r\n return modelToRotate;\r\n }\r\n model.rotate = rotate;\r\n /**\r\n * Scale a model.\r\n *\r\n * @param modelToScale The model to scale.\r\n * @param scaleValue The amount of scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @returns The original model (for cascading).\r\n */\r\n function scale(modelToScale, scaleValue, scaleOrigin) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n if (scaleOrigin && modelToScale.origin) {\r\n modelToScale.origin = MakerJs.point.scale(modelToScale.origin, scaleValue);\r\n }\r\n if (modelToScale.type === MakerJs.models.BezierCurve.typeName) {\r\n MakerJs.path.scale(modelToScale.seed, scaleValue);\r\n }\r\n if (modelToScale.paths) {\r\n for (var id in modelToScale.paths) {\r\n MakerJs.path.scale(modelToScale.paths[id], scaleValue);\r\n }\r\n }\r\n if (modelToScale.models) {\r\n for (var id in modelToScale.models) {\r\n scale(modelToScale.models[id], scaleValue, true);\r\n }\r\n }\r\n return modelToScale;\r\n }\r\n model.scale = scale;\r\n /**\r\n * @private\r\n */\r\n function addDistortedPath(parentModel, pathToDistort, pathId, layer, scaleX, scaleY, bezierAccuracy) {\r\n var distortedPath = MakerJs.path.distort(pathToDistort, scaleX, scaleY);\r\n layer = layer || pathToDistort.layer;\r\n if (layer) {\r\n distortedPath.layer = layer;\r\n }\r\n if (MakerJs.isPath(distortedPath)) {\r\n if (distortedPath.type === MakerJs.pathType.BezierSeed) {\r\n var curve = new MakerJs.models.BezierCurve(distortedPath, bezierAccuracy);\r\n addModel(parentModel, curve, pathId);\r\n }\r\n else {\r\n addPath(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n else {\r\n addModel(parentModel, distortedPath, pathId);\r\n }\r\n }\r\n /**\r\n * Create a distorted copy of a model - scale x and y individually.\r\n *\r\n * @param modelToDistort The model to distort.\r\n * @param scaleX The amount of x scaling.\r\n * @param scaleY The amount of y scaling.\r\n * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns New model (for cascading).\r\n */\r\n function distort(modelToDistort, scaleX, scaleY, scaleOrigin, bezierAccuracy) {\r\n if (scaleOrigin === void 0) { scaleOrigin = false; }\r\n var distorted = {};\r\n if (modelToDistort.layer) {\r\n distorted.layer = modelToDistort.layer;\r\n }\r\n if (scaleOrigin && modelToDistort.origin) {\r\n distorted.origin = MakerJs.point.distort(modelToDistort.origin, scaleX, scaleY);\r\n }\r\n if (modelToDistort.type === MakerJs.models.BezierCurve.typeName) {\r\n var b = modelToDistort;\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n var _loop_1 = function (layer_1) {\r\n var pathArray = bezierPartsByLayer[layer_1];\r\n pathArray.forEach(function (p, i) {\r\n addDistortedPath(distorted, p, i.toString(), layer_1, scaleX, scaleY, bezierAccuracy);\r\n });\r\n };\r\n for (var layer_1 in bezierPartsByLayer) {\r\n _loop_1(layer_1);\r\n }\r\n }\r\n else if (modelToDistort.paths) {\r\n for (var pathId in modelToDistort.paths) {\r\n var pathToDistort = modelToDistort.paths[pathId];\r\n addDistortedPath(distorted, pathToDistort, pathId, null, scaleX, scaleY, bezierAccuracy);\r\n }\r\n }\r\n if (modelToDistort.models) {\r\n for (var childId in modelToDistort.models) {\r\n var childModel = modelToDistort.models[childId];\r\n var distortedChild = distort(childModel, scaleX, scaleY, true, bezierAccuracy);\r\n addModel(distorted, distortedChild, childId);\r\n }\r\n }\r\n return distorted;\r\n }\r\n model.distort = distort;\r\n /**\r\n * Convert a model to match a different unit system.\r\n *\r\n * @param modeltoConvert The model to convert.\r\n * @param destUnitType The unit system.\r\n * @returns The scaled model (for cascading).\r\n */\r\n function convertUnits(modeltoConvert, destUnitType) {\r\n if (modeltoConvert.units && MakerJs.units.isValidUnit(modeltoConvert.units) && MakerJs.units.isValidUnit(destUnitType)) {\r\n var ratio = MakerJs.units.conversionScale(modeltoConvert.units, destUnitType);\r\n if (ratio != 1) {\r\n scale(modeltoConvert, ratio);\r\n //update the model with its new unit type\r\n modeltoConvert.units = destUnitType;\r\n }\r\n }\r\n return modeltoConvert;\r\n }\r\n model.convertUnits = convertUnits;\r\n /**\r\n * DEPRECATED - use model.walk instead.\r\n * Recursively walk through all paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param callback Callback for each path.\r\n */\r\n function walkPaths(modelContext, callback) {\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n if (!modelContext.paths[pathId])\r\n continue;\r\n callback(modelContext, pathId, modelContext.paths[pathId]);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var id in modelContext.models) {\r\n if (!modelContext.models[id])\r\n continue;\r\n walkPaths(modelContext.models[id], callback);\r\n }\r\n }\r\n }\r\n model.walkPaths = walkPaths;\r\n /**\r\n * Recursively walk through all child models and paths for a given model.\r\n *\r\n * @param modelContext The model to walk.\r\n * @param options Object containing callbacks.\r\n * @returns The original model (for cascading).\r\n */\r\n function walk(modelContext, options) {\r\n if (!modelContext)\r\n return;\r\n function walkRecursive(modelContext, layer, offset, route, routeKey) {\r\n var newOffset = MakerJs.point.add(modelContext.origin, offset);\r\n layer = (layer != undefined) ? layer : '';\r\n if (modelContext.paths) {\r\n for (var pathId in modelContext.paths) {\r\n var pathContext = modelContext.paths[pathId];\r\n if (!pathContext)\r\n continue;\r\n var walkedPath = {\r\n modelContext: modelContext,\r\n layer: (pathContext.layer != undefined) ? pathContext.layer : layer,\r\n offset: newOffset,\r\n pathContext: pathContext,\r\n pathId: pathId,\r\n route: route.concat(['paths', pathId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'paths' + JSON.stringify([pathId])\r\n };\r\n if (options.onPath)\r\n options.onPath(walkedPath);\r\n }\r\n }\r\n if (modelContext.models) {\r\n for (var modelId in modelContext.models) {\r\n var childModel = modelContext.models[modelId];\r\n if (!childModel)\r\n continue;\r\n var walkedModel = {\r\n parentModel: modelContext,\r\n layer: (childModel.layer != undefined) ? childModel.layer : layer,\r\n offset: newOffset,\r\n route: route.concat(['models', modelId]),\r\n routeKey: routeKey + (routeKey ? '.' : '') + 'models' + JSON.stringify([modelId]),\r\n childId: modelId,\r\n childModel: childModel\r\n };\r\n if (options.beforeChildWalk) {\r\n if (!options.beforeChildWalk(walkedModel))\r\n continue;\r\n }\r\n walkRecursive(walkedModel.childModel, walkedModel.layer, newOffset, walkedModel.route, walkedModel.routeKey);\r\n if (options.afterChildWalk) {\r\n options.afterChildWalk(walkedModel);\r\n }\r\n }\r\n }\r\n }\r\n walkRecursive(modelContext, modelContext.layer, [0, 0], [], '');\r\n return modelContext;\r\n }\r\n model.walk = walk;\r\n /**\r\n * Move a model so its bounding box begins at [0, 0].\r\n *\r\n * @param modelToZero The model to zero.\r\n * @param zeroX Boolean to zero on the x axis. Default is true.\r\n * @param zeroY Boolean to zero on the y axis. Default is true.\r\n * @returns The original model (for cascading).\r\n */\r\n function zero(modelToZero, zeroX, zeroY) {\r\n if (zeroX === void 0) { zeroX = true; }\r\n if (zeroY === void 0) { zeroY = true; }\r\n var m = MakerJs.measure.modelExtents(modelToZero);\r\n var z = modelToZero.origin || [0, 0];\r\n if (zeroX)\r\n z[0] -= m.low[0];\r\n if (zeroY)\r\n z[1] -= m.low[1];\r\n modelToZero.origin = z;\r\n return modelToZero;\r\n }\r\n model.zero = zero;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getNonZeroSegments(pathToSegment, breakPoint) {\r\n var segment1 = MakerJs.cloneObject(pathToSegment);\r\n if (!segment1)\r\n return null;\r\n var segment2 = MakerJs.path.breakAtPoint(segment1, breakPoint);\r\n if (segment2) {\r\n var segments = [segment1, segment2];\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(MakerJs.measure.pathLength(segments[i]), .0001) == 0) {\r\n return null;\r\n }\r\n }\r\n return segments;\r\n }\r\n else if (pathToSegment.type == MakerJs.pathType.Circle) {\r\n return [segment1];\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getPointsOnPath(points, onPath, popOptions) {\r\n var endpointsOnPath = [];\r\n points.forEach(function (p) {\r\n if (MakerJs.measure.isPointOnPath(p, onPath, .00001, null, popOptions)) {\r\n endpointsOnPath.push(p);\r\n }\r\n });\r\n return endpointsOnPath;\r\n }\r\n /**\r\n * @private\r\n */\r\n function breakAlongForeignPath(crossedPath, overlappedSegments, foreignWalkedPath) {\r\n var foreignPath = foreignWalkedPath.pathContext;\r\n var segments = crossedPath.segments;\r\n if (MakerJs.measure.isPathEqual(segments[0].absolutePath, foreignPath, .0001, null, foreignWalkedPath.offset)) {\r\n segments[0].overlapped = true;\r\n segments[0].duplicate = true;\r\n overlappedSegments.push(segments[0]);\r\n return;\r\n }\r\n //this will cache the slope, to keep from being recalculated for each segment\r\n var popOptions = {};\r\n var options = { path1Offset: crossedPath.offset, path2Offset: foreignWalkedPath.offset };\r\n var foreignIntersection = MakerJs.path.intersection(crossedPath.pathContext, foreignPath, options);\r\n var intersectionPoints = foreignIntersection ? foreignIntersection.intersectionPoints : null;\r\n var foreignPathEndPoints = MakerJs.point.fromPathEnds(foreignPath, foreignWalkedPath.offset) || [];\r\n for (var i = 0; i < segments.length; i++) {\r\n var pointsOfInterest = intersectionPoints ? foreignPathEndPoints.concat(intersectionPoints) : foreignPathEndPoints;\r\n var pointsToCheck = getPointsOnPath(pointsOfInterest, segments[i].absolutePath, popOptions);\r\n if (options.out_AreOverlapped) {\r\n segments[i].overlapped = true;\r\n overlappedSegments.push(segments[i]);\r\n }\r\n if (pointsToCheck.length > 0) {\r\n //break the path which intersected, and add the shard to the end of the array so it can also be checked in this loop for further sharding.\r\n var subSegments = null;\r\n var p = 0;\r\n while (!subSegments && p < pointsToCheck.length) {\r\n subSegments = getNonZeroSegments(segments[i].absolutePath, pointsToCheck[p]);\r\n p++;\r\n }\r\n if (subSegments) {\r\n crossedPath.broken = true;\r\n segments[i].absolutePath = subSegments[0];\r\n if (subSegments[1]) {\r\n var newSegment = {\r\n absolutePath: subSegments[1],\r\n pathId: segments[0].pathId,\r\n overlapped: segments[i].overlapped,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n if (segments[i].overlapped) {\r\n overlappedSegments.push(newSegment);\r\n }\r\n segments.push(newSegment);\r\n }\r\n //re-check this segment for another deep intersection\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * DEPRECATED - use measure.isPointInsideModel instead.\r\n * Check to see if a path is inside of a model.\r\n *\r\n * @param pathContext The path to check.\r\n * @param modelContext The model to check against.\r\n * @param farPoint Optional point of reference which is outside the bounds of the modelContext.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPathInsideModel(pathContext, modelContext, pathOffset, farPoint, measureAtlas) {\r\n var options = {\r\n farPoint: farPoint,\r\n measureAtlas: measureAtlas\r\n };\r\n var p = MakerJs.point.add(MakerJs.point.middle(pathContext), pathOffset);\r\n return MakerJs.measure.isPointInsideModel(p, modelContext, options);\r\n }\r\n model.isPathInsideModel = isPathInsideModel;\r\n /**\r\n * DEPRECATED\r\n * Break a model's paths everywhere they intersect with another path.\r\n *\r\n * @param modelToBreak The model containing paths to be broken.\r\n * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used.\r\n * @returns The original model (for cascading).\r\n */\r\n function breakPathsAtIntersections(modelToBreak, modelToIntersect) {\r\n var modelToBreakAtlas = new MakerJs.measure.Atlas(modelToBreak);\r\n modelToBreakAtlas.measureModels();\r\n var modelToIntersectAtlas;\r\n if (!modelToIntersect) {\r\n modelToIntersect = modelToBreak;\r\n modelToIntersectAtlas = modelToBreakAtlas;\r\n }\r\n else {\r\n modelToIntersectAtlas = new MakerJs.measure.Atlas(modelToIntersect);\r\n modelToIntersectAtlas.measureModels();\r\n }\r\n ;\r\n breakAllPathsAtIntersections(modelToBreak, modelToIntersect || modelToBreak, false, modelToBreakAtlas, modelToIntersectAtlas);\r\n return modelToBreak;\r\n }\r\n model.breakPathsAtIntersections = breakPathsAtIntersections;\r\n /**\r\n * @private\r\n */\r\n function breakAllPathsAtIntersections(modelToBreak, modelToIntersect, checkIsInside, modelToBreakAtlas, modelToIntersectAtlas, farPoint) {\r\n var crossedPaths = [];\r\n var overlappedSegments = [];\r\n var walkModelToBreakOptions = {\r\n onPath: function (outerWalkedPath) {\r\n //clone this path and make it the first segment\r\n var segment = {\r\n absolutePath: MakerJs.path.clone(outerWalkedPath.pathContext, outerWalkedPath.offset),\r\n pathId: outerWalkedPath.pathId,\r\n overlapped: false,\r\n uniqueForeignIntersectionPoints: []\r\n };\r\n var thisPath = outerWalkedPath;\r\n thisPath.broken = false;\r\n thisPath.segments = [segment];\r\n var walkModelToIntersectOptions = {\r\n onPath: function (innerWalkedPath) {\r\n if (outerWalkedPath.pathContext !== innerWalkedPath.pathContext && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], modelToIntersectAtlas.pathMap[innerWalkedPath.routeKey])) {\r\n breakAlongForeignPath(thisPath, overlappedSegments, innerWalkedPath);\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = modelToIntersectAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && MakerJs.measure.isMeasurementOverlapping(modelToBreakAtlas.pathMap[outerWalkedPath.routeKey], innerModelMeasurement);\r\n }\r\n };\r\n //keep breaking the segments anywhere they intersect with paths of the other model\r\n model.walk(modelToIntersect, walkModelToIntersectOptions);\r\n if (checkIsInside) {\r\n //check each segment whether it is inside or outside\r\n for (var i = 0; i < thisPath.segments.length; i++) {\r\n var p = MakerJs.point.middle(thisPath.segments[i].absolutePath);\r\n var pointInsideOptions = { measureAtlas: modelToIntersectAtlas, farPoint: farPoint };\r\n thisPath.segments[i].isInside = MakerJs.measure.isPointInsideModel(p, modelToIntersect, pointInsideOptions);\r\n thisPath.segments[i].uniqueForeignIntersectionPoints = pointInsideOptions.out_intersectionPoints;\r\n }\r\n }\r\n crossedPaths.push(thisPath);\r\n }\r\n };\r\n model.walk(modelToBreak, walkModelToBreakOptions);\r\n return { crossedPaths: crossedPaths, overlappedSegments: overlappedSegments };\r\n }\r\n /**\r\n * @private\r\n */\r\n function checkForEqualOverlaps(crossedPathsA, crossedPathsB, pointMatchingDistance) {\r\n function compareSegments(segment1, segment2) {\r\n if (MakerJs.measure.isPathEqual(segment1.absolutePath, segment2.absolutePath, pointMatchingDistance)) {\r\n segment1.duplicate = segment2.duplicate = true;\r\n }\r\n }\r\n function compareAll(segment) {\r\n for (var i = 0; i < crossedPathsB.length; i++) {\r\n compareSegments(crossedPathsB[i], segment);\r\n }\r\n }\r\n for (var i = 0; i < crossedPathsA.length; i++) {\r\n compareAll(crossedPathsA[i]);\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function addOrDeleteSegments(crossedPath, includeInside, includeOutside, keepDuplicates, atlas, trackDeleted) {\r\n function addSegment(modelContext, pathIdBase, segment) {\r\n var id = model.getSimilarPathId(modelContext, pathIdBase);\r\n var newRouteKey = (id == pathIdBase) ? crossedPath.routeKey : MakerJs.createRouteKey(crossedPath.route.slice(0, -1).concat([id]));\r\n segment.addedPath = MakerJs.cloneObject(crossedPath.pathContext);\r\n //circles may have become arcs\r\n segment.addedPath.type = segment.absolutePath.type;\r\n MakerJs.path.copyProps(segment.absolutePath, segment.addedPath);\r\n MakerJs.path.moveRelative(segment.addedPath, crossedPath.offset, true);\r\n modelContext.paths[id] = segment.addedPath;\r\n if (crossedPath.broken) {\r\n //save the new segment's measurement\r\n var measurement = MakerJs.measure.pathExtents(segment.absolutePath);\r\n atlas.pathMap[newRouteKey] = measurement;\r\n atlas.modelsMeasured = false;\r\n }\r\n else {\r\n //keep the original measurement\r\n atlas.pathMap[newRouteKey] = savedMeasurement;\r\n }\r\n }\r\n function checkAddSegment(modelContext, pathIdBase, segment) {\r\n if (segment.isInside && includeInside || !segment.isInside && includeOutside) {\r\n addSegment(modelContext, pathIdBase, segment);\r\n }\r\n else {\r\n atlas.modelsMeasured = false;\r\n trackDeleted(segment.absolutePath, crossedPath.routeKey, 'segment is ' + (segment.isInside ? 'inside' : 'outside') + ' intersectionPoints=' + JSON.stringify(segment.uniqueForeignIntersectionPoints));\r\n }\r\n }\r\n //save the original measurement\r\n var savedMeasurement = atlas.pathMap[crossedPath.routeKey];\r\n //delete the original, its segments will be added\r\n delete crossedPath.modelContext.paths[crossedPath.pathId];\r\n delete atlas.pathMap[crossedPath.routeKey];\r\n for (var i = 0; i < crossedPath.segments.length; i++) {\r\n if (crossedPath.segments[i].duplicate) {\r\n if (keepDuplicates) {\r\n addSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n else {\r\n trackDeleted(crossedPath.segments[i].absolutePath, crossedPath.routeKey, 'segment is duplicate');\r\n }\r\n }\r\n else {\r\n checkAddSegment(crossedPath.modelContext, crossedPath.pathId, crossedPath.segments[i]);\r\n }\r\n }\r\n }\r\n /**\r\n * Combine 2 models. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @param includeAInsideB Flag to include paths from modelA which are inside of modelB.\r\n * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB.\r\n * @param includeBInsideA Flag to include paths from modelB which are inside of modelA.\r\n * @param includeBOutsideA Flag to include paths from modelB which are outside of modelA.\r\n * @param options Optional ICombineOptions object.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combine(modelA, modelB, includeAInsideB, includeAOutsideB, includeBInsideA, includeBOutsideA, options) {\r\n if (includeAInsideB === void 0) { includeAInsideB = false; }\r\n if (includeAOutsideB === void 0) { includeAOutsideB = true; }\r\n if (includeBInsideA === void 0) { includeBInsideA = false; }\r\n if (includeBOutsideA === void 0) { includeBOutsideA = true; }\r\n var opts = {\r\n trimDeadEnds: true,\r\n pointMatchingDistance: .005,\r\n out_deleted: [{ paths: {} }, { paths: {} }]\r\n };\r\n MakerJs.extendObject(opts, options);\r\n opts.measureA = opts.measureA || new MakerJs.measure.Atlas(modelA);\r\n opts.measureB = opts.measureB || new MakerJs.measure.Atlas(modelB);\r\n //make sure model measurements capture all paths\r\n opts.measureA.measureModels();\r\n opts.measureB.measureModels();\r\n if (!opts.farPoint) {\r\n var measureBoth = MakerJs.measure.increase(MakerJs.measure.increase({ high: [null, null], low: [null, null] }, opts.measureA.modelMap['']), opts.measureB.modelMap['']);\r\n opts.farPoint = MakerJs.point.add(measureBoth.high, [1, 1]);\r\n }\r\n var pathsA = breakAllPathsAtIntersections(modelA, modelB, true, opts.measureA, opts.measureB, opts.farPoint);\r\n var pathsB = breakAllPathsAtIntersections(modelB, modelA, true, opts.measureB, opts.measureA, opts.farPoint);\r\n checkForEqualOverlaps(pathsA.overlappedSegments, pathsB.overlappedSegments, opts.pointMatchingDistance);\r\n function trackDeleted(which, deletedPath, routeKey, reason) {\r\n model.addPath(opts.out_deleted[which], deletedPath, 'deleted');\r\n var p = deletedPath;\r\n p.reason = reason;\r\n p.routeKey = routeKey;\r\n }\r\n for (var i = 0; i < pathsA.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsA.crossedPaths[i], includeAInsideB, includeAOutsideB, true, opts.measureA, function (p, id, reason) { return trackDeleted(0, p, id, reason); });\r\n }\r\n for (var i = 0; i < pathsB.crossedPaths.length; i++) {\r\n addOrDeleteSegments(pathsB.crossedPaths[i], includeBInsideA, includeBOutsideA, false, opts.measureB, function (p, id, reason) { return trackDeleted(1, p, id, reason); });\r\n }\r\n var result = { models: { a: modelA, b: modelB } };\r\n if (opts.trimDeadEnds) {\r\n var shouldKeep;\r\n //union\r\n if (!includeAInsideB && !includeBInsideA) {\r\n shouldKeep = function (walkedPath) {\r\n //When A and B share an outer contour, the segments marked as duplicate will not pass the \"inside\" test on either A or B.\r\n //Duplicates were discarded from B but kept in A\r\n for (var i = 0; i < pathsA.overlappedSegments.length; i++) {\r\n if (pathsA.overlappedSegments[i].duplicate && walkedPath.pathContext === pathsA.overlappedSegments[i].addedPath) {\r\n return false;\r\n }\r\n }\r\n //default - keep the path\r\n return true;\r\n };\r\n }\r\n model.removeDeadEnds(result, null, shouldKeep, function (wp, reason) {\r\n var which = wp.route[1] === 'a' ? 0 : 1;\r\n trackDeleted(which, wp.pathContext, wp.routeKey, reason);\r\n });\r\n }\r\n //pass options back to caller\r\n MakerJs.extendObject(options, opts);\r\n return result;\r\n }\r\n model.combine = combine;\r\n /**\r\n * Combine 2 models, resulting in a intersection. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineIntersection(modelA, modelB) {\r\n return combine(modelA, modelB, true, false, true, false);\r\n }\r\n model.combineIntersection = combineIntersection;\r\n /**\r\n * Combine 2 models, resulting in a subtraction of B from A. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineSubtraction(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, true, false);\r\n }\r\n model.combineSubtraction = combineSubtraction;\r\n /**\r\n * Combine 2 models, resulting in a union. Each model will be modified accordingly.\r\n *\r\n * @param modelA First model to combine.\r\n * @param modelB Second model to combine.\r\n * @returns A new model containing both of the input models as \"a\" and \"b\".\r\n */\r\n function combineUnion(modelA, modelB) {\r\n return combine(modelA, modelB, false, true, false, true);\r\n }\r\n model.combineUnion = combineUnion;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n /**\r\n * Collects items that share a common key.\r\n */\r\n var Collector = /** @class */ (function () {\r\n function Collector(comparer) {\r\n this.comparer = comparer;\r\n this.collections = [];\r\n }\r\n Collector.prototype.addItemToCollection = function (key, item) {\r\n var found = this.findCollection(key);\r\n if (found) {\r\n found.push(item);\r\n }\r\n else {\r\n var collection = { key: key, items: [item] };\r\n this.collections.push(collection);\r\n }\r\n };\r\n Collector.prototype.findCollection = function (key, action) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (this.comparer(key, collection.key)) {\r\n if (action) {\r\n action(i);\r\n }\r\n return collection.items;\r\n }\r\n }\r\n return null;\r\n };\r\n Collector.prototype.removeCollection = function (key) {\r\n var _this = this;\r\n if (this.findCollection(key, function (index) { _this.collections.splice(index, 1); })) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n Collector.prototype.removeItemFromCollection = function (key, item) {\r\n var collection = this.findCollection(key);\r\n if (!collection)\r\n return;\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i] === item) {\r\n collection.splice(i, 1);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Collector.prototype.getCollectionsOfMultiple = function (cb) {\r\n for (var i = 0; i < this.collections.length; i++) {\r\n var collection = this.collections[i];\r\n if (collection.items.length > 1) {\r\n cb(collection.key, collection.items);\r\n }\r\n }\r\n };\r\n return Collector;\r\n }());\r\n MakerJs.Collector = Collector;\r\n /**\r\n * @private\r\n */\r\n var kdbush = require('kdbush');\r\n /**\r\n * A graph of items which may be located on the same points.\r\n */\r\n var PointGraph = /** @class */ (function () {\r\n function PointGraph() {\r\n this.reset();\r\n }\r\n /**\r\n * Reset the stored points, graphs, lists, to initial state.\r\n */\r\n PointGraph.prototype.reset = function () {\r\n this.insertedCount = 0;\r\n this.graph = {};\r\n this.index = {};\r\n this.merged = {};\r\n this.values = [];\r\n };\r\n /**\r\n * Insert a value.\r\n * @param value Value associated with this point.\r\n * @returns valueId of the inserted value.\r\n */\r\n PointGraph.prototype.insertValue = function (value) {\r\n this.values.push(value);\r\n return this.values.length - 1;\r\n };\r\n /**\r\n * Insert a value at a point.\r\n * @param p Point.\r\n * @param value Value associated with this point.\r\n */\r\n PointGraph.prototype.insertValueIdAtPoint = function (valueId, p) {\r\n var x = p[0], y = p[1];\r\n if (!this.graph[x]) {\r\n this.graph[x] = {};\r\n }\r\n var pgx = this.graph[x];\r\n var existed = (y in pgx);\r\n var el;\r\n var pointId;\r\n if (!existed) {\r\n pgx[y] = pointId = this.insertedCount++;\r\n el = {\r\n pointId: pointId,\r\n point: p,\r\n valueIds: [valueId]\r\n };\r\n this.index[pointId] = el;\r\n }\r\n else {\r\n pointId = pgx[y];\r\n if (pointId in this.merged) {\r\n pointId = this.merged[pointId];\r\n }\r\n el = this.index[pointId];\r\n el.valueIds.push(valueId);\r\n }\r\n return { existed: existed, pointId: pointId };\r\n };\r\n /**\r\n * Merge points within a given distance from each other. Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergePoints = function (withinDistance) {\r\n var _this = this;\r\n var points = [];\r\n var kEls = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n var p = el.point;\r\n el.kdId = points.length;\r\n points.push(p);\r\n kEls.push(el);\r\n }\r\n this.kdbush = kdbush(points);\r\n var _loop_2 = function (pointId) {\r\n if (pointId in this_1.merged)\r\n return \"continue\";\r\n var el = this_1.index[pointId];\r\n var mergeIds = this_1.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n mergeIds.forEach(function (kdId) {\r\n if (kdId === el.kdId)\r\n return;\r\n _this.mergeIndexElements(el, kEls[kdId]);\r\n });\r\n };\r\n var this_1 = this;\r\n for (var pointId in this.index) {\r\n _loop_2(pointId);\r\n }\r\n };\r\n /**\r\n * Finds all points which have only one value associated. Then, merge to the nearest other point within this set.\r\n * Call this after inserting values.\r\n * @param withinDistance Distance to consider points equal.\r\n */\r\n PointGraph.prototype.mergeNearestSinglePoints = function (withinDistance) {\r\n var _this = this;\r\n var singles = [];\r\n for (var pointId in this.index) {\r\n var el = this.index[pointId];\r\n if (el.valueIds.length === 1) {\r\n singles.push(el);\r\n }\r\n }\r\n this.kdbush = kdbush(singles.map(function (el) { return el.point; }));\r\n singles.forEach(function (el) {\r\n if (el.pointId in _this.merged)\r\n return;\r\n var mergeIds = _this.kdbush.within(el.point[0], el.point[1], withinDistance);\r\n var byDistance = [];\r\n mergeIds.forEach(function (i) {\r\n var other = singles[i];\r\n if (other.pointId === el.pointId)\r\n return;\r\n byDistance.push({ el: other, distance: MakerJs.measure.pointDistance(other.point, el.point) });\r\n });\r\n byDistance.sort(function (a, b) { return a.distance - b.distance; });\r\n for (var i = 0; i < byDistance.length; i++) {\r\n var other = byDistance[i].el;\r\n if (other.pointId in _this.merged)\r\n continue;\r\n if (other.merged && other.merged.length > 0) {\r\n _this.mergeIndexElements(other, el);\r\n }\r\n else {\r\n _this.mergeIndexElements(el, other);\r\n }\r\n return;\r\n }\r\n });\r\n };\r\n PointGraph.prototype.mergeIndexElements = function (keep, remove) {\r\n keep.merged = keep.merged || [];\r\n keep.merged.push(remove.pointId);\r\n this.merged[remove.pointId] = keep.pointId;\r\n keep.valueIds.push.apply(keep.valueIds, remove.valueIds);\r\n delete this.index[remove.pointId];\r\n return keep.pointId;\r\n };\r\n /**\r\n * Iterate over points in the index.\r\n * @param cb Callback for each point in the index.\r\n */\r\n PointGraph.prototype.forEachPoint = function (cb) {\r\n var _this = this;\r\n for (var pointId = 0; pointId < this.insertedCount; pointId++) {\r\n var el = this.index[pointId];\r\n if (!el)\r\n continue;\r\n var length_1 = el.valueIds.length;\r\n if (length_1 > 0) {\r\n cb(el.point, el.valueIds.map(function (i) { return _this.values[i]; }), pointId, el);\r\n }\r\n }\r\n };\r\n /**\r\n * Gets the id of a point, after merging.\r\n * @param p Point to look up id.\r\n */\r\n PointGraph.prototype.getIdOfPoint = function (p) {\r\n var px = this.graph[p[0]];\r\n if (px) {\r\n var pointId = px[p[1]];\r\n if (pointId >= 0) {\r\n if (pointId in this.merged) {\r\n return this.merged[pointId];\r\n }\r\n else {\r\n return pointId;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Get the index element of a point, after merging.\r\n * @param p Point to look up index element.\r\n */\r\n PointGraph.prototype.getElementAtPoint = function (p) {\r\n var pointId = this.getIdOfPoint(p);\r\n if (pointId >= 0) {\r\n return this.index[pointId];\r\n }\r\n };\r\n return PointGraph;\r\n }());\r\n MakerJs.PointGraph = PointGraph;\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function checkForOverlaps(refPaths, isOverlapping, overlapUnion) {\r\n var currIndex = 0;\r\n do {\r\n var root = refPaths[currIndex];\r\n do {\r\n var overlaps = false;\r\n for (var i = currIndex + 1; i < refPaths.length; i++) {\r\n var arcRef = refPaths[i];\r\n overlaps = isOverlapping(root.pathContext, arcRef.pathContext, false);\r\n if (overlaps) {\r\n overlapUnion(root.pathContext, arcRef.pathContext);\r\n delete arcRef.modelContext.paths[arcRef.pathId];\r\n refPaths.splice(i, 1);\r\n break;\r\n }\r\n }\r\n } while (overlaps);\r\n currIndex++;\r\n } while (currIndex < refPaths.length);\r\n }\r\n /**\r\n * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated.\r\n *\r\n * @param modelContext The originated model to search for similar paths.\r\n * @param options Optional options object.\r\n * @returns The simplified model (for cascading).\r\n */\r\n function simplify(modelToSimplify, options) {\r\n function compareCircles(circleA, circleB) {\r\n if (Math.abs(circleA.radius - circleB.radius) <= opts.scalarMatchingDistance) {\r\n var distance = MakerJs.measure.pointDistance(circleA.origin, circleB.origin);\r\n return distance <= opts.pointMatchingDistance;\r\n }\r\n return false;\r\n }\r\n var similarArcs = new MakerJs.Collector(compareCircles);\r\n var similarCircles = new MakerJs.Collector(compareCircles);\r\n var similarLines = new MakerJs.Collector(MakerJs.measure.isSlopeEqual);\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arcRef) {\r\n similarArcs.addItemToCollection(arcRef.pathContext, arcRef);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circleRef) {\r\n similarCircles.addItemToCollection(circleRef.pathContext, circleRef);\r\n };\r\n map[MakerJs.pathType.Line] = function (lineRef) {\r\n var slope = MakerJs.measure.lineSlope(lineRef.pathContext);\r\n similarLines.addItemToCollection(slope, lineRef);\r\n };\r\n var opts = {\r\n scalarMatchingDistance: .001,\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //walk the model and collect: arcs on same center / radius, circles on same center / radius, lines on same y-intercept / slope.\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath);\r\n }\r\n }\r\n };\r\n model.walk(modelToSimplify, walkOptions);\r\n //for all arcs that are similar, see if they overlap.\r\n //combine overlapping arcs into the first one and delete the second.\r\n similarArcs.getCollectionsOfMultiple(function (key, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isArcOverlapping, function (arcA, arcB) {\r\n //find ends within the other\r\n var aEndsInB = MakerJs.measure.isBetweenArcAngles(arcA.endAngle, arcB, false);\r\n var bEndsInA = MakerJs.measure.isBetweenArcAngles(arcB.endAngle, arcA, false);\r\n //check for complete circle\r\n if (aEndsInB && bEndsInA) {\r\n arcA.endAngle = arcA.startAngle + 360;\r\n return;\r\n }\r\n //find the leader, in polar terms\r\n var ordered = aEndsInB ? [arcA, arcB] : [arcB, arcA];\r\n //save in arcA\r\n arcA.startAngle = MakerJs.angle.noRevolutions(ordered[0].startAngle);\r\n arcA.endAngle = ordered[1].endAngle;\r\n });\r\n });\r\n //for all circles that are similar, delete all but the first.\r\n similarCircles.getCollectionsOfMultiple(function (key, circleRefs) {\r\n for (var i = 1; i < circleRefs.length; i++) {\r\n var circleRef = circleRefs[i];\r\n delete circleRef.modelContext.paths[circleRef.pathId];\r\n }\r\n });\r\n //for all lines that are similar, see if they overlap.\r\n //combine overlapping lines into the first one and delete the second.\r\n similarLines.getCollectionsOfMultiple(function (slope, arcRefs) {\r\n checkForOverlaps(arcRefs, MakerJs.measure.isLineOverlapping, function (lineA, lineB) {\r\n var box = { paths: { lineA: lineA, lineB: lineB } };\r\n var m = MakerJs.measure.modelExtents(box);\r\n if (!slope.hasSlope) {\r\n //vertical\r\n lineA.origin[1] = m.low[1];\r\n lineA.end[1] = m.high[1];\r\n }\r\n else {\r\n //non-vertical\r\n if (slope.slope < 0) {\r\n //downward\r\n lineA.origin = [m.low[0], m.high[1]];\r\n lineA.end = [m.high[0], m.low[1]];\r\n }\r\n else if (slope.slope > 0) {\r\n //upward\r\n lineA.origin = m.low;\r\n lineA.end = m.high;\r\n }\r\n else {\r\n //horizontal\r\n lineA.origin[0] = m.low[0];\r\n lineA.end[0] = m.high[0];\r\n }\r\n }\r\n });\r\n });\r\n return modelToSimplify;\r\n }\r\n model.simplify = simplify;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = function (arc, expansion, isolateCaps) {\r\n return new MakerJs.models.OvalArc(arc.startAngle, arc.endAngle, arc.radius, expansion, false, isolateCaps);\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, expansion, isolateCaps) {\r\n return new MakerJs.models.Ring(circle.radius + expansion, circle.radius - expansion);\r\n };\r\n map[MakerJs.pathType.Line] = function (line, expansion, isolateCaps) {\r\n return new MakerJs.models.Slot(line.origin, line.end, expansion, isolateCaps);\r\n };\r\n /**\r\n * Expand path by creating a model which surrounds it.\r\n *\r\n * @param pathToExpand Path to expand.\r\n * @param expansion Distance to expand.\r\n * @param isolateCaps Optional flag to put the end caps into a separate model named \"caps\".\r\n * @returns Model which surrounds the path.\r\n */\r\n function expand(pathToExpand, expansion, isolateCaps) {\r\n if (!pathToExpand)\r\n return null;\r\n var result = null;\r\n var fn = map[pathToExpand.type];\r\n if (fn) {\r\n result = fn(pathToExpand, expansion, isolateCaps);\r\n result.origin = pathToExpand.origin;\r\n }\r\n return result;\r\n }\r\n path.expand = expand;\r\n /**\r\n * Represent an arc using straight lines.\r\n *\r\n * @param arc Arc to straighten.\r\n * @param bevel Optional flag to bevel the angle to prevent it from being too sharp.\r\n * @param prefix Optional string prefix to apply to path ids.\r\n * @param close Optional flag to make a closed geometry by connecting the endpoints.\r\n * @returns Model of straight lines with same endpoints as the arc.\r\n */\r\n function straighten(arc, bevel, prefix, close) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n var joints = 1;\r\n if (arcSpan >= 270) {\r\n joints = 4;\r\n }\r\n else if (arcSpan > 180) {\r\n joints = 3;\r\n }\r\n else if (arcSpan > 150 || bevel) {\r\n joints = 2;\r\n }\r\n var jointAngleInRadians = MakerJs.angle.toRadians(arcSpan / joints);\r\n var circumscribedRadius = MakerJs.models.Polygon.circumscribedRadius(arc.radius, jointAngleInRadians);\r\n var ends = MakerJs.point.fromArc(arc);\r\n var points = [MakerJs.point.subtract(ends[0], arc.origin)];\r\n var a = MakerJs.angle.toRadians(arc.startAngle) + jointAngleInRadians / 2;\r\n for (var i = 0; i < joints; i++) {\r\n points.push(MakerJs.point.fromPolar(a, circumscribedRadius));\r\n a += jointAngleInRadians;\r\n }\r\n points.push(MakerJs.point.subtract(ends[1], arc.origin));\r\n var result = new MakerJs.models.ConnectTheDots(close, points);\r\n result.origin = arc.origin;\r\n if (typeof prefix === 'string' && prefix.length) {\r\n MakerJs.model.prefixPathIds(result, prefix);\r\n }\r\n return result;\r\n }\r\n path.straighten = straighten;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * Expand all paths in a model, then combine the resulting expansions.\r\n *\r\n * @param modelToExpand Model to expand.\r\n * @param distance Distance to expand.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param combineOptions Optional object containing combine options.\r\n * @returns Model which surrounds the paths of the original model.\r\n */\r\n function expandPaths(modelToExpand, distance, joints, combineOptions) {\r\n if (joints === void 0) { joints = 0; }\r\n if (combineOptions === void 0) { combineOptions = {}; }\r\n if (distance <= 0)\r\n return null;\r\n var result = {\r\n models: {\r\n expansions: { models: {} },\r\n caps: { models: {} }\r\n }\r\n };\r\n var first = true;\r\n var lastFarPoint = combineOptions.farPoint;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //don't expand paths shorter than the tolerance for combine operations\r\n if (combineOptions.pointMatchingDistance && MakerJs.measure.pathLength(walkedPath.pathContext) < combineOptions.pointMatchingDistance)\r\n return;\r\n var expandedPathModel = MakerJs.path.expand(walkedPath.pathContext, distance, true);\r\n if (expandedPathModel) {\r\n model.moveRelative(expandedPathModel, walkedPath.offset);\r\n var newId = model.getSimilarModelId(result.models['expansions'], walkedPath.pathId);\r\n model.prefixPathIds(expandedPathModel, walkedPath.pathId + '_');\r\n model.originate(expandedPathModel);\r\n if (!first) {\r\n model.combine(result, expandedPathModel, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n }\r\n result.models['expansions'].models[newId] = expandedPathModel;\r\n if (expandedPathModel.models) {\r\n var caps = expandedPathModel.models['Caps'];\r\n if (caps) {\r\n delete expandedPathModel.models['Caps'];\r\n result.models['caps'].models[newId] = caps;\r\n }\r\n }\r\n first = false;\r\n }\r\n }\r\n };\r\n model.walk(modelToExpand, walkOptions);\r\n if (joints) {\r\n var roundCaps = result.models['caps'];\r\n var straightCaps = { models: {} };\r\n result.models['straightcaps'] = straightCaps;\r\n model.simplify(roundCaps);\r\n //straighten each cap, optionally beveling\r\n for (var id in roundCaps.models) {\r\n //add a model container to the straight caps\r\n straightCaps.models[id] = { models: {} };\r\n model.walk(roundCaps.models[id], {\r\n onPath: function (walkedPath) {\r\n var arc = walkedPath.pathContext;\r\n //make a small closed shape using the straightened arc\r\n var straightened = MakerJs.path.straighten(arc, joints == 2, walkedPath.pathId + '_', true);\r\n //union this little pointy shape with the rest of the result\r\n model.combine(result, straightened, false, true, false, true, combineOptions);\r\n combineOptions.measureA.modelsMeasured = false;\r\n lastFarPoint = combineOptions.farPoint;\r\n delete combineOptions.farPoint;\r\n delete combineOptions.measureB;\r\n //replace the rounded path with the straightened model\r\n straightCaps.models[id].models[walkedPath.pathId] = straightened;\r\n //delete all the paths in the model containing this path\r\n delete walkedPath.modelContext.paths;\r\n }\r\n });\r\n }\r\n //delete the round caps\r\n delete result.models['caps'];\r\n }\r\n combineOptions.farPoint = lastFarPoint;\r\n return result;\r\n }\r\n model.expandPaths = expandPaths;\r\n /**\r\n * @private\r\n */\r\n function getEndlessChains(modelContext) {\r\n var endlessChains = [];\r\n model.findChains(modelContext, function (chains, loose, layer) {\r\n endlessChains = chains.filter(function (chain) { return chain.endless; });\r\n });\r\n return endlessChains;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getClosedGeometries(modelContext) {\r\n //get endless chains from the model\r\n var endlessChains = getEndlessChains(modelContext);\r\n if (endlessChains.length == 0)\r\n return null;\r\n //make a new model with only closed geometries\r\n var closed = { models: {} };\r\n endlessChains.forEach(function (c, i) {\r\n closed.models[i] = MakerJs.chain.toNewModel(c);\r\n });\r\n return closed;\r\n }\r\n /**\r\n * Outline a model by a specified distance. Useful for accommodating for kerf.\r\n *\r\n * @param modelToOutline Model to outline.\r\n * @param distance Distance to outline.\r\n * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints.\r\n * @param inside Optional boolean to draw lines inside the model instead of outside.\r\n * @param options Options to send to combine() function.\r\n * @returns Model which surrounds the paths outside of the original model.\r\n */\r\n function outline(modelToOutline, distance, joints, inside, options) {\r\n if (joints === void 0) { joints = 0; }\r\n if (inside === void 0) { inside = false; }\r\n if (options === void 0) { options = {}; }\r\n var expanded = expandPaths(modelToOutline, distance, joints, options);\r\n if (!expanded)\r\n return null;\r\n //get closed geometries from the model\r\n var closed = getClosedGeometries(modelToOutline);\r\n if (closed) {\r\n var childCount = 0;\r\n var result = { models: {} };\r\n //get closed geometries from the expansion\r\n var chains = getEndlessChains(expanded);\r\n chains.forEach(function (c) {\r\n //sample one link from the chain\r\n var wp = c.links[0].walkedPath;\r\n //see if it is inside the original model\r\n var isInside = MakerJs.measure.isPointInsideModel(MakerJs.point.middle(wp.pathContext), closed, wp.offset);\r\n //save the ones we want\r\n if (inside && isInside || !inside && !isInside) {\r\n result.models[childCount++] = MakerJs.chain.toNewModel(c);\r\n }\r\n ;\r\n });\r\n return result;\r\n }\r\n else {\r\n return expanded;\r\n }\r\n }\r\n model.outline = outline;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var units;\r\n (function (units) {\r\n /**\r\n * The base type is arbitrary. Other conversions are then based off of this.\r\n * @private\r\n */\r\n var base = MakerJs.unitType.Millimeter;\r\n /**\r\n * Initialize all known conversions here.\r\n * @private\r\n */\r\n function init() {\r\n addBaseConversion(MakerJs.unitType.Centimeter, 10);\r\n addBaseConversion(MakerJs.unitType.Meter, 1000);\r\n addBaseConversion(MakerJs.unitType.Inch, 25.4);\r\n addBaseConversion(MakerJs.unitType.Foot, 25.4 * 12);\r\n }\r\n /**\r\n * Table of conversions. Lazy load upon first conversion.\r\n * @private\r\n */\r\n var table;\r\n /**\r\n * Add a conversion, and its inversion.\r\n * @private\r\n */\r\n function addConversion(srcUnitType, destUnitType, value) {\r\n function row(unitType) {\r\n if (!table[unitType]) {\r\n table[unitType] = {};\r\n }\r\n return table[unitType];\r\n }\r\n row(srcUnitType)[destUnitType] = value;\r\n row(destUnitType)[srcUnitType] = 1 / value;\r\n }\r\n /**\r\n * Add a conversion of the base unit.\r\n * @private\r\n */\r\n function addBaseConversion(destUnitType, value) {\r\n addConversion(destUnitType, base, value);\r\n }\r\n /**\r\n * Get a conversion ratio between a source unit and a destination unit.\r\n *\r\n * @param srcUnitType unitType converting from.\r\n * @param destUnitType unitType converting to.\r\n * @returns Numeric ratio of the conversion.\r\n */\r\n function conversionScale(srcUnitType, destUnitType) {\r\n if (srcUnitType == destUnitType) {\r\n return 1;\r\n }\r\n //This will lazy load the table with initial conversions.\r\n if (!table) {\r\n table = {};\r\n init();\r\n }\r\n //look for a cached conversion in the table.\r\n if (!table[srcUnitType][destUnitType]) {\r\n //create a new conversionsand cache it in the table.\r\n addConversion(srcUnitType, destUnitType, table[srcUnitType][base] * table[base][destUnitType]);\r\n }\r\n return table[srcUnitType] && table[srcUnitType][destUnitType];\r\n }\r\n units.conversionScale = conversionScale;\r\n /**\r\n * Check to see if unit type is a valid Maker.js unit.\r\n *\r\n * @param tryUnit unit type to check.\r\n * @returns Boolean true if unit type is valid.\r\n */\r\n function isValidUnit(tryUnit) {\r\n for (var id in MakerJs.unitType) {\r\n if (MakerJs.unitType[id] == tryUnit) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n units.isValidUnit = isValidUnit;\r\n })(units = MakerJs.units || (MakerJs.units = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Find out if two angles are equal.\r\n *\r\n * @param angleA First angle.\r\n * @param angleB Second angle.\r\n * @returns true if angles are the same, false if they are not\r\n */\r\n function isAngleEqual(angleA, angleB, accuracy) {\r\n if (accuracy === void 0) { accuracy = .0001; }\r\n var a = MakerJs.angle.noRevolutions(angleA);\r\n var b = MakerJs.angle.noRevolutions(angleB);\r\n var d = MakerJs.angle.noRevolutions(MakerJs.round(b - a, accuracy));\r\n return d == 0;\r\n }\r\n measure.isAngleEqual = isAngleEqual;\r\n /**\r\n * @private\r\n */\r\n var pathAreEqualMap = {};\r\n pathAreEqualMap[MakerJs.pathType.Line] = function (lineA, lineB, withinPointDistance) {\r\n return (isPointEqual(lineA.origin, lineB.origin, withinPointDistance) && isPointEqual(lineA.end, lineB.end, withinPointDistance))\r\n || (isPointEqual(lineA.origin, lineB.end, withinPointDistance) && isPointEqual(lineA.end, lineB.origin, withinPointDistance));\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Circle] = function (circleA, circleB, withinPointDistance) {\r\n return isPointEqual(circleA.origin, circleB.origin, withinPointDistance) && circleA.radius == circleB.radius;\r\n };\r\n pathAreEqualMap[MakerJs.pathType.Arc] = function (arcA, arcB, withinPointDistance) {\r\n return pathAreEqualMap[MakerJs.pathType.Circle](arcA, arcB, withinPointDistance) && isAngleEqual(arcA.startAngle, arcB.startAngle) && isAngleEqual(arcA.endAngle, arcB.endAngle);\r\n };\r\n /**\r\n * Find out if two paths are equal.\r\n *\r\n * @param pathA First path.\r\n * @param pathB Second path.\r\n * @returns true if paths are the same, false if they are not\r\n */\r\n function isPathEqual(pathA, pathB, withinPointDistance, pathAOffset, pathBOffset) {\r\n var result = false;\r\n if (pathA.type == pathB.type) {\r\n var fn = pathAreEqualMap[pathA.type];\r\n if (fn) {\r\n function getResult() {\r\n result = fn(pathA, pathB, withinPointDistance);\r\n }\r\n if (pathAOffset || pathBOffset) {\r\n MakerJs.path.moveTemporary([pathA, pathB], [pathAOffset, pathBOffset], getResult);\r\n }\r\n else {\r\n getResult();\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n measure.isPathEqual = isPathEqual;\r\n /**\r\n * Find out if two points are equal.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns true if points are the same, false if they are not\r\n */\r\n function isPointEqual(a, b, withinDistance) {\r\n if (!withinDistance) {\r\n return MakerJs.round(a[0] - b[0]) == 0 && MakerJs.round(a[1] - b[1]) == 0;\r\n }\r\n else {\r\n if (!a || !b)\r\n return false;\r\n var distance = measure.pointDistance(a, b);\r\n return distance <= withinDistance;\r\n }\r\n }\r\n measure.isPointEqual = isPointEqual;\r\n /**\r\n * Find out if a point is distinct among an array of points.\r\n *\r\n * @param pointToCheck point to check.\r\n * @param pointArray array of points.\r\n * @param withinDistance Optional distance to consider points equal.\r\n * @returns false if point is equal to any point in the array.\r\n */\r\n function isPointDistinct(pointToCheck, pointArray, withinDistance) {\r\n for (var i = 0; i < pointArray.length; i++) {\r\n if (isPointEqual(pointArray[i], pointToCheck, withinDistance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isPointDistinct = isPointDistinct;\r\n /**\r\n * Find out if point is on a slope.\r\n *\r\n * @param p Point to check.\r\n * @param b Slope.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the slope\r\n */\r\n function isPointOnSlope(p, slope, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n if (slope.hasSlope) {\r\n // y = mx * b\r\n return Math.abs(p[1] - (slope.slope * p[0] + slope.yIntercept)) <= withinDistance;\r\n }\r\n else {\r\n //vertical slope\r\n return Math.abs(p[0] - slope.line.origin[0]) <= withinDistance;\r\n }\r\n }\r\n measure.isPointOnSlope = isPointOnSlope;\r\n /**\r\n * Find out if point is on a circle.\r\n *\r\n * @param p Point to check.\r\n * @param circle Circle.\r\n * @param withinDistance Optional distance of tolerance.\r\n * @returns true if point is on the circle\r\n */\r\n function isPointOnCircle(p, circle, withinDistance) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var d = Math.abs(measure.pointDistance(p, circle.origin) - circle.radius);\r\n return d <= withinDistance;\r\n }\r\n measure.isPointOnCircle = isPointOnCircle;\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Circle] = function (p, circle, withinDistance) {\r\n return isPointOnCircle(p, circle, withinDistance);\r\n };\r\n onPathMap[MakerJs.pathType.Arc] = function (p, arc, withinDistance) {\r\n if (onPathMap[MakerJs.pathType.Circle](p, arc, withinDistance)) {\r\n var a = MakerJs.angle.ofPointInDegrees(arc.origin, p);\r\n return measure.isBetweenArcAngles(a, arc, false);\r\n }\r\n return false;\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (p, line, withinDistance, options) {\r\n var slope = (options && options.cachedLineSlope) || measure.lineSlope(line);\r\n if (options && !options.cachedLineSlope) {\r\n options.cachedLineSlope = slope;\r\n }\r\n return isPointOnSlope(p, slope, withinDistance) && measure.isBetweenPoints(p, line, false);\r\n };\r\n /**\r\n * Find out if a point lies on a path.\r\n * @param pointToCheck point to check.\r\n * @param onPath path to check against.\r\n * @param withinDistance Optional distance to consider point on the path.\r\n * @param pathOffset Optional offset of path from [0, 0].\r\n * @param options Optional IIsPointOnPathOptions to cache computation.\r\n */\r\n function isPointOnPath(pointToCheck, onPath, withinDistance, pathOffset, options) {\r\n if (withinDistance === void 0) { withinDistance = 0; }\r\n var fn = onPathMap[onPath.type];\r\n if (fn) {\r\n var offsetPath = pathOffset ? MakerJs.path.clone(onPath, pathOffset) : onPath;\r\n return fn(pointToCheck, offsetPath, withinDistance, options);\r\n }\r\n return false;\r\n }\r\n measure.isPointOnPath = isPointOnPath;\r\n /**\r\n * Check for slope equality.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for equality.\r\n * @returns Boolean true if slopes are equal.\r\n */\r\n function isSlopeEqual(slopeA, slopeB) {\r\n if (!isSlopeParallel(slopeA, slopeB))\r\n return false;\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n //lines are both vertical, see if x are the same\r\n return MakerJs.round(slopeA.line.origin[0] - slopeB.line.origin[0]) == 0;\r\n }\r\n //lines are parallel, but not vertical, see if y-intercept is the same\r\n return MakerJs.round(slopeA.yIntercept - slopeB.yIntercept, .00001) == 0;\r\n }\r\n measure.isSlopeEqual = isSlopeEqual;\r\n /**\r\n * Check for parallel slopes.\r\n *\r\n * @param slopeA The ISlope to test.\r\n * @param slopeB The ISlope to check for parallel.\r\n * @returns Boolean true if slopes are parallel.\r\n */\r\n function isSlopeParallel(slopeA, slopeB) {\r\n if (!slopeA.hasSlope && !slopeB.hasSlope) {\r\n return true;\r\n }\r\n if (slopeA.hasSlope && slopeB.hasSlope && (MakerJs.round(slopeA.slope - slopeB.slope, .00001) == 0)) {\r\n //lines are parallel\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isSlopeParallel = isSlopeParallel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var measure;\r\n (function (measure) {\r\n /**\r\n * Increase a measurement by an additional measurement.\r\n *\r\n * @param baseMeasure The measurement to increase.\r\n * @param addMeasure The additional measurement.\r\n * @param addOffset Optional offset point of the additional measurement.\r\n * @returns The increased original measurement (for cascading).\r\n */\r\n function increase(baseMeasure, addMeasure) {\r\n function getExtreme(basePoint, newPoint, fn) {\r\n if (!newPoint)\r\n return;\r\n for (var i = 2; i--;) {\r\n if (newPoint[i] == null)\r\n continue;\r\n if (basePoint[i] == null) {\r\n basePoint[i] = newPoint[i];\r\n }\r\n else {\r\n basePoint[i] = fn(basePoint[i], newPoint[i]);\r\n }\r\n }\r\n }\r\n if (addMeasure) {\r\n getExtreme(baseMeasure.low, addMeasure.low, Math.min);\r\n getExtreme(baseMeasure.high, addMeasure.high, Math.max);\r\n }\r\n return baseMeasure;\r\n }\r\n measure.increase = increase;\r\n /**\r\n * Check for arc being concave or convex towards a given point.\r\n *\r\n * @param arc The arc to test.\r\n * @param towardsPoint The point to test.\r\n * @returns Boolean true if arc is concave towards point.\r\n */\r\n function isArcConcaveTowardsPoint(arc, towardsPoint) {\r\n if (pointDistance(arc.origin, towardsPoint) <= arc.radius) {\r\n return true;\r\n }\r\n var midPointToNearPoint = new MakerJs.paths.Line(MakerJs.point.middle(arc), towardsPoint);\r\n var options = {};\r\n var intersectionPoint = MakerJs.path.intersection(midPointToNearPoint, new MakerJs.paths.Chord(arc), options);\r\n if (intersectionPoint || options.out_AreOverlapped) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n measure.isArcConcaveTowardsPoint = isArcConcaveTowardsPoint;\r\n /**\r\n * DEPRECATED - use isArcSpanOverlapping() instead.\r\n */\r\n function isArcOverlapping(arcA, arcB, excludeTangents) {\r\n return isArcSpanOverlapping(arcA, arcB, excludeTangents);\r\n }\r\n measure.isArcOverlapping = isArcOverlapping;\r\n /**\r\n * Check for arc overlapping another arc.\r\n *\r\n * @param arcA The arc to test.\r\n * @param arcB The arc to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if arcA is overlapped with arcB.\r\n */\r\n function isArcSpanOverlapping(arcA, arcB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkAngles(a, b) {\r\n function checkAngle(n) {\r\n return isBetweenArcAngles(n, a, excludeTangents);\r\n }\r\n return checkAngle(b.startAngle) || checkAngle(b.endAngle);\r\n }\r\n return checkAngles(arcA, arcB) || checkAngles(arcB, arcA) || (arcA.startAngle == arcB.startAngle && arcA.endAngle == arcB.endAngle);\r\n }\r\n measure.isArcSpanOverlapping = isArcSpanOverlapping;\r\n /**\r\n * Check if a given number is between two given limits.\r\n *\r\n * @param valueInQuestion The number to test.\r\n * @param limitA First limit.\r\n * @param limitB Second limit.\r\n * @param exclusive Flag to exclude equaling the limits.\r\n * @returns Boolean true if value is between (or equal to) the limits.\r\n */\r\n function isBetween(valueInQuestion, limitA, limitB, exclusive) {\r\n if (exclusive) {\r\n return Math.min(limitA, limitB) < valueInQuestion && valueInQuestion < Math.max(limitA, limitB);\r\n }\r\n else {\r\n return Math.min(limitA, limitB) <= valueInQuestion && valueInQuestion <= Math.max(limitA, limitB);\r\n }\r\n }\r\n measure.isBetween = isBetween;\r\n /**\r\n * Check if a given angle is between an arc's start and end angles.\r\n *\r\n * @param angleInQuestion The angle to test.\r\n * @param arc Arc to test against.\r\n * @param exclusive Flag to exclude equaling the start or end angles.\r\n * @returns Boolean true if angle is between (or equal to) the arc's start and end angles.\r\n */\r\n function isBetweenArcAngles(angleInQuestion, arc, exclusive) {\r\n var startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n var endAngle = startAngle + span;\r\n angleInQuestion = MakerJs.angle.noRevolutions(angleInQuestion);\r\n //computed angles will not be negative, but the arc may have specified a negative angle, so check against one revolution forward and backward\r\n return (isBetween(angleInQuestion, startAngle, endAngle, exclusive) || isBetween(angleInQuestion, startAngle + 360, endAngle + 360, exclusive) || isBetween(angleInQuestion, startAngle - 360, endAngle - 360, exclusive));\r\n }\r\n measure.isBetweenArcAngles = isBetweenArcAngles;\r\n /**\r\n * Check if a given point is between a line's end points.\r\n *\r\n * @param pointInQuestion The point to test.\r\n * @param line Line to test against.\r\n * @param exclusive Flag to exclude equaling the origin or end points.\r\n * @returns Boolean true if point is between (or equal to) the line's origin and end points.\r\n */\r\n function isBetweenPoints(pointInQuestion, line, exclusive) {\r\n var oneDimension = false;\r\n for (var i = 2; i--;) {\r\n if (MakerJs.round(line.origin[i] - line.end[i], .000001) == 0) {\r\n if (oneDimension)\r\n return false;\r\n oneDimension = true;\r\n continue;\r\n }\r\n var origin_value = MakerJs.round(line.origin[i]);\r\n var end_value = MakerJs.round(line.end[i]);\r\n if (!isBetween(MakerJs.round(pointInQuestion[i]), origin_value, end_value, exclusive))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isBetweenPoints = isBetweenPoints;\r\n /**\r\n * Check if a given bezier seed has all points on the same slope.\r\n *\r\n * @param seed The bezier seed to test.\r\n * @param exclusive Optional boolean to test only within the boundary of the endpoints.\r\n * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints.\r\n */\r\n function isBezierSeedLinear(seed, exclusive) {\r\n //create a slope from the endpoints\r\n var slope = lineSlope(seed);\r\n for (var i = 0; i < seed.controls.length; i++) {\r\n if (!(measure.isPointOnSlope(seed.controls[i], slope))) {\r\n if (!exclusive)\r\n return false;\r\n if (isBetweenPoints(seed.controls[i], seed, false))\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n measure.isBezierSeedLinear = isBezierSeedLinear;\r\n var graham_scan = require('graham_scan');\r\n /**\r\n * @private\r\n */\r\n function serializePoint(p) {\r\n return p.join(',');\r\n }\r\n /**\r\n * Check for flow of paths in a chain being clockwise or not.\r\n *\r\n * @param chainContext The chain to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if paths in the chain flow clockwise.\r\n */\r\n function isChainClockwise(chainContext, out_result) {\r\n //cannot do non-endless or circle\r\n if (!chainContext.endless || chainContext.links.length === 1) {\r\n return null;\r\n }\r\n var keyPoints = MakerJs.chain.toKeyPoints(chainContext);\r\n return isPointArrayClockwise(keyPoints, out_result);\r\n }\r\n measure.isChainClockwise = isChainClockwise;\r\n /**\r\n * Check for array of points being clockwise or not.\r\n *\r\n * @param points The array of points to test.\r\n * @param out_result Optional output object, if provided, will be populated with convex hull results.\r\n * @returns Boolean true if points flow clockwise.\r\n */\r\n function isPointArrayClockwise(points, out_result) {\r\n var convexHull = new graham_scan();\r\n var pointsInOrder = [];\r\n function add(endPoint) {\r\n convexHull.addPoint(endPoint[0], endPoint[1]);\r\n pointsInOrder.push(serializePoint(endPoint));\r\n }\r\n points.forEach(add);\r\n //we only need to deal with 3 points\r\n var hull = convexHull.getHull();\r\n var hullPoints = hull.slice(0, 3).map(function (p) { return serializePoint([p.x, p.y]); });\r\n var ordered = [];\r\n pointsInOrder.forEach(function (p) {\r\n if (~hullPoints.indexOf(p))\r\n ordered.push(p);\r\n });\r\n //now make sure endpoints of hull are endpoints of ordered. do this by managing the middle point\r\n switch (ordered.indexOf(hullPoints[1])) {\r\n case 0:\r\n //shift down\r\n ordered.unshift(ordered.pop());\r\n break;\r\n case 2:\r\n //shift up\r\n ordered.push(ordered.shift());\r\n break;\r\n }\r\n if (out_result) {\r\n out_result.hullPoints = hull.map(function (p) { return [p.x, p.y]; });\r\n out_result.keyPoints = points;\r\n }\r\n //the hull is counterclockwise, so the result is clockwise if the first elements do not match\r\n return hullPoints[0] != ordered[0];\r\n }\r\n measure.isPointArrayClockwise = isPointArrayClockwise;\r\n /**\r\n * Check for line overlapping another line.\r\n *\r\n * @param lineA The line to test.\r\n * @param lineB The line to check for overlap.\r\n * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps.\r\n * @returns Boolean true if lineA is overlapped with lineB.\r\n */\r\n function isLineOverlapping(lineA, lineB, excludeTangents) {\r\n var pointsOfIntersection = [];\r\n function checkPoints(index, a, b) {\r\n function checkPoint(p) {\r\n return isBetweenPoints(p, a, excludeTangents);\r\n }\r\n return checkPoint(b.origin) || checkPoint(b.end);\r\n }\r\n return checkPoints(0, lineA, lineB) || checkPoints(1, lineB, lineA);\r\n }\r\n measure.isLineOverlapping = isLineOverlapping;\r\n /**\r\n * Check for measurement overlapping another measurement.\r\n *\r\n * @param measureA The measurement to test.\r\n * @param measureB The measurement to check for overlap.\r\n * @returns Boolean true if measureA is overlapped with measureB.\r\n */\r\n function isMeasurementOverlapping(measureA, measureB) {\r\n for (var i = 2; i--;) {\r\n if (!(MakerJs.round(measureA.low[i] - measureB.high[i]) <= 0 && MakerJs.round(measureA.high[i] - measureB.low[i]) >= 0))\r\n return false;\r\n }\r\n return true;\r\n }\r\n measure.isMeasurementOverlapping = isMeasurementOverlapping;\r\n /**\r\n * Gets the slope of a line.\r\n */\r\n function lineSlope(line) {\r\n var dx = line.end[0] - line.origin[0];\r\n if (MakerJs.round(dx, .000001) == 0) {\r\n return {\r\n line: line,\r\n hasSlope: false\r\n };\r\n }\r\n var dy = line.end[1] - line.origin[1];\r\n var slope = dy / dx;\r\n var yIntercept = line.origin[1] - slope * line.origin[0];\r\n return {\r\n line: line,\r\n hasSlope: true,\r\n slope: slope,\r\n yIntercept: yIntercept\r\n };\r\n }\r\n measure.lineSlope = lineSlope;\r\n /**\r\n * Calculates the distance between two points.\r\n *\r\n * @param a First point.\r\n * @param b Second point.\r\n * @returns Distance between points.\r\n */\r\n function pointDistance(a, b) {\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return Math.sqrt(dx * dx + dy * dy);\r\n }\r\n measure.pointDistance = pointDistance;\r\n /**\r\n * @private\r\n */\r\n function getExtremePoint(a, b, fn) {\r\n return [\r\n fn(a[0], b[0]),\r\n fn(a[1], b[1])\r\n ];\r\n }\r\n /**\r\n * @private\r\n */\r\n var pathExtentsMap = {};\r\n pathExtentsMap[MakerJs.pathType.Line] = function (line) {\r\n return {\r\n low: getExtremePoint(line.origin, line.end, Math.min),\r\n high: getExtremePoint(line.origin, line.end, Math.max)\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Circle] = function (circle) {\r\n var r = circle.radius;\r\n return {\r\n low: MakerJs.point.add(circle.origin, [-r, -r]),\r\n high: MakerJs.point.add(circle.origin, [r, r])\r\n };\r\n };\r\n pathExtentsMap[MakerJs.pathType.Arc] = function (arc) {\r\n var r = arc.radius;\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n function extremeAngle(xyAngle, value, fn) {\r\n var extremePoint = getExtremePoint(arcPoints[0], arcPoints[1], fn);\r\n for (var i = 2; i--;) {\r\n if (isBetweenArcAngles(xyAngle[i], arc, false)) {\r\n extremePoint[i] = value + arc.origin[i];\r\n }\r\n }\r\n return extremePoint;\r\n }\r\n return {\r\n low: extremeAngle([180, 270], -r, Math.min),\r\n high: extremeAngle([360, 90], r, Math.max)\r\n };\r\n };\r\n /**\r\n * Calculates the smallest rectangle which contains a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns object with low and high points.\r\n */\r\n function pathExtents(pathToMeasure, addOffset) {\r\n if (pathToMeasure) {\r\n var fn = pathExtentsMap[pathToMeasure.type];\r\n if (fn) {\r\n var m = fn(pathToMeasure);\r\n if (addOffset) {\r\n m.high = MakerJs.point.add(m.high, addOffset);\r\n m.low = MakerJs.point.add(m.low, addOffset);\r\n }\r\n return m;\r\n }\r\n }\r\n return { low: null, high: null };\r\n }\r\n measure.pathExtents = pathExtents;\r\n /**\r\n * @private\r\n */\r\n var pathLengthMap = {};\r\n pathLengthMap[MakerJs.pathType.Line] = function (line) {\r\n return pointDistance(line.origin, line.end);\r\n };\r\n pathLengthMap[MakerJs.pathType.Circle] = function (circle) {\r\n return 2 * Math.PI * circle.radius;\r\n };\r\n pathLengthMap[MakerJs.pathType.Arc] = function (arc) {\r\n var value = pathLengthMap[MakerJs.pathType.Circle](arc);\r\n var pct = MakerJs.angle.ofArcSpan(arc) / 360;\r\n value *= pct;\r\n return value;\r\n };\r\n pathLengthMap[MakerJs.pathType.BezierSeed] = function (seed) {\r\n return MakerJs.models.BezierCurve.computeLength(seed);\r\n };\r\n /**\r\n * Measures the length of a path.\r\n *\r\n * @param pathToMeasure The path to measure.\r\n * @returns Length of the path.\r\n */\r\n function pathLength(pathToMeasure) {\r\n if (pathToMeasure) {\r\n var fn = pathLengthMap[pathToMeasure.type];\r\n if (fn) {\r\n return fn(pathToMeasure);\r\n }\r\n }\r\n return 0;\r\n }\r\n measure.pathLength = pathLength;\r\n /**\r\n * Measures the length of all paths in a model.\r\n *\r\n * @param modelToMeasure The model containing paths to measure.\r\n * @returns Length of all paths in the model.\r\n */\r\n function modelPathLength(modelToMeasure) {\r\n var total = 0;\r\n MakerJs.model.walk(modelToMeasure, {\r\n onPath: function (walkedPath) {\r\n total += pathLength(walkedPath.pathContext);\r\n }\r\n });\r\n return total;\r\n }\r\n measure.modelPathLength = modelPathLength;\r\n /**\r\n * @private\r\n */\r\n function cloneMeasure(measureToclone) {\r\n return {\r\n high: MakerJs.point.clone(measureToclone.high),\r\n low: MakerJs.point.clone(measureToclone.low)\r\n };\r\n }\r\n /**\r\n * Measures the smallest rectangle which contains a model.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n function modelExtents(modelToMeasure, atlas) {\r\n function increaseParentModel(childRoute, childMeasurement) {\r\n if (!childMeasurement)\r\n return;\r\n //to get the parent route, just traverse backwards 2 to remove id and 'paths' / 'models'\r\n var parentRoute = childRoute.slice(0, -2);\r\n var parentRouteKey = MakerJs.createRouteKey(parentRoute);\r\n if (!(parentRouteKey in atlas.modelMap)) {\r\n //just start with the known size\r\n atlas.modelMap[parentRouteKey] = cloneMeasure(childMeasurement);\r\n }\r\n else {\r\n increase(atlas.modelMap[parentRouteKey], childMeasurement);\r\n }\r\n }\r\n if (!atlas)\r\n atlas = new Atlas(modelToMeasure);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n //trust that the path measurement is good\r\n if (!(walkedPath.routeKey in atlas.pathMap)) {\r\n atlas.pathMap[walkedPath.routeKey] = pathExtents(walkedPath.pathContext, walkedPath.offset);\r\n }\r\n increaseParentModel(walkedPath.route, atlas.pathMap[walkedPath.routeKey]);\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n //model has been updated by all its children, update parent\r\n increaseParentModel(walkedModel.route, atlas.modelMap[walkedModel.routeKey]);\r\n }\r\n };\r\n MakerJs.model.walk(modelToMeasure, walkOptions);\r\n atlas.modelsMeasured = true;\r\n var m = atlas.modelMap[''];\r\n if (m) {\r\n return augment(m);\r\n }\r\n return m;\r\n }\r\n measure.modelExtents = modelExtents;\r\n /**\r\n * Augment a measurement - add more properties such as center point, height and width.\r\n *\r\n * @param measureToAugment The measurement to augment.\r\n * @returns Measurement object with augmented properties.\r\n */\r\n function augment(measureToAugment) {\r\n var m = measureToAugment;\r\n m.center = MakerJs.point.average(m.high, m.low);\r\n m.width = m.high[0] - m.low[0];\r\n m.height = m.high[1] - m.low[1];\r\n return m;\r\n }\r\n measure.augment = augment;\r\n /**\r\n * A list of maps of measurements.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @param atlas Optional atlas to save measurements.\r\n * @returns object with low and high points.\r\n */\r\n var Atlas = /** @class */ (function () {\r\n /**\r\n * Constructor.\r\n * @param modelContext The model to measure.\r\n */\r\n function Atlas(modelContext) {\r\n this.modelContext = modelContext;\r\n /**\r\n * Flag that models have been measured.\r\n */\r\n this.modelsMeasured = false;\r\n /**\r\n * Map of model measurements, mapped by routeKey.\r\n */\r\n this.modelMap = {};\r\n /**\r\n * Map of path measurements, mapped by routeKey.\r\n */\r\n this.pathMap = {};\r\n }\r\n Atlas.prototype.measureModels = function () {\r\n if (!this.modelsMeasured) {\r\n modelExtents(this.modelContext, this);\r\n }\r\n };\r\n return Atlas;\r\n }());\r\n measure.Atlas = Atlas;\r\n /**\r\n * @private\r\n */\r\n function loopIndex(base, i) {\r\n if (i >= base)\r\n return i - base;\r\n if (i < 0)\r\n return i + base;\r\n return i;\r\n }\r\n /**\r\n * @private\r\n */\r\n function yAtX(slope, x) {\r\n return slope.slope * x + slope.yIntercept;\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointOnSlopeAtX(line, x) {\r\n var slope = lineSlope(line);\r\n return [x, yAtX(slope, x)];\r\n }\r\n /**\r\n * @private\r\n */\r\n function isCircular(bounds) {\r\n for (var i = 1; i < 3; i++) {\r\n if (!measure.isPointEqual(bounds[0].center, bounds[i].center, .000001) || !(MakerJs.round(bounds[0].width - bounds[i].width) === 0)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAngledBounds(index, modelToMeasure, rotateModel, rotatePaths) {\r\n MakerJs.model.rotate(modelToMeasure, rotateModel);\r\n var m = modelExtents(modelToMeasure);\r\n var result = {\r\n index: index,\r\n rotation: rotatePaths,\r\n center: MakerJs.point.rotate(m.center, rotatePaths),\r\n //model is sideways, so width is based on Y, height is based on X\r\n width: m.height,\r\n height: m.width,\r\n bottom: new MakerJs.paths.Line(m.low, [m.high[0], m.low[1]]),\r\n middle: new MakerJs.paths.Line([m.low[0], m.center[1]], [m.high[0], m.center[1]]),\r\n top: new MakerJs.paths.Line(m.high, [m.low[0], m.high[1]])\r\n };\r\n [result.top, result.middle, result.bottom].forEach(function (line) { return MakerJs.path.rotate(line, rotatePaths); });\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function hexSolution(lines, bounds) {\r\n var tip = lines[1].origin;\r\n var tipX = tip[0];\r\n var left = lines[3].origin[0];\r\n var right = lines[0].origin[0];\r\n //see if left edge is in bounds if right edge is on the hex boundary\r\n var altRight = tipX - right;\r\n if ((right - left) > 2 * altRight)\r\n return null;\r\n //see if right edge is in bounds if left edge is on the hex boundary\r\n var altLeft = (tipX - left) / 3;\r\n if (altRight < altLeft)\r\n return null;\r\n var altitudeViaSide = Math.min(altLeft, altRight);\r\n var radiusViaSide = MakerJs.solvers.equilateralSide(altitudeViaSide);\r\n //find peaks, then find highest peak\r\n var peakPoints = [MakerJs.point.fromSlopeIntersection(lines[1], lines[2]), MakerJs.point.fromSlopeIntersection(lines[4], lines[5])];\r\n var peakRadii = peakPoints.map(function (p) { return Math.abs(p[1] - tip[1]); });\r\n var peakNum = (peakRadii[0] > peakRadii[1]) ? 0 : 1; //top = 0, bottom = 1\r\n var radiusViaPeak = peakRadii[peakNum];\r\n if (radiusViaPeak > radiusViaSide) {\r\n var altitudeViaPeak = MakerJs.solvers.equilateralAltitude(radiusViaPeak);\r\n var peakX = tipX - 2 * altitudeViaPeak;\r\n //see if it will contain right side\r\n if (right > peakX + altitudeViaPeak)\r\n return null;\r\n //see if it will contain left side\r\n if (left < peakX - altitudeViaPeak)\r\n return null;\r\n //at this point, [tipX - 2 * altitudeViaPeak, tip[1]] is a solution for origin.\r\n //but we want to best center the result by sliding along the boundary middle, balancing the smallest gap\r\n var leftGap = left - peakX + altitudeViaPeak;\r\n var peakGap = 2 * altitudeViaPeak - bounds[peakNum + 1].width;\r\n var minHalfGap = Math.min(leftGap, peakGap) / 2;\r\n return {\r\n origin: pointOnSlopeAtX(bounds[2 - peakNum].middle, peakX + minHalfGap),\r\n radius: radiusViaPeak,\r\n type: 'peak ' + peakNum\r\n };\r\n }\r\n else {\r\n return {\r\n origin: [tipX - 2 * altitudeViaSide, tip[1]],\r\n radius: radiusViaSide,\r\n type: 'side'\r\n };\r\n }\r\n }\r\n /**\r\n * Measures the minimum bounding hexagon surrounding a model. The hexagon is oriented such that the right and left sides are vertical, and the top and bottom are pointed.\r\n *\r\n * @param modelToMeasure The model to measure.\r\n * @returns IBoundingHex object which is a hexagon model, with an additional radius property.\r\n */\r\n function boundingHexagon(modelToMeasure) {\r\n var clone = MakerJs.cloneObject(modelToMeasure);\r\n MakerJs.model.originate(clone);\r\n var originalMeasure = modelExtents(clone);\r\n var bounds = [];\r\n var scratch = { paths: {} };\r\n MakerJs.model.center(clone);\r\n function result(radius, origin, notes) {\r\n return {\r\n radius: radius,\r\n paths: new MakerJs.models.Polygon(6, radius, 30).paths,\r\n origin: MakerJs.point.add(origin, originalMeasure.center),\r\n //models: { scratch: scratch },\r\n notes: notes\r\n };\r\n }\r\n var boundRotations = [[90, -90], [-60, -30], [-60, 30]];\r\n while (boundRotations.length) {\r\n var rotation = boundRotations.shift();\r\n var bound = getAngledBounds(bounds.length, clone, rotation[0], rotation[1]);\r\n var side = MakerJs.solvers.equilateralSide(bound.width / 2);\r\n if (side >= bound.height) {\r\n return result(side, bound.center, 'solved by bound ' + bounds.length);\r\n }\r\n bounds.push(bound);\r\n }\r\n //model.rotate(clone, 30);\r\n //scratch.models = { clone: clone };\r\n //check for a circular solution\r\n if (isCircular(bounds)) {\r\n return result(MakerJs.solvers.equilateralSide(bounds[0].width / 2), bounds[0].center, 'solved as circular');\r\n }\r\n var perimeters = bounds.map(function (b) { return b.top; }).concat(bounds.map(function (b) { return b.bottom; }));\r\n perimeters.forEach(function (p, i) {\r\n scratch.paths[i] = p;\r\n //converge alternate lines to form two triangles\r\n MakerJs.path.converge(perimeters[loopIndex(6, i + 2)], p, true);\r\n });\r\n bounds.forEach(function (b, i) {\r\n scratch.paths['m' + i] = b.middle;\r\n });\r\n var boundCopy = bounds.slice();\r\n var solution;\r\n //solve a hexagon for every tip, keeping the smallest one\r\n for (var i = 0; i < 6; i++) {\r\n //rotate the scratch area so that we always reference the tip at polar 0\r\n if (i > 0) {\r\n perimeters.push(perimeters.shift());\r\n boundCopy.push(boundCopy.shift());\r\n MakerJs.model.rotate(scratch, -60);\r\n }\r\n var s = hexSolution(perimeters, boundCopy);\r\n if (s) {\r\n if (!solution || s.radius < solution.radius) {\r\n solution = s;\r\n solution.index = i;\r\n }\r\n }\r\n }\r\n var p = MakerJs.point.rotate(solution.origin, solution.index * 60);\r\n return result(solution.radius, p, 'solved by ' + solution.index + ' as ' + solution.type);\r\n }\r\n measure.boundingHexagon = boundingHexagon;\r\n /**\r\n * @private\r\n */\r\n function addUniquePoints(pointArray, pointsToAdd) {\r\n var added = 0;\r\n pointsToAdd.forEach(function (p) {\r\n if (!measure.isPointDistinct(p, pointArray, .00000001))\r\n return;\r\n pointArray.push(p);\r\n added++;\r\n });\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getFarPoint(modelContext, farPoint, measureAtlas) {\r\n if (farPoint)\r\n return farPoint;\r\n var high = modelExtents(modelContext).high;\r\n if (high) {\r\n return MakerJs.point.add(high, [1, 1]);\r\n }\r\n return [7654321, 1234567];\r\n }\r\n /**\r\n * Check to see if a point is inside of a model.\r\n *\r\n * @param pointToCheck The point to check.\r\n * @param modelContext The model to check against.\r\n * @param options Optional IMeasurePointInsideOptions object.\r\n * @returns Boolean true if the path is inside of the modelContext.\r\n */\r\n function isPointInsideModel(pointToCheck, modelContext, options) {\r\n if (options === void 0) { options = {}; }\r\n if (!options.farPoint) {\r\n options.farPoint = getFarPoint(modelContext, options.farPoint, options.measureAtlas);\r\n }\r\n options.out_intersectionPoints = [];\r\n var isInside;\r\n var lineToFarPoint = new MakerJs.paths.Line(pointToCheck, options.farPoint);\r\n var measureFarPoint = pathExtents(lineToFarPoint);\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n if (options.measureAtlas && !isMeasurementOverlapping(measureFarPoint, options.measureAtlas.pathMap[walkedPath.routeKey])) {\r\n return;\r\n }\r\n var intersectOptions = { path2Offset: walkedPath.offset };\r\n var farInt = MakerJs.path.intersection(lineToFarPoint, walkedPath.pathContext, intersectOptions);\r\n if (farInt) {\r\n var added = addUniquePoints(options.out_intersectionPoints, farInt.intersectionPoints);\r\n //if number of intersections is an odd number, flip the flag.\r\n if (added % 2 == 1) {\r\n isInside = !!!isInside;\r\n }\r\n }\r\n },\r\n beforeChildWalk: function (innerWalkedModel) {\r\n if (!options.measureAtlas) {\r\n return true;\r\n }\r\n //see if there is a model measurement. if not, it is because the model does not contain paths.\r\n var innerModelMeasurement = options.measureAtlas.modelMap[innerWalkedModel.routeKey];\r\n return innerModelMeasurement && isMeasurementOverlapping(measureFarPoint, innerModelMeasurement);\r\n }\r\n };\r\n MakerJs.model.walk(modelContext, walkOptions);\r\n return !!isInside;\r\n }\r\n measure.isPointInsideModel = isPointInsideModel;\r\n })(measure = MakerJs.measure || (MakerJs.measure = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in JSON.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.accuracy Optional exemplar of number of decimal places.\r\n * @param options.indentation Optional number of characters to indent after a newline.\r\n * @returns String of DXF content.\r\n */\r\n function toJson(itemToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function replacer(key, value) {\r\n if (MakerJs.isNumber(value)) {\r\n var newValue = MakerJs.round(value, options.accuracy);\r\n return newValue;\r\n }\r\n if (MakerJs.isPoint(value)) {\r\n var newPoint = MakerJs.point.rounded(value, options.accuracy);\r\n return newPoint;\r\n }\r\n return value;\r\n }\r\n return JSON.stringify(itemToExport, options.accuracy && replacer, options.indentation);\r\n }\r\n exporter.toJson = toJson;\r\n /**\r\n * Try to get the unit system from a model\r\n * @private\r\n */\r\n function tryGetModelUnits(itemToExport) {\r\n if (MakerJs.isModel(itemToExport)) {\r\n return itemToExport.units;\r\n }\r\n }\r\n exporter.tryGetModelUnits = tryGetModelUnits;\r\n /**\r\n * Named colors, safe for CSS and DXF\r\n * 17 colors from https://www.w3.org/TR/CSS21/syndata.html#value-def-color mapped to DXF equivalent AutoDesk Color Index\r\n */\r\n exporter.colors = {\r\n black: 0,\r\n red: 1,\r\n yellow: 2,\r\n lime: 3,\r\n aqua: 4,\r\n blue: 5,\r\n fuchsia: 6,\r\n white: 7,\r\n gray: 9,\r\n maroon: 14,\r\n orange: 30,\r\n olive: 58,\r\n green: 94,\r\n teal: 134,\r\n navy: 174,\r\n purple: 214,\r\n silver: 254\r\n };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric.\r\n *\r\n * Example:\r\n * ```\r\n * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5');\r\n * ```\r\n *\r\n * @param s The string of numbers.\r\n * @returns Array of numbers.\r\n */\r\n function parseNumericList(s) {\r\n var result = [];\r\n //http://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly\r\n var re = /[\\.-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\r\n var matches;\r\n while ((matches = re.exec(s)) !== null) {\r\n if (matches.index === re.lastIndex) {\r\n re.lastIndex++;\r\n }\r\n result.push(parseFloat(matches[0]));\r\n }\r\n return result;\r\n }\r\n importer.parseNumericList = parseNumericList;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Renders an item in AutoDesk DFX file format.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @returns String of DXF content.\r\n */\r\n function toDXF(itemToExport, options) {\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n if (options === void 0) { options = {}; }\r\n var opts = {};\r\n var layerIds = [];\r\n var dxf = { \"top\": [], \"bottom\": [] };\r\n var dxfIndex = \"top\";\r\n function append(value) {\r\n dxf[dxfIndex].push(value);\r\n }\r\n MakerJs.extendObject(opts, options);\r\n if (MakerJs.isModel(itemToExport)) {\r\n var modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toDXF']);\r\n }\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n color: exporter.colors[layer]\r\n };\r\n }\r\n }\r\n function defaultLayer(pathContext, parentLayer) {\r\n var layerId = (pathContext && pathContext.layer) || parentLayer || '0';\r\n if (layerIds.indexOf(layerId) < 0) {\r\n layerIds.push(layerId);\r\n }\r\n return layerId;\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (line, offset, layer) {\r\n append(\"0\");\r\n append(\"LINE\");\r\n append(\"8\");\r\n append(defaultLayer(line, layer));\r\n append(\"10\");\r\n append(MakerJs.round(line.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(line.origin[1] + offset[1], opts.accuracy));\r\n append(\"11\");\r\n append(MakerJs.round(line.end[0] + offset[0], opts.accuracy));\r\n append(\"21\");\r\n append(MakerJs.round(line.end[1] + offset[1], opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Circle] = function (circle, offset, layer) {\r\n append(\"0\");\r\n append(\"CIRCLE\");\r\n append(\"8\");\r\n append(defaultLayer(circle, layer));\r\n append(\"10\");\r\n append(MakerJs.round(circle.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(circle.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(circle.radius, opts.accuracy));\r\n };\r\n map[MakerJs.pathType.Arc] = function (arc, offset, layer) {\r\n append(\"0\");\r\n append(\"ARC\");\r\n append(\"8\");\r\n append(defaultLayer(arc, layer));\r\n append(\"10\");\r\n append(MakerJs.round(arc.origin[0] + offset[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(arc.origin[1] + offset[1], opts.accuracy));\r\n append(\"40\");\r\n append(MakerJs.round(arc.radius, opts.accuracy));\r\n append(\"50\");\r\n append(MakerJs.round(arc.startAngle, opts.accuracy));\r\n append(\"51\");\r\n append(MakerJs.round(arc.endAngle, opts.accuracy));\r\n };\r\n //TODO - handle scenario if any bezier seeds get passed\r\n //map[pathType.BezierSeed]\r\n function appendVertex(v, layer, bulge) {\r\n append(\"0\");\r\n append(\"VERTEX\");\r\n append(\"8\");\r\n append(defaultLayer(null, layer));\r\n append(\"10\");\r\n append(MakerJs.round(v[0], opts.accuracy));\r\n append(\"20\");\r\n append(MakerJs.round(v[1], opts.accuracy));\r\n append(\"30\");\r\n append(0);\r\n if (bulge !== undefined) {\r\n append(\"42\");\r\n append(bulge);\r\n }\r\n }\r\n function polyline(c) {\r\n append(\"0\");\r\n append(\"POLYLINE\");\r\n append(\"8\");\r\n append(defaultLayer(null, c.layer));\r\n append(\"10\");\r\n append(0);\r\n append(\"20\");\r\n append(0);\r\n append(\"30\");\r\n append(0);\r\n append(\"70\");\r\n append(c.chain.endless ? 1 : 0);\r\n c.chain.links.forEach(function (link, i) {\r\n var bulge;\r\n if (link.walkedPath.pathContext.type === MakerJs.pathType.Arc) {\r\n var arc = link.walkedPath.pathContext;\r\n bulge = MakerJs.round(Math.tan(MakerJs.angle.toRadians(MakerJs.angle.ofArcSpan(arc)) / 4), opts.accuracy);\r\n if (link.reversed) {\r\n bulge *= -1;\r\n }\r\n }\r\n var vertex = link.endPoints[link.reversed ? 1 : 0];\r\n appendVertex(vertex, c.layer, bulge);\r\n });\r\n if (!c.chain.endless) {\r\n var lastLink = c.chain.links[c.chain.links.length - 1];\r\n var endPoint = lastLink.endPoints[lastLink.reversed ? 0 : 1];\r\n appendVertex(endPoint, c.layer);\r\n }\r\n append(\"0\");\r\n append(\"SEQEND\");\r\n }\r\n function section(sectionFn) {\r\n append(\"0\");\r\n append(\"SECTION\");\r\n sectionFn();\r\n append(\"0\");\r\n append(\"ENDSEC\");\r\n }\r\n function tables(tableFn) {\r\n append(\"2\");\r\n append(\"TABLES\");\r\n append(\"0\");\r\n append(\"TABLE\");\r\n tableFn();\r\n append(\"0\");\r\n append(\"ENDTAB\");\r\n }\r\n function layerOut(layerId, layerColor) {\r\n append(\"0\");\r\n append(\"LAYER\");\r\n append(\"2\");\r\n append(layerId);\r\n append(\"70\");\r\n append(\"0\");\r\n append(\"62\");\r\n append(layerColor);\r\n append(\"6\");\r\n append(\"CONTINUOUS\");\r\n }\r\n function layersOut() {\r\n append(\"2\");\r\n append(\"LAYER\");\r\n layerIds.forEach(function (layerId) {\r\n var layerOptions = colorLayerOptions(layerId);\r\n if (layerOptions) {\r\n layerOut(layerId, layerOptions.color);\r\n }\r\n });\r\n }\r\n function header() {\r\n append(\"2\");\r\n append(\"HEADER\");\r\n if (opts.units) {\r\n var units = dxfUnit[opts.units];\r\n append(\"9\");\r\n append(\"$INSUNITS\");\r\n append(\"70\");\r\n append(units);\r\n }\r\n }\r\n function entities(walkedPaths, chains) {\r\n append(\"2\");\r\n append(\"ENTITIES\");\r\n chains.forEach(function (c) { return polyline(c); });\r\n walkedPaths.forEach(function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n fn(walkedPath.pathContext, walkedPath.offset, walkedPath.layer);\r\n }\r\n });\r\n }\r\n //fixup options\r\n if (!opts.units) {\r\n var units = exporter.tryGetModelUnits(itemToExport);\r\n if (units) {\r\n opts.units = units;\r\n }\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin dxf output\r\n dxfIndex = \"bottom\";\r\n section(function () {\r\n var chainsOnLayers = [];\r\n var walkedPaths = [];\r\n if (opts.usePOLYLINE) {\r\n var cb = function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n if (c.endless && c.links.length === 1 && c.links[0].walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n //don't treat circles as lwpolylines\r\n walkedPaths.push(c.links[0].walkedPath);\r\n return;\r\n }\r\n var chainOnLayer = { chain: c, layer: layer };\r\n chainsOnLayers.push(chainOnLayer);\r\n });\r\n walkedPaths.push.apply(walkedPaths, loose);\r\n };\r\n MakerJs.model.findChains(modelToExport, cb, { byLayers: true, pointMatchingDistance: opts.pointMatchingDistance });\r\n }\r\n else {\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n walkedPaths.push(walkedPath);\r\n }\r\n };\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n }\r\n entities(walkedPaths, chainsOnLayers);\r\n });\r\n dxfIndex = \"top\";\r\n section(header);\r\n section(function () { return tables(layersOut); });\r\n dxfIndex = \"bottom\";\r\n append(\"0\");\r\n append(\"EOF\");\r\n return dxf[\"top\"].concat(dxf[\"bottom\"]).join('\\n');\r\n }\r\n exporter.toDXF = toDXF;\r\n /**\r\n * @private\r\n */\r\n var dxfUnit = {};\r\n //DXF format documentation:\r\n //http://images.autodesk.com/adsk/files/acad_dxf0.pdf\r\n //Default drawing units for AutoCAD DesignCenter blocks:\r\n //0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;\r\n dxfUnit[''] = 0;\r\n dxfUnit[MakerJs.unitType.Inch] = 1;\r\n dxfUnit[MakerJs.unitType.Foot] = 2;\r\n dxfUnit[MakerJs.unitType.Millimeter] = 4;\r\n dxfUnit[MakerJs.unitType.Centimeter] = 5;\r\n dxfUnit[MakerJs.unitType.Meter] = 6;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var solvers;\r\n (function (solvers) {\r\n /**\r\n * @private\r\n */\r\n var equilateral = Math.sqrt(3) / 2;\r\n /**\r\n * Solves for the altitude of an equilateral triangle when you know its side length.\r\n *\r\n * @param sideLength Length of a side of the equilateral triangle (all 3 sides are equal).\r\n * @returns Altitude of the equilateral triangle.\r\n */\r\n function equilateralAltitude(sideLength) {\r\n return sideLength * equilateral;\r\n }\r\n solvers.equilateralAltitude = equilateralAltitude;\r\n /**\r\n * Solves for the side length of an equilateral triangle when you know its altitude.\r\n *\r\n * @param altitude Altitude of the equilateral triangle.\r\n * @returns Length of the side of the equilateral triangle (all 3 sides are equal).\r\n */\r\n function equilateralSide(altitude) {\r\n return altitude / equilateral;\r\n }\r\n solvers.equilateralSide = equilateralSide;\r\n /**\r\n * Solves for the angle of a triangle when you know lengths of 3 sides.\r\n *\r\n * @param lengthA Length of side of triangle, opposite of the angle you are trying to find.\r\n * @param lengthB Length of any other side of the triangle.\r\n * @param lengthC Length of the remaining side of the triangle.\r\n * @returns Angle opposite of the side represented by the first parameter.\r\n */\r\n function solveTriangleSSS(lengthA, lengthB, lengthC) {\r\n return MakerJs.angle.toDegrees(Math.acos((lengthB * lengthB + lengthC * lengthC - lengthA * lengthA) / (2 * lengthB * lengthC)));\r\n }\r\n solvers.solveTriangleSSS = solveTriangleSSS;\r\n /**\r\n * Solves for the length of a side of a triangle when you know length of one side and 2 angles.\r\n *\r\n * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find.\r\n * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles.\r\n * @param otherAngleInDegrees An other angle of the triangle.\r\n * @returns Length of the side of the triangle which is opposite of the first angle parameter.\r\n */\r\n function solveTriangleASA(oppositeAngleInDegrees, lengthOfSideBetweenAngles, otherAngleInDegrees) {\r\n var angleOppositeSide = 180 - oppositeAngleInDegrees - otherAngleInDegrees;\r\n return (lengthOfSideBetweenAngles * Math.sin(MakerJs.angle.toRadians(oppositeAngleInDegrees))) / Math.sin(MakerJs.angle.toRadians(angleOppositeSide));\r\n }\r\n solvers.solveTriangleASA = solveTriangleASA;\r\n /**\r\n * Solves for the angles of the tangent lines between 2 circles.\r\n *\r\n * @param a First circle.\r\n * @param b Second circle.\r\n * @param inner Boolean to use inner tangents instead of outer tangents.\r\n * @returns Array of angles in degrees where 2 lines between the circles will be tangent to both circles.\r\n */\r\n function circleTangentAngles(a, b, inner) {\r\n if (inner === void 0) { inner = false; }\r\n var connect = new MakerJs.paths.Line(a.origin, b.origin);\r\n var distance = MakerJs.measure.pointDistance(a.origin, b.origin);\r\n //no tangents if either circle encompasses the other\r\n if (a.radius >= distance + b.radius || b.radius >= distance + a.radius)\r\n return null;\r\n //no inner tangents when circles touch or overlap\r\n if (inner && (a.radius + b.radius >= distance))\r\n return null;\r\n var tangentAngles;\r\n if (!inner && MakerJs.round(a.radius - b.radius) == 0) {\r\n tangentAngles = [90, 270];\r\n }\r\n else {\r\n //solve for circles on the x axis at the distance\r\n var d2 = distance / 2;\r\n var between = new MakerJs.paths.Circle([d2, 0], d2);\r\n var diff = new MakerJs.paths.Circle(a.radius > b.radius ? [0, 0] : [distance, 0], inner ? (a.radius + b.radius) : Math.abs(a.radius - b.radius));\r\n var int = MakerJs.path.intersection(diff, between);\r\n if (!int || !int.path1Angles)\r\n return null;\r\n tangentAngles = int.path1Angles;\r\n }\r\n var connectAngle = MakerJs.angle.ofLineInDegrees(connect);\r\n //add the line's angle to the result\r\n return tangentAngles.map(function (a) { return MakerJs.angle.noRevolutions(a + connectAngle); });\r\n }\r\n solvers.circleTangentAngles = circleTangentAngles;\r\n })(solvers = MakerJs.solvers || (MakerJs.solvers = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var map = {};\r\n map[MakerJs.pathType.Arc] = {};\r\n map[MakerJs.pathType.Circle] = {};\r\n map[MakerJs.pathType.Line] = {};\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Arc] = function (arc1, arc2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc1, arc2], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc1, arc2, options);\r\n if (angles) {\r\n var arc1Angles = getAnglesWithinArc(angles[0], arc1, options);\r\n var arc2Angles = getAnglesWithinArc(angles[1], arc2, options);\r\n if (arc1Angles && arc2Angles) {\r\n //must correspond to the same angle indexes\r\n if (arc1Angles.length === 1 || arc2Angles.length === 1) {\r\n for (var i1 = 0; i1 < arc1Angles.length; i1++) {\r\n for (var i2 = 0; i2 < arc2Angles.length; i2++) {\r\n var p1 = MakerJs.point.fromAngleOnCircle(arc1Angles[i1], arc1);\r\n var p2 = MakerJs.point.fromAngleOnCircle(arc2Angles[i2], arc2);\r\n //if they do not correspond then they don't intersect\r\n if (MakerJs.measure.isPointEqual(p1, p2, .0001)) {\r\n result = {\r\n intersectionPoints: [p1],\r\n path1Angles: [arc1Angles[i1]],\r\n path2Angles: [arc2Angles[i2]]\r\n };\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arc1Angles, arc1),\r\n path1Angles: arc1Angles,\r\n path2Angles: arc2Angles\r\n };\r\n }\r\n }\r\n }\r\n else {\r\n if (options.out_AreOverlapped) {\r\n //overlapped for circle, reset and see if arcs actually overlap.\r\n options.out_AreOverlapped = MakerJs.measure.isArcOverlapping(arc1, arc2, options.excludeTangents);\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Circle] = function (arc, circle, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, circle], options, swapOffsets, function () {\r\n var angles = circleToCircle(arc, circle, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles[0], arc, options);\r\n if (arcAngles) {\r\n var circleAngles;\r\n //if both points are on arc, use both on circle\r\n if (arcAngles.length == 2) {\r\n circleAngles = angles[1];\r\n }\r\n else {\r\n //use the corresponding point on circle \r\n var index = findCorrespondingAngleIndex(angles[0], arcAngles[0]);\r\n circleAngles = [angles[1][index]];\r\n }\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles,\r\n path2Angles: circleAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Arc][MakerJs.pathType.Line] = function (arc, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([arc, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, arc, options);\r\n if (angles) {\r\n var arcAngles = getAnglesWithinArc(angles, arc, options);\r\n if (arcAngles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(arcAngles, arc),\r\n path1Angles: arcAngles\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Arc] = function (circle, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Circle](arc, circle, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Circle] = function (circle1, circle2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle1, circle2], options, swapOffsets, function () {\r\n var angles = circleToCircle(circle1, circle2, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles[0], circle1),\r\n path1Angles: angles[0],\r\n path2Angles: angles[1]\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Circle][MakerJs.pathType.Line] = function (circle, line, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([circle, line], options, swapOffsets, function () {\r\n var angles = lineToCircle(line, circle, options);\r\n if (angles) {\r\n result = {\r\n intersectionPoints: pointsFromAnglesOnCircle(angles, circle),\r\n path1Angles: angles\r\n };\r\n }\r\n });\r\n return result;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Arc] = function (line, arc, options) {\r\n var result = map[MakerJs.pathType.Arc][MakerJs.pathType.Line](arc, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Circle] = function (line, circle, options) {\r\n var result = map[MakerJs.pathType.Circle][MakerJs.pathType.Line](circle, line, options, true);\r\n if (result) {\r\n return swapAngles(result);\r\n }\r\n return null;\r\n };\r\n map[MakerJs.pathType.Line][MakerJs.pathType.Line] = function (line1, line2, options, swapOffsets) {\r\n var result = null;\r\n moveTemp([line1, line2], options, swapOffsets, function () {\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line1, line2, options);\r\n if (intersectionPoint) {\r\n //we have the point of intersection of endless lines, now check to see if the point is between both segemnts\r\n if (MakerJs.measure.isBetweenPoints(intersectionPoint, line1, options.excludeTangents) && MakerJs.measure.isBetweenPoints(intersectionPoint, line2, options.excludeTangents)) {\r\n result = {\r\n intersectionPoints: [intersectionPoint]\r\n };\r\n }\r\n }\r\n });\r\n return result;\r\n };\r\n /**\r\n * @private\r\n */\r\n function moveTemp(pathsToOffset, options, swapOffsets, task) {\r\n var offsets = swapOffsets ? [options.path2Offset, options.path1Offset] : [options.path1Offset, options.path2Offset];\r\n path.moveTemporary(pathsToOffset, offsets, task);\r\n }\r\n ;\r\n /**\r\n * @private\r\n */\r\n function swapAngles(result) {\r\n var temp = result.path1Angles;\r\n if (result.path2Angles) {\r\n result.path1Angles = result.path2Angles;\r\n }\r\n else {\r\n delete result.path1Angles;\r\n }\r\n if (temp) {\r\n result.path2Angles = temp;\r\n }\r\n return result;\r\n }\r\n /**\r\n * Find the point(s) where 2 paths intersect.\r\n *\r\n * @param path1 First path to find intersection.\r\n * @param path2 Second path to find intersection.\r\n * @param options Optional IPathIntersectionOptions.\r\n * @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.\r\n */\r\n function intersection(path1, path2, options) {\r\n if (options === void 0) { options = {}; }\r\n if (path1 && path2) {\r\n var fn = map[path1.type][path2.type];\r\n if (fn) {\r\n return fn(path1, path2, options);\r\n }\r\n }\r\n return null;\r\n }\r\n path.intersection = intersection;\r\n /**\r\n * @private\r\n */\r\n function findCorrespondingAngleIndex(circleAngles, arcAngle) {\r\n for (var i = 2; i--;) {\r\n if (circleAngles[i] === arcAngle)\r\n return i;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function pointsFromAnglesOnCircle(anglesInDegrees, circle) {\r\n var result = [];\r\n for (var i = 0; i < anglesInDegrees.length; i++) {\r\n result.push(MakerJs.point.fromAngleOnCircle(anglesInDegrees[i], circle));\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getAnglesWithinArc(angles, arc, options) {\r\n if (!angles)\r\n return null;\r\n var anglesWithinArc = [];\r\n for (var i = 0; i < angles.length; i++) {\r\n if (MakerJs.measure.isBetweenArcAngles(angles[i], arc, options.excludeTangents)) {\r\n anglesWithinArc.push(angles[i]);\r\n }\r\n }\r\n if (anglesWithinArc.length == 0)\r\n return null;\r\n return anglesWithinArc;\r\n }\r\n /**\r\n * @private\r\n */\r\n function lineToCircle(line, circle, options) {\r\n var radius = MakerJs.round(circle.radius);\r\n //no-op for degenerate circle\r\n if (circle.radius <= 0) {\r\n return null;\r\n }\r\n //clone the line\r\n var clonedLine = new MakerJs.paths.Line(MakerJs.point.subtract(line.origin, circle.origin), MakerJs.point.subtract(line.end, circle.origin));\r\n //get angle of line\r\n var lineAngleNormal = MakerJs.angle.ofLineInDegrees(line);\r\n //use the positive horizontal angle\r\n var lineAngle = (lineAngleNormal >= 180) ? lineAngleNormal - 360 : lineAngleNormal;\r\n //rotate the line to horizontal\r\n path.rotate(clonedLine, -lineAngle, MakerJs.point.zero());\r\n //remember how to undo the rotation we just did\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + lineAngle;\r\n return MakerJs.round(MakerJs.angle.noRevolutions(unrotated));\r\n }\r\n //line is horizontal, get the y value from any point\r\n var lineY = MakerJs.round(clonedLine.origin[1]);\r\n var lineYabs = Math.abs(lineY);\r\n //if y is greater than radius, there is no intersection\r\n if (lineYabs > radius) {\r\n return null;\r\n }\r\n var anglesOfIntersection = [];\r\n //if horizontal Y is the same as the radius, we know it's 90 degrees\r\n if (lineYabs == radius) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n anglesOfIntersection.push(unRotate(lineY > 0 ? 90 : 270));\r\n }\r\n else {\r\n function intersectionBetweenEndpoints(x, angleOfX) {\r\n if (MakerJs.measure.isBetween(MakerJs.round(x), MakerJs.round(clonedLine.origin[0]), MakerJs.round(clonedLine.end[0]), options.excludeTangents)) {\r\n anglesOfIntersection.push(unRotate(angleOfX));\r\n }\r\n }\r\n //find angle where line intersects\r\n var intersectRadians = Math.asin(lineY / radius);\r\n var intersectDegrees = MakerJs.angle.toDegrees(intersectRadians);\r\n //line may intersect in 2 places\r\n var intersectX = Math.cos(intersectRadians) * radius;\r\n intersectionBetweenEndpoints(-intersectX, 180 - intersectDegrees);\r\n intersectionBetweenEndpoints(intersectX, intersectDegrees);\r\n }\r\n if (anglesOfIntersection.length > 0) {\r\n return anglesOfIntersection;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function circleToCircle(circle1, circle2, options) {\r\n //no-op if either circle is degenerate\r\n if (circle1.radius <= 0 || circle2.radius <= 0) {\r\n return null;\r\n }\r\n //see if circles are the same\r\n if (circle1.radius == circle2.radius && MakerJs.measure.isPointEqual(circle1.origin, circle2.origin, .0001)) {\r\n options.out_AreOverlapped = true;\r\n return null;\r\n }\r\n //get offset from origin\r\n var offset = MakerJs.point.subtract(MakerJs.point.zero(), circle1.origin);\r\n //clone circle1 and move to origin\r\n var c1 = new MakerJs.paths.Circle(MakerJs.point.zero(), circle1.radius);\r\n //clone circle2 and move relative to circle1\r\n var c2 = new MakerJs.paths.Circle(MakerJs.point.subtract(circle2.origin, circle1.origin), circle2.radius);\r\n //rotate circle2 to horizontal, c2 will be to the right of the origin.\r\n var c2Angle = MakerJs.angle.ofPointInDegrees(MakerJs.point.zero(), c2.origin);\r\n path.rotate(c2, -c2Angle, MakerJs.point.zero());\r\n function unRotate(resultAngle) {\r\n var unrotated = resultAngle + c2Angle;\r\n return MakerJs.angle.noRevolutions(unrotated);\r\n }\r\n //get X of c2 origin\r\n var x = c2.origin[0];\r\n //see if circles are tangent interior on left side\r\n if (MakerJs.round(c2.radius - x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(180)], [unRotate(180)]];\r\n }\r\n //see if circles are tangent interior on right side\r\n if (MakerJs.round(c2.radius + x - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(0)]];\r\n }\r\n //see if circles are tangent exterior\r\n if (MakerJs.round(x - c2.radius - c1.radius) == 0) {\r\n if (options.excludeTangents) {\r\n return null;\r\n }\r\n return [[unRotate(0)], [unRotate(180)]];\r\n }\r\n //see if c2 is outside of c1\r\n if (MakerJs.round(x - c2.radius) > c1.radius) {\r\n return null;\r\n }\r\n //see if c2 is within c1\r\n if (MakerJs.round(x + c2.radius) < c1.radius) {\r\n return null;\r\n }\r\n //see if c1 is within c2\r\n if (MakerJs.round(x - c2.radius) < -c1.radius) {\r\n return null;\r\n }\r\n function bothAngles(oneAngle) {\r\n return [unRotate(oneAngle), unRotate(MakerJs.angle.mirror(oneAngle, false, true))];\r\n }\r\n var c1IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c2.radius, c1.radius, x);\r\n var c2IntersectionAngle = MakerJs.solvers.solveTriangleSSS(c1.radius, x, c2.radius);\r\n return [bothAngles(c1IntersectionAngle), bothAngles(180 - c2IntersectionAngle)];\r\n }\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var path;\r\n (function (path) {\r\n /**\r\n * @private\r\n */\r\n var propertyNamesMap = {};\r\n propertyNamesMap[MakerJs.pathType.Arc] = function (arc) {\r\n return ['startAngle', 'endAngle'];\r\n };\r\n propertyNamesMap[MakerJs.pathType.Line] = function (line) {\r\n return ['origin', 'end'];\r\n };\r\n /**\r\n * @private\r\n */\r\n function getPointProperties(pathToInspect) {\r\n var points = MakerJs.point.fromPathEnds(pathToInspect);\r\n if (points) {\r\n function pointProperty(index) {\r\n return { point: points[index], propertyName: propertyNames[index] };\r\n }\r\n var propertyNames = null;\r\n var fn = propertyNamesMap[pathToInspect.type];\r\n if (fn) {\r\n propertyNames = fn(pathToInspect);\r\n return [pointProperty(0), pointProperty(1)];\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getMatchingPointProperties(pathA, pathB, options) {\r\n var pathAProperties = getPointProperties(pathA);\r\n var pathBProperties = getPointProperties(pathB);\r\n var result = null;\r\n function makeMatch(pathContext, pointProperties, index) {\r\n return {\r\n path: pathContext,\r\n isStart: index == 0,\r\n propertyName: pointProperties[index].propertyName,\r\n point: pointProperties[index].point,\r\n oppositePoint: pointProperties[1 - index].point\r\n };\r\n }\r\n function check(iA, iB) {\r\n if (MakerJs.measure.isPointEqual(pathAProperties[iA].point, pathBProperties[iB].point, .0001)) {\r\n result = [\r\n makeMatch(pathA, pathAProperties, iA),\r\n makeMatch(pathB, pathBProperties, iB)\r\n ];\r\n return true;\r\n }\r\n return false;\r\n }\r\n check(0, 0) || check(0, 1) || check(1, 0) || check(1, 1);\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function populateShardPointsFromReferenceCircle(filletRadius, center, properties, options) {\r\n var referenceCircle = new MakerJs.paths.Circle(center, filletRadius);\r\n //get reference circle intersection points\r\n for (var i = 0; i < 2; i++) {\r\n var circleIntersection = path.intersection(referenceCircle, properties[i].path);\r\n if (!circleIntersection) {\r\n return false;\r\n }\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[0];\r\n if (MakerJs.measure.isPointEqual(properties[i].point, circleIntersection.intersectionPoints[0], .0001)) {\r\n if (circleIntersection.intersectionPoints.length > 1) {\r\n properties[i].shardPoint = circleIntersection.intersectionPoints[1];\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneAndBreakPath(pathToShard, shardPoint) {\r\n var shardStart = path.clone(pathToShard);\r\n var shardEnd = path.breakAtPoint(shardStart, shardPoint);\r\n return [shardStart, shardEnd];\r\n }\r\n /**\r\n * @private\r\n */\r\n var guidePathMap = {};\r\n guidePathMap[MakerJs.pathType.Arc] = function (arc, filletRadius, nearPoint, shardPoint, isStart) {\r\n var guideRadius = arc.radius;\r\n //see if the guideline should be external or internal to the context arc.\r\n var guideArcShard = cloneAndBreakPath(arc, shardPoint)[isStart ? 0 : 1];\r\n if (guideArcShard) {\r\n if (MakerJs.measure.isArcConcaveTowardsPoint(guideArcShard, nearPoint)) {\r\n guideRadius -= filletRadius;\r\n }\r\n else {\r\n guideRadius += filletRadius;\r\n }\r\n if (MakerJs.round(guideRadius) <= 0)\r\n return null;\r\n return new MakerJs.paths.Arc(arc.origin, guideRadius, arc.startAngle, arc.endAngle);\r\n }\r\n return null;\r\n };\r\n guidePathMap[MakerJs.pathType.Line] = function (line, filletRadius, nearPoint, shardPoint, isStart) {\r\n return new MakerJs.paths.Parallel(line, filletRadius, nearPoint);\r\n };\r\n /**\r\n * @private\r\n */\r\n function getGuidePath(context, filletRadius, nearPoint) {\r\n var result = null;\r\n var fn = guidePathMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, filletRadius, nearPoint, context.shardPoint, context.isStart);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n var filletResultMap = {};\r\n filletResultMap[MakerJs.pathType.Arc] = function (arc, propertyName, filletRadius, filletCenter) {\r\n var guideLine = new MakerJs.paths.Line(arc.origin, filletCenter);\r\n var guideLineAngle = MakerJs.angle.ofLineInDegrees(guideLine);\r\n var filletAngle = guideLineAngle;\r\n //the context is an arc and the fillet is an arc so they will be tangent. If the fillet is external to the arc then the tangent is opposite.\r\n if (!MakerJs.measure.isArcConcaveTowardsPoint(arc, filletCenter)) {\r\n filletAngle += 180;\r\n }\r\n return {\r\n filletAngle: MakerJs.angle.noRevolutions(filletAngle),\r\n clipPath: function () {\r\n arc[propertyName] = guideLineAngle;\r\n }\r\n };\r\n };\r\n filletResultMap[MakerJs.pathType.Line] = function (line, propertyName, filletRadius, filletCenter) {\r\n //make a small vertical line\r\n var guideLine = new MakerJs.paths.Line([0, 0], [0, 1]);\r\n //rotate this vertical line the same angle as the line context. It will be perpendicular.\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n path.rotate(guideLine, lineAngle, [0, 0]);\r\n path.moveRelative(guideLine, filletCenter);\r\n //get the intersection point of the slopes of the context line and the perpendicular line. This is where the fillet meets the line.\r\n var intersectionPoint = MakerJs.point.fromSlopeIntersection(line, guideLine);\r\n if (intersectionPoint) {\r\n return {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, intersectionPoint),\r\n clipPath: function () {\r\n line[propertyName] = intersectionPoint;\r\n }\r\n };\r\n }\r\n return null;\r\n };\r\n /**\r\n * @private\r\n */\r\n function getFilletResult(context, filletRadius, filletCenter) {\r\n var result = null;\r\n var fn = filletResultMap[context.path.type];\r\n if (fn) {\r\n result = fn(context.path, context.propertyName, filletRadius, filletCenter);\r\n }\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getDogboneResult(context, filletCenter) {\r\n var result = {\r\n filletAngle: MakerJs.angle.ofPointInDegrees(filletCenter, context.shardPoint),\r\n clipPath: function () {\r\n context.path[context.propertyName] = context.shardPoint;\r\n }\r\n };\r\n if (!testFilletResult(context, result)) {\r\n result = null;\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function testFilletResult(context, result) {\r\n var test = false;\r\n if (result) {\r\n //temporarily clip the path.\r\n var originalValue = context.path[context.propertyName];\r\n result.clipPath();\r\n //don't allow a fillet which effectivly eliminates the path.\r\n if (MakerJs.measure.pathLength(context.path) > 0) {\r\n test = true;\r\n }\r\n //revert the clipping we just did.\r\n context.path[context.propertyName] = originalValue;\r\n }\r\n return test;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLineRatio(lines) {\r\n var totalLength = 0;\r\n var lengths = [];\r\n for (var i = 0; i < lines.length; i++) {\r\n var length = MakerJs.measure.pathLength(lines[i]);\r\n lengths.push(length);\r\n totalLength += length;\r\n }\r\n return lengths[0] / totalLength;\r\n }\r\n /**\r\n * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point.\r\n *\r\n * @param lineA First line to fillet, which will be modified to fit the fillet.\r\n * @param lineB Second line to fillet, which will be modified to fit the fillet.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function dogbone(lineA, lineB, filletRadius, options) {\r\n //TODO: allow arcs in dogbone\r\n if (MakerJs.isPathLine(lineA) && MakerJs.isPathLine(lineB) && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(lineA, lineB, options);\r\n if (commonProperty) {\r\n //get the ratio comparison of the two lines\r\n var ratio = getLineRatio([lineA, lineB]);\r\n //draw a line between the two endpoints, and get the bisection point at the ratio\r\n var span = new MakerJs.paths.Line(commonProperty[0].oppositePoint, commonProperty[1].oppositePoint);\r\n var midRatioPoint = MakerJs.point.middle(span, ratio);\r\n //use the bisection theorem to get the angle bisecting the lines\r\n var bisectionAngle = MakerJs.angle.ofPointInDegrees(commonProperty[0].point, midRatioPoint);\r\n var center = MakerJs.point.add(commonProperty[0].point, MakerJs.point.fromPolar(MakerJs.angle.toRadians(bisectionAngle), filletRadius));\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, center, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getDogboneResult(commonProperty[i], center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n //make sure midpoint of fillet is outside of the angle\r\n if (MakerJs.round(MakerJs.angle.noRevolutions(MakerJs.angle.ofArcMiddle(filletArc))) == MakerJs.round(bisectionAngle)) {\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n return null;\r\n }\r\n path.dogbone = dogbone;\r\n /**\r\n * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point.\r\n *\r\n * @param pathA First path to fillet, which will be modified to fit the fillet.\r\n * @param pathB Second path to fillet, which will be modified to fit the fillet.\r\n * @param filletRadius Radius of the fillet.\r\n * @param options Optional IPointMatchOptions object to specify pointMatchingDistance.\r\n * @returns Arc path object of the new fillet.\r\n */\r\n function fillet(pathA, pathB, filletRadius, options) {\r\n if (pathA && pathB && filletRadius && filletRadius > 0) {\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //first find the common point\r\n var commonProperty = getMatchingPointProperties(pathA, pathB, options);\r\n if (commonProperty) {\r\n //since arcs can curl beyond, we need a local reference point. \r\n //An intersection with a circle of the same radius as the desired fillet should suffice.\r\n if (!populateShardPointsFromReferenceCircle(filletRadius, commonProperty[0].point, commonProperty, opts)) {\r\n return null;\r\n }\r\n //get \"parallel\" guidelines\r\n var guidePaths = [];\r\n for (var i = 0; i < 2; i++) {\r\n var otherPathShardPoint = commonProperty[1 - i].shardPoint;\r\n if (!otherPathShardPoint) {\r\n return null;\r\n }\r\n var guidePath = getGuidePath(commonProperty[i], filletRadius, otherPathShardPoint);\r\n guidePaths.push(guidePath);\r\n }\r\n //the center of the fillet is the point where the guidelines intersect.\r\n var intersectionPoint = path.intersection(guidePaths[0], guidePaths[1]);\r\n if (intersectionPoint) {\r\n var center;\r\n //if guidelines intersect in more than one place, choose the closest one.\r\n if (intersectionPoint.intersectionPoints.length == 1) {\r\n center = intersectionPoint.intersectionPoints[0];\r\n }\r\n else {\r\n center = MakerJs.point.closest(commonProperty[0].point, intersectionPoint.intersectionPoints);\r\n }\r\n //get the angles of the fillet and a function which clips the path to the fillet.\r\n var results = [];\r\n for (var i = 0; i < 2; i++) {\r\n var result = getFilletResult(commonProperty[i], filletRadius, center);\r\n if (!result) {\r\n return null;\r\n }\r\n results.push(result);\r\n }\r\n //the two paths may actually be on the same line\r\n if (MakerJs.round(results[0].filletAngle - results[1].filletAngle) == 0)\r\n return null;\r\n var filletArc = new MakerJs.paths.Arc(center, filletRadius, results[0].filletAngle, results[1].filletAngle);\r\n var filletSpan = MakerJs.angle.ofArcSpan(filletArc);\r\n //the algorithm is only valid for fillet less than 180 degrees\r\n if (filletSpan == 180) {\r\n return null;\r\n }\r\n if (filletSpan > 180) {\r\n //swap to make smallest angle\r\n filletArc.startAngle = results[1].filletAngle;\r\n filletArc.endAngle = results[0].filletAngle;\r\n }\r\n //clip the paths and return the fillet arc.\r\n results[0].clipPath();\r\n results[1].clipPath();\r\n return filletArc;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n path.fillet = fillet;\r\n })(path = MakerJs.path || (MakerJs.path = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n function dogbone(chainToFillet, filletSpec) {\r\n return chainFillet(false, chainToFillet, filletSpec);\r\n }\r\n chain.dogbone = dogbone;\r\n function fillet(chainToFillet, filletSpec) {\r\n return chainFillet(true, chainToFillet, filletSpec);\r\n }\r\n chain.fillet = fillet;\r\n function chainFillet(traditional, chainToFillet, filletSpec) {\r\n var result = { paths: {} };\r\n var added = 0;\r\n var links = chainToFillet.links;\r\n function add(i1, i2) {\r\n var p1 = links[i1].walkedPath, p2 = links[i2].walkedPath;\r\n if (p1.modelContext === p2.modelContext && p1.modelContext.type == MakerJs.models.BezierCurve.typeName)\r\n return;\r\n MakerJs.path.moveTemporary([p1.pathContext, p2.pathContext], [p1.offset, p2.offset], function () {\r\n var filletRadius;\r\n if (MakerJs.isObject(filletSpec)) {\r\n var a = MakerJs.angle.ofChainLinkJoint(links[i1], links[i2]);\r\n if (MakerJs.round(a) === 0)\r\n return;\r\n filletRadius = (a > 0) ? filletSpec.left : filletSpec.right;\r\n }\r\n else {\r\n filletRadius = filletSpec;\r\n }\r\n if (!filletRadius || filletRadius < 0)\r\n return;\r\n var filletArc;\r\n if (traditional) {\r\n filletArc = MakerJs.path.fillet(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n else {\r\n filletArc = MakerJs.path.dogbone(p1.pathContext, p2.pathContext, filletRadius);\r\n }\r\n if (filletArc) {\r\n result.paths['fillet' + added] = filletArc;\r\n added++;\r\n }\r\n });\r\n }\r\n for (var i = 1; i < links.length; i++) {\r\n add(i - 1, i);\r\n }\r\n if (chainToFillet.endless) {\r\n add(i - 1, 0);\r\n }\r\n if (!added)\r\n return null;\r\n return result;\r\n }\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var kit;\r\n (function (kit) {\r\n //construct a model\r\n /**\r\n * Helper function to use the JavaScript \"apply\" function in conjunction with the \"new\" keyword.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @param args The array of parameters passed to the constructor.\r\n * @returns A new instance of the class, which implements the IModel interface.\r\n */\r\n function construct(ctor, args) {\r\n function F() {\r\n return ctor.apply(this, args);\r\n }\r\n F.prototype = ctor.prototype;\r\n return new F();\r\n }\r\n kit.construct = construct;\r\n /**\r\n * Extract just the initial sample values from a kit.\r\n *\r\n * @param ctor The constructor for the class which is an IKit.\r\n * @returns Array of the inital sample values provided in the metaParameters array.\r\n */\r\n function getParameterValues(ctor) {\r\n var parameters = [];\r\n var metaParams = ctor.metaParameters;\r\n if (metaParams) {\r\n for (var i = 0; i < metaParams.length; i++) {\r\n var value = metaParams[i].value;\r\n if (Array.isArray(value)) {\r\n value = value[0];\r\n }\r\n parameters.push(value);\r\n }\r\n }\r\n return parameters;\r\n }\r\n kit.getParameterValues = getParameterValues;\r\n })(kit = MakerJs.kit || (MakerJs.kit = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n function getOpposedLink(linkedPaths, pathContext) {\r\n if (linkedPaths[0].walkedPath.pathContext === pathContext) {\r\n return linkedPaths[1];\r\n }\r\n return linkedPaths[0];\r\n }\r\n /**\r\n * @private\r\n */\r\n function followLinks(pointGraph, chainFound, chainNotFound) {\r\n function followLink(currLink, chain, firstLink) {\r\n while (currLink) {\r\n chain.links.push(currLink);\r\n chain.pathLength += currLink.pathLength;\r\n var next = currLink.reversed ? 0 : 1;\r\n var nextPoint = currLink.endPoints[next];\r\n var nextEl = pointGraph.getElementAtPoint(nextPoint);\r\n if (!nextEl || nextEl.valueIds.length === 0) {\r\n break;\r\n }\r\n var items = nextEl.valueIds.map(function (valueIndex) { return pointGraph.values[valueIndex]; });\r\n var nextLink = getOpposedLink(items, currLink.walkedPath.pathContext);\r\n //remove the first 2 items, which should be currlink and nextlink\r\n nextEl.valueIds.splice(0, 2);\r\n if (!nextLink) {\r\n break;\r\n }\r\n if (nextLink.walkedPath.pathContext === firstLink.walkedPath.pathContext) {\r\n if (chain.links.length > 1) {\r\n chain.endless = true;\r\n }\r\n break;\r\n }\r\n currLink = nextLink;\r\n }\r\n }\r\n pointGraph.forEachPoint(function (p, values, pointId, el) {\r\n if (el.valueIds.length > 0) {\r\n var chain = {\r\n links: [],\r\n pathLength: 0\r\n };\r\n followLink(values[0], chain, values[0]);\r\n if (chain.endless) {\r\n chainFound(chain, false);\r\n }\r\n else {\r\n //need to go in reverse\r\n chain.links.reverse();\r\n var firstLink = chain.links[0];\r\n chain.links.map(function (link) { link.reversed = !link.reversed; });\r\n //remove the last link, it will be added in the call\r\n chain.pathLength -= chain.links[chain.links.length - 1].pathLength;\r\n var currLink = chain.links.pop();\r\n followLink(currLink, chain, firstLink);\r\n if (chain.links.length > 1) {\r\n chainFound(chain, true);\r\n }\r\n else {\r\n chainNotFound(chain.links[0].walkedPath);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model.\r\n *\r\n * @param modelContext The model to search for a chain.\r\n * @returns A chain object or null if chains were not found.\r\n */\r\n function findSingleChain(modelContext) {\r\n var singleChain = null;\r\n findChains(modelContext, function (chains, loose, layer) {\r\n singleChain = chains[0];\r\n }, { byLayers: false });\r\n return singleChain;\r\n }\r\n model.findSingleChain = findSingleChain;\r\n /**\r\n * @private\r\n */\r\n function linkEndpoint(link, beginning) {\r\n var index = (beginning === link.reversed) ? 1 : 0;\r\n return link.endPoints[index];\r\n }\r\n function findChains(modelContext) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options;\r\n var callback;\r\n switch (args.length) {\r\n case 1:\r\n if (typeof args[0] === 'function') {\r\n callback = args[0];\r\n }\r\n else {\r\n options = args[0];\r\n }\r\n break;\r\n case 2:\r\n callback = args[0];\r\n options = args[1];\r\n break;\r\n }\r\n var opts = {\r\n pointMatchingDistance: .005\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var pointGraphsByLayer = {};\r\n var chainsByLayer = {};\r\n var ignored = {};\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var layer = opts.byLayers ? walkedPath.layer : '';\r\n if (!pointGraphsByLayer[layer]) {\r\n pointGraphsByLayer[layer] = new MakerJs.PointGraph();\r\n }\r\n var pointGraph = pointGraphsByLayer[layer];\r\n var pathLength = MakerJs.measure.pathLength(walkedPath.pathContext);\r\n //circles are loops by nature\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.Arc && MakerJs.round(MakerJs.angle.ofArcSpan(walkedPath.pathContext) - 360) === 0) ||\r\n (walkedPath.pathContext.type === MakerJs.pathType.BezierSeed && MakerJs.measure.isPointEqual(walkedPath.pathContext.origin, walkedPath.pathContext.end, opts.pointMatchingDistance))) {\r\n var chain = {\r\n links: [{\r\n walkedPath: walkedPath,\r\n reversed: null,\r\n endPoints: null,\r\n pathLength: pathLength\r\n }],\r\n endless: true,\r\n pathLength: pathLength\r\n };\r\n //store circles so that layers fire grouped\r\n if (!chainsByLayer[layer]) {\r\n chainsByLayer[layer] = [];\r\n }\r\n chainsByLayer[layer].push(chain);\r\n }\r\n else {\r\n //don't add lines which are 5x shorter than the tolerance\r\n if (pathLength < opts.pointMatchingDistance / 5) {\r\n if (!ignored[layer]) {\r\n ignored[layer] = [];\r\n }\r\n ignored[layer].push(walkedPath);\r\n return;\r\n }\r\n //gather both endpoints from all non-circle segments\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n for (var i = 0; i < 2; i++) {\r\n var link = {\r\n walkedPath: walkedPath,\r\n endPoints: endPoints,\r\n reversed: i != 0,\r\n pathLength: pathLength\r\n };\r\n var valueId = pointGraph.insertValue(link);\r\n pointGraph.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n }\r\n };\r\n if (opts.shallow) {\r\n walkOptions.beforeChildWalk = function () { return false; };\r\n }\r\n var beziers;\r\n if (opts.unifyBeziers) {\r\n beziers = getBezierModels(modelContext);\r\n swapBezierPathsWithSeeds(beziers, true);\r\n }\r\n model.walk(modelContext, walkOptions);\r\n var _loop_3 = function (layer_2) {\r\n var pointGraph = pointGraphsByLayer[layer_2];\r\n pointGraph.mergeNearestSinglePoints(opts.pointMatchingDistance);\r\n loose = [];\r\n if (!chainsByLayer[layer_2]) {\r\n chainsByLayer[layer_2] = [];\r\n }\r\n //follow paths to find endless chains\r\n followLinks(pointGraph, function (chain, checkEndless) {\r\n if (checkEndless) {\r\n chain.endless = MakerJs.measure.isPointEqual(linkEndpoint(chain.links[0], true), linkEndpoint(chain.links[chain.links.length - 1], false), opts.pointMatchingDistance);\r\n }\r\n else {\r\n chain.endless = !!chain.endless;\r\n }\r\n chainsByLayer[layer_2].push(chain);\r\n }, function (walkedPath) {\r\n loose.push(walkedPath);\r\n });\r\n //sort to return largest chains first\r\n chainsByLayer[layer_2].sort(function (a, b) { return b.pathLength - a.pathLength; });\r\n if (opts.contain) {\r\n containChainsOptions = MakerJs.isObject(opts.contain) ? opts.contain : { alternateDirection: false };\r\n containedChains = getContainment(chainsByLayer[layer_2], containChainsOptions);\r\n chainsByLayer[layer_2] = containedChains;\r\n }\r\n if (callback)\r\n callback(chainsByLayer[layer_2], loose, layer_2, ignored[layer_2]);\r\n };\r\n var loose, containChainsOptions, containedChains;\r\n for (var layer_2 in pointGraphsByLayer) {\r\n _loop_3(layer_2);\r\n }\r\n if (beziers) {\r\n swapBezierPathsWithSeeds(beziers, false);\r\n }\r\n if (opts.byLayers) {\r\n return chainsByLayer;\r\n }\r\n else {\r\n return chainsByLayer[''];\r\n }\r\n }\r\n model.findChains = findChains;\r\n /**\r\n * @private\r\n */\r\n function getContainment(allChains, opts) {\r\n var chainsAsModels = allChains.map(function (c) { return MakerJs.chain.toNewModel(c); });\r\n var parents = [];\r\n //see which are inside of each other\r\n allChains.forEach(function (chainContext, i1) {\r\n if (!chainContext.endless)\r\n return;\r\n var wp = chainContext.links[0].walkedPath;\r\n var firstPath = MakerJs.path.clone(wp.pathContext, wp.offset);\r\n allChains.forEach(function (otherChain, i2) {\r\n if (chainContext === otherChain)\r\n return;\r\n if (!otherChain.endless)\r\n return;\r\n if (MakerJs.measure.isPointInsideModel(MakerJs.point.middle(firstPath), chainsAsModels[i2])) {\r\n //since chains were sorted by pathLength, the smallest pathLength parent will be the parent if contained in multiple chains.\r\n parents[i1] = otherChain;\r\n }\r\n });\r\n });\r\n //convert parent to children\r\n var result = [];\r\n allChains.forEach(function (chainContext, i) {\r\n var parent = parents[i];\r\n if (!parent) {\r\n result.push(chainContext);\r\n }\r\n else {\r\n if (!parent.contains) {\r\n parent.contains = [];\r\n }\r\n parent.contains.push(chainContext);\r\n }\r\n });\r\n if (opts.alternateDirection) {\r\n function alternate(chains, shouldBeClockwise) {\r\n chains.forEach(function (chainContext, i) {\r\n var isClockwise = MakerJs.measure.isChainClockwise(chainContext);\r\n if (isClockwise !== null) {\r\n if (!isClockwise && shouldBeClockwise || isClockwise && !shouldBeClockwise) {\r\n MakerJs.chain.reverse(chainContext);\r\n }\r\n }\r\n if (chainContext.contains) {\r\n alternate(chainContext.contains, !shouldBeClockwise);\r\n }\r\n });\r\n }\r\n alternate(result, true);\r\n }\r\n return result;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getBezierModels(modelContext) {\r\n var beziers = [];\r\n function checkIsBezier(wm) {\r\n if (wm.childModel.type === MakerJs.models.BezierCurve.typeName) {\r\n beziers.push(wm);\r\n }\r\n }\r\n var options = {\r\n beforeChildWalk: function (walkedModel) {\r\n checkIsBezier(walkedModel);\r\n return true;\r\n }\r\n };\r\n var rootModel = {\r\n childId: '',\r\n childModel: modelContext,\r\n layer: modelContext.layer,\r\n offset: modelContext.origin,\r\n parentModel: null,\r\n route: [],\r\n routeKey: ''\r\n };\r\n checkIsBezier(rootModel);\r\n model.walk(modelContext, options);\r\n return beziers;\r\n }\r\n /**\r\n * @private\r\n */\r\n function swapBezierPathsWithSeeds(beziers, swap) {\r\n var tempKey = 'tempPaths';\r\n var tempLayerKey = 'tempLayer';\r\n beziers.forEach(function (wm) {\r\n var b = wm.childModel;\r\n if (swap) {\r\n //set layer prior to looking for seeds by layer\r\n if (wm.layer != undefined && wm.layer !== '') {\r\n b[tempLayerKey] = b.layer;\r\n b.layer = wm.layer;\r\n }\r\n //use seeds as path, hide the arc paths from findChains()\r\n var bezierPartsByLayer = MakerJs.models.BezierCurve.getBezierSeeds(b, { byLayers: true });\r\n for (var layer in bezierPartsByLayer) {\r\n var bezierSeeds = bezierPartsByLayer[layer];\r\n if (bezierSeeds.length > 0) {\r\n b[tempKey] = b.paths;\r\n var newPaths = {};\r\n bezierSeeds.forEach(function (seed, i) {\r\n seed.layer = layer;\r\n newPaths['seed_' + i] = seed;\r\n });\r\n b.paths = newPaths;\r\n }\r\n }\r\n }\r\n else {\r\n //revert the above\r\n if (tempKey in b) {\r\n b.paths = b[tempKey];\r\n delete b[tempKey];\r\n }\r\n if (tempLayerKey in b) {\r\n if (b[tempLayerKey] == undefined) {\r\n delete b.layer;\r\n }\r\n else {\r\n b.layer = b[tempLayerKey];\r\n }\r\n delete b[tempLayerKey];\r\n }\r\n }\r\n });\r\n }\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var chain;\r\n (function (chain) {\r\n /**\r\n * Shift the links of an endless chain.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param amount Optional number of links to shift. May be negative to cycle backwards.\r\n * @returns The chainContext for cascading.\r\n */\r\n function cycle(chainContext, amount) {\r\n if (amount === void 0) { amount = 1; }\r\n if (!chainContext.endless)\r\n return;\r\n var n = Math.abs(amount);\r\n for (var i = 0; i < n; i++) {\r\n if (amount < 0) {\r\n //remove from beginning, add to end\r\n chainContext.links.push(chainContext.links.shift());\r\n }\r\n else {\r\n //remove from end, add to beginning\r\n chainContext.links.unshift(chainContext.links.pop());\r\n }\r\n }\r\n return chainContext;\r\n }\r\n chain.cycle = cycle;\r\n /**\r\n * Reverse the links of a chain.\r\n *\r\n * @param chainContext Chain to reverse.\r\n * @returns The chainContext for cascading.\r\n */\r\n function reverse(chainContext) {\r\n chainContext.links.reverse();\r\n chainContext.links.forEach(function (link) { return link.reversed = !link.reversed; });\r\n return chainContext;\r\n }\r\n chain.reverse = reverse;\r\n /**\r\n * Set the beginning of an endless chain to a known routeKey of a path.\r\n *\r\n * @param chainContext Chain to cycle through. Must be endless.\r\n * @param routeKey RouteKey of the desired path to start the chain with.\r\n * @returns The chainContext for cascading.\r\n */\r\n function startAt(chainContext, routeKey) {\r\n if (!chainContext.endless)\r\n return;\r\n var index = -1;\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n if (chainContext.links[i].walkedPath.routeKey == routeKey) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n if (index > 0) {\r\n cycle(chainContext, index);\r\n }\r\n return chainContext;\r\n }\r\n chain.startAt = startAt;\r\n /**\r\n * Convert a chain to a new model, independent of any model from where the chain was found.\r\n *\r\n * @param chainContext Chain to convert to a model.\r\n * @param detachFromOldModel Flag to remove the chain's paths from their current parent model. If false, each path will be cloned. If true, the original path will be re-parented into the resulting new model. Default is false.\r\n * @returns A new model containing paths from the chain.\r\n */\r\n function toNewModel(chainContext, detachFromOldModel) {\r\n if (detachFromOldModel === void 0) { detachFromOldModel = false; }\r\n var result = { paths: {} };\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var wp = chainContext.links[i].walkedPath;\r\n if (wp.pathContext.type === MakerJs.pathType.BezierSeed) {\r\n if (detachFromOldModel) {\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n var modelId = MakerJs.model.getSimilarModelId(result, wp.pathId);\r\n result.models[modelId] = MakerJs.model.moveRelative(new MakerJs.models.BezierCurve(wp.pathContext), wp.offset);\r\n }\r\n else {\r\n var newPath;\r\n if (detachFromOldModel) {\r\n newPath = wp.pathContext;\r\n delete wp.modelContext.paths[wp.pathId];\r\n }\r\n else {\r\n newPath = MakerJs.path.clone(wp.pathContext);\r\n }\r\n var pathId = MakerJs.model.getSimilarPathId(result, wp.pathId);\r\n result.paths[pathId] = MakerJs.path.moveRelative(newPath, wp.offset);\r\n }\r\n }\r\n return result;\r\n }\r\n chain.toNewModel = toNewModel;\r\n /**\r\n * @private\r\n */\r\n function removeDuplicateEnds(endless, points) {\r\n if (!endless || points.length < 2)\r\n return;\r\n if (MakerJs.measure.isPointEqual(points[0], points[points.length - 1], .00001)) {\r\n points.pop();\r\n }\r\n }\r\n /**\r\n * Get points along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param distance Numeric distance along the chain between points, or numeric array of distances along the chain between each point.\r\n * @param maxPoints Maximum number of points to retrieve.\r\n * @returns Array of points which are on the chain spread at a uniform interval.\r\n */\r\n function toPoints(chainContext, distanceOrDistances, maxPoints) {\r\n var result = [];\r\n var di = 0;\r\n var t = 0;\r\n var distanceArray;\r\n if (Array.isArray(distanceOrDistances)) {\r\n distanceArray = distanceOrDistances;\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var len = link.pathLength;\r\n while (MakerJs.round(len - t) > 0) {\r\n var r = t / len;\r\n if (link.reversed) {\r\n r = 1 - r;\r\n }\r\n result.push(MakerJs.point.add(MakerJs.point.middle(wp.pathContext, r), wp.offset));\r\n if (maxPoints && result.length >= maxPoints)\r\n return result;\r\n var distance;\r\n if (distanceArray) {\r\n distance = distanceArray[di];\r\n di++;\r\n if (di > distanceArray.length) {\r\n return result;\r\n }\r\n }\r\n else {\r\n distance = distanceOrDistances;\r\n }\r\n t += distance;\r\n }\r\n t -= len;\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toPoints = toPoints;\r\n /**\r\n * Get key points (a minimal a number of points) along a chain of paths.\r\n *\r\n * @param chainContext Chain of paths to get points from.\r\n * @param maxArcFacet The maximum length between points on an arc or circle.\r\n * @returns Array of points which are on the chain.\r\n */\r\n function toKeyPoints(chainContext, maxArcFacet) {\r\n var result = [];\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var wp = link.walkedPath;\r\n var keyPoints = MakerJs.path.toKeyPoints(wp.pathContext, maxArcFacet);\r\n if (keyPoints.length > 0) {\r\n if (link.reversed) {\r\n keyPoints.reverse();\r\n }\r\n if (i > 0) {\r\n keyPoints.shift();\r\n }\r\n var offsetPathPoints = keyPoints.map(function (p) { return MakerJs.point.add(p, wp.offset); });\r\n result.push.apply(result, offsetPathPoints);\r\n }\r\n }\r\n removeDuplicateEnds(chainContext.endless, result);\r\n return result;\r\n }\r\n chain.toKeyPoints = toKeyPoints;\r\n })(chain = MakerJs.chain || (MakerJs.chain = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var model;\r\n (function (model) {\r\n /**\r\n * @private\r\n */\r\n var DeadEndFinder = /** @class */ (function () {\r\n function DeadEndFinder(modelContext, options) {\r\n this.modelContext = modelContext;\r\n this.options = options;\r\n this.pointMap = new MakerJs.PointGraph();\r\n this.list = [];\r\n this.removed = [];\r\n this.ordinals = {};\r\n this.load();\r\n }\r\n DeadEndFinder.prototype.load = function () {\r\n var _this = this;\r\n var walkOptions = {\r\n onPath: function (walkedPath) {\r\n var endPoints = MakerJs.point.fromPathEnds(walkedPath.pathContext, walkedPath.offset);\r\n if (!endPoints)\r\n return;\r\n var pathRef = walkedPath;\r\n pathRef.endPoints = endPoints;\r\n var valueId = _this.pointMap.insertValue(pathRef);\r\n for (var i = 2; i--;) {\r\n _this.pointMap.insertValueIdAtPoint(valueId, endPoints[i]);\r\n }\r\n }\r\n };\r\n model.walk(this.modelContext, walkOptions);\r\n if (this.options.pointMatchingDistance) {\r\n this.pointMap.mergePoints(this.options.pointMatchingDistance);\r\n }\r\n };\r\n DeadEndFinder.prototype.findDeadEnds = function () {\r\n var _this = this;\r\n var i = 0;\r\n this.pointMap.forEachPoint(function (p, values, pointId, el) {\r\n _this.ordinals[pointId] = i++;\r\n _this.list.push(el);\r\n });\r\n i = 0;\r\n var _loop_4 = function () {\r\n var el = this_2.list[i];\r\n if (el.valueIds.length === 1) {\r\n this_2.removePath(el, el.valueIds[0], i);\r\n }\r\n else if (this_2.options.keep && el.valueIds.length % 2) {\r\n el.valueIds.forEach(function (valueId) {\r\n var value = _this.pointMap.values[valueId];\r\n if (!_this.options.keep(value)) {\r\n _this.removePath(el, valueId, i);\r\n }\r\n });\r\n }\r\n i++;\r\n };\r\n var this_2 = this;\r\n while (i < this.list.length) {\r\n _loop_4();\r\n }\r\n return this.removed;\r\n };\r\n DeadEndFinder.prototype.removePath = function (el, valueId, current) {\r\n var value = this.pointMap.values[valueId];\r\n var otherPointId = this.getOtherPointId(value.endPoints, el.pointId);\r\n var otherElement = this.pointMap.index[otherPointId];\r\n this.removed.push(value);\r\n this.removeValue(el, valueId);\r\n this.removeValue(otherElement, valueId);\r\n if (otherElement.valueIds.length > 0) {\r\n this.appendQueue(otherElement, current);\r\n }\r\n };\r\n DeadEndFinder.prototype.removeValue = function (el, valueId) {\r\n var pos = el.valueIds.indexOf(valueId);\r\n if (pos >= 0) {\r\n el.valueIds.splice(pos, 1);\r\n }\r\n };\r\n DeadEndFinder.prototype.appendQueue = function (el, current) {\r\n var otherOrdinal = this.ordinals[el.pointId];\r\n if (otherOrdinal < current) {\r\n this.list[otherOrdinal] = null;\r\n this.list.push(el);\r\n this.ordinals[el.pointId] = this.list.length;\r\n }\r\n };\r\n DeadEndFinder.prototype.getOtherPointId = function (endPoints, pointId) {\r\n for (var i = 0; i < endPoints.length; i++) {\r\n var id = this.pointMap.getIdOfPoint(endPoints[i]);\r\n if (pointId !== id) {\r\n return id;\r\n }\r\n }\r\n };\r\n return DeadEndFinder;\r\n }());\r\n /**\r\n * Remove paths from a model which have endpoints that do not connect to other paths.\r\n *\r\n * @param modelContext The model to search for dead ends.\r\n * @param pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param keep Optional callback function (which should return a boolean) to decide if a dead end path should be kept instead.\r\n * @param trackDeleted Optional callback function which will log discarded paths and the reason they were discarded.\r\n * @returns The input model (for cascading).\r\n */\r\n function removeDeadEnds(modelContext, pointMatchingDistance, keep, trackDeleted) {\r\n var options = {\r\n pointMatchingDistance: pointMatchingDistance || .005,\r\n keep: keep\r\n };\r\n var deadEndFinder = new DeadEndFinder(modelContext, options);\r\n var removed = deadEndFinder.findDeadEnds();\r\n //do not leave an empty model\r\n if (removed.length < deadEndFinder.pointMap.values.length) {\r\n removed.forEach(function (wp) {\r\n trackDeleted(wp, 'dead end');\r\n delete wp.modelContext.paths[wp.pathId];\r\n });\r\n }\r\n return modelContext;\r\n }\r\n model.removeDeadEnds = removeDeadEnds;\r\n })(model = MakerJs.model || (MakerJs.model = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Class for an XML tag.\r\n * @private\r\n */\r\n var XmlTag = /** @class */ (function () {\r\n /**\r\n * @param name Name of the XML tag.\r\n * @param attrs Optional attributes for the tag.\r\n */\r\n function XmlTag(name, attrs) {\r\n this.name = name;\r\n this.attrs = attrs;\r\n /**\r\n * Text between the opening and closing tags.\r\n */\r\n this.innerText = '';\r\n }\r\n /**\r\n * Escapes certain characters within a string so that it can appear in a tag or its attribute.\r\n *\r\n * @returns Escaped string.\r\n */\r\n XmlTag.escapeString = function (value) {\r\n var escape = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n for (var code in escape) {\r\n //.split then .join is a 'replace'\r\n value = value.split(code).join(escape[code]);\r\n }\r\n return value;\r\n };\r\n /**\r\n * Get the opening tag.\r\n *\r\n * @param selfClose Flag to determine if opening tag should be self closing.\r\n */\r\n XmlTag.prototype.getOpeningTag = function (selfClose) {\r\n var attrs = '';\r\n function outputAttr(attrName, attrValue) {\r\n if (attrValue == null || typeof attrValue === 'undefined')\r\n return;\r\n if (Array.isArray(attrValue) || typeof attrValue === 'object') {\r\n attrValue = JSON.stringify(attrValue);\r\n }\r\n if (typeof attrValue === 'string') {\r\n attrValue = XmlTag.escapeString(attrValue);\r\n }\r\n attrs += ' ' + attrName + '=\"' + attrValue + '\"';\r\n }\r\n for (var name in this.attrs) {\r\n outputAttr(name, this.attrs[name]);\r\n }\r\n return '<' + this.name + attrs + (selfClose ? '/' : '') + '>';\r\n };\r\n /**\r\n * Get the inner text.\r\n */\r\n XmlTag.prototype.getInnerText = function () {\r\n if (this.innerTextEscaped) {\r\n return this.innerText;\r\n }\r\n else {\r\n return XmlTag.escapeString(this.innerText);\r\n }\r\n };\r\n /**\r\n * Get the closing tag.\r\n */\r\n XmlTag.prototype.getClosingTag = function () {\r\n return '';\r\n };\r\n /**\r\n * Output the entire tag as a string.\r\n */\r\n XmlTag.prototype.toString = function () {\r\n var selfClose = !this.innerText;\r\n if (selfClose && !this.closingTags) {\r\n return this.getOpeningTag(true);\r\n }\r\n else {\r\n return this.getOpeningTag(false) + this.getInnerText() + this.getClosingTag();\r\n }\r\n };\r\n return XmlTag;\r\n }());\r\n exporter.XmlTag = XmlTag;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n function wrap(prefix, content, condition) {\r\n if (condition) {\r\n return prefix + '(' + content + ')';\r\n }\r\n else {\r\n return content;\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function facetSizeToResolution(arcOrCircle, facetSize) {\r\n if (!facetSize)\r\n return;\r\n var circle = new MakerJs.paths.Circle([0, 0], arcOrCircle.radius);\r\n var length = MakerJs.measure.pathLength(circle);\r\n if (!length)\r\n return;\r\n return Math.ceil(length / facetSize);\r\n }\r\n /**\r\n * @private\r\n */\r\n function chainToJscadScript(chainContext, facetSize, accuracy) {\r\n var head = '';\r\n var tail = '';\r\n var first = true;\r\n var exit = false;\r\n var reverseTail = false;\r\n var beginMap = {};\r\n beginMap[MakerJs.pathType.Circle] = function (circle, link) {\r\n var circleOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(circle.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(circle.radius, accuracy),\r\n resolution: facetSizeToResolution(circle, facetSize)\r\n };\r\n head = wrap('CAG.circle', JSON.stringify(circleOptions), true);\r\n exit = true;\r\n };\r\n beginMap[MakerJs.pathType.Line] = function (line, link) {\r\n var points = link.endPoints.map(function (p) { return MakerJs.point.rounded(p, accuracy); });\r\n if (link.reversed) {\r\n points.reverse();\r\n }\r\n head = wrap('new CSG.Path2D', JSON.stringify(points), true);\r\n };\r\n beginMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n if (link.reversed) {\r\n reverseTail = true;\r\n }\r\n var arcOptions = {\r\n center: MakerJs.point.rounded(MakerJs.point.add(arc.origin, link.walkedPath.offset), accuracy),\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n startangle: MakerJs.round(arc.startAngle, accuracy),\r\n endangle: MakerJs.round(endAngle, accuracy),\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n head = wrap('new CSG.Path2D.arc', JSON.stringify(arcOptions), true);\r\n };\r\n var appendMap = {};\r\n appendMap[MakerJs.pathType.Line] = function (line, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendPoint', JSON.stringify(endPoint), true));\r\n };\r\n appendMap[MakerJs.pathType.Arc] = function (arc, link) {\r\n var reverse = (reverseTail != link.reversed);\r\n var endAngle = MakerJs.angle.ofArcEnd(arc);\r\n var arcOptions = {\r\n radius: MakerJs.round(arc.radius, accuracy),\r\n clockwise: reverse,\r\n large: Math.abs(endAngle - arc.startAngle) > 180,\r\n resolution: facetSizeToResolution(arc, facetSize)\r\n };\r\n var endPoint = MakerJs.point.rounded(link.endPoints[reverse ? 0 : 1], accuracy);\r\n append(wrap('.appendArc', JSON.stringify(endPoint) + ',' + JSON.stringify(arcOptions), true));\r\n };\r\n function append(s) {\r\n if (reverseTail) {\r\n tail = s + tail;\r\n }\r\n else {\r\n tail += s;\r\n }\r\n }\r\n for (var i = 0; i < chainContext.links.length; i++) {\r\n var link = chainContext.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = first ? beginMap[pathContext.type] : appendMap[pathContext.type];\r\n if (fn) {\r\n fn(pathContext, link);\r\n }\r\n if (exit) {\r\n return head;\r\n }\r\n first = false;\r\n }\r\n return head + tail + '.close().innerToCAG()';\r\n }\r\n /**\r\n * @private\r\n */\r\n function makePhasedCallback(originalCb, phaseStart, phaseSpan) {\r\n return function statusCallback(status) {\r\n originalCb && originalCb({ progress: phaseStart + status.progress * phaseSpan / 100 });\r\n };\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 2D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CAG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var cag = makerjs.exporter.toJscadCAG(CAG, model, {maxArcFacet: 1});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCAG(jscadCAG, modelToExport, jsCadCagOptions) {\r\n function chainToJscadCag(c, maxArcFacet) {\r\n var keyPoints = MakerJs.chain.toKeyPoints(c, maxArcFacet);\r\n keyPoints.push(keyPoints[0]);\r\n return jscadCAG.fromPoints(keyPoints);\r\n }\r\n function jscadCagUnion(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n function jscadCagSubtraction(minuend, subtrahend) {\r\n return minuend.subtract(subtrahend);\r\n }\r\n return convertChainsTo2D(chainToJscadCag, jscadCagUnion, jscadCagSubtraction, modelToExport, jsCadCagOptions);\r\n }\r\n exporter.toJscadCAG = toJscadCAG;\r\n /**\r\n * @private\r\n */\r\n function convertChainsTo2D(convertToT, union, subtraction, modelToExport, jsCadCagOptions) {\r\n if (jsCadCagOptions === void 0) { jsCadCagOptions = {}; }\r\n var adds = {};\r\n var status = { total: 0, complete: 0 };\r\n function unionize(phaseStart, phaseSpan, arr) {\r\n var result = arr.shift();\r\n arr.forEach(function (el) { return result = union(result, el); });\r\n status.complete++;\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: phaseStart + phaseSpan * status.complete / status.total });\r\n return result;\r\n }\r\n function subtractChains(layerId, cs) {\r\n var subtracts = [];\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n if (c.contains) {\r\n addChains(layerId, c.contains);\r\n }\r\n status.total++;\r\n subtracts.unshift(convertToT(c, jsCadCagOptions.maxArcFacet));\r\n });\r\n return subtracts;\r\n }\r\n function addChains(layerId, cs) {\r\n cs.forEach(function (c) {\r\n if (!c.endless)\r\n return;\r\n var add = { cag: convertToT(c, jsCadCagOptions.maxArcFacet), subtracts: [] };\r\n if (c.contains) {\r\n var subtracts = subtractChains(layerId, c.contains);\r\n if (subtracts.length > 0) {\r\n add.subtracts.push(subtracts);\r\n }\r\n }\r\n status.total++;\r\n if (!(layerId in adds)) {\r\n adds[layerId] = [];\r\n }\r\n adds[layerId].unshift(add);\r\n });\r\n }\r\n var options = {\r\n pointMatchingDistance: jsCadCagOptions.pointMatchingDistance,\r\n byLayers: jsCadCagOptions.byLayers,\r\n contain: true\r\n };\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 25 });\r\n var chainsResult = MakerJs.model.findChains(modelToExport, options);\r\n if (Array.isArray(chainsResult)) {\r\n addChains('', chainsResult);\r\n }\r\n else {\r\n for (var layerId in chainsResult) {\r\n addChains(layerId, chainsResult[layerId]);\r\n }\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 50 });\r\n var closedCount = 0;\r\n for (var layerId in adds) {\r\n closedCount += adds[layerId].length;\r\n }\r\n if (closedCount === 0) {\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n throw ('No closed geometries found.');\r\n }\r\n var resultMap = {};\r\n for (var layerId in adds) {\r\n var flatAdds = adds[layerId].map(function (add) {\r\n var result = add.cag;\r\n add.subtracts.forEach(function (subtract) {\r\n var union = unionize(50, 50, subtract);\r\n result = subtraction(result, union);\r\n });\r\n return result;\r\n });\r\n resultMap[layerId] = unionize(50, 50, flatAdds);\r\n }\r\n jsCadCagOptions.statusCallback && jsCadCagOptions.statusCallback({ progress: 100 });\r\n return options.byLayers ? resultMap : resultMap[''];\r\n }\r\n /**\r\n * Converts a model to a @jscad/csg object - 2D to 3D.\r\n *\r\n * Example:\r\n * ```\r\n * //First, use npm install @jscad/csg from the command line in your jscad project\r\n * //Create a CSG instance from a model.\r\n * var { CAG } = require('@jscad/csg');\r\n * var model = new makerjs.models.Ellipse(70, 40);\r\n * var csg = makerjs.exporter.toJscadCSG(CAG, model, {maxArcFacet: 1, extrude: 10});\r\n * ```\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns jscad CAG object in 2D, or a map (keyed by layer id) of jscad CAG objects - if options.byLayers is true.\r\n */\r\n function toJscadCSG(jscadCAG, modelToExport, options) {\r\n function to2D(opts) {\r\n return toJscadCAG(jscadCAG, modelToExport, opts);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag.extrude({ offset: [0, 0, extrude] });\r\n if (z) {\r\n csg = csg.translate([0, 0, z]);\r\n }\r\n return csg;\r\n }\r\n function union3D(augend, addend) {\r\n return augend.union(addend);\r\n }\r\n return convert2Dto3D(to2D, to3D, union3D, modelToExport, options);\r\n }\r\n exporter.toJscadCSG = toJscadCSG;\r\n /**\r\n * @private\r\n */\r\n function convert2Dto3D(to2D, to3D, union3D, modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n var originalCb = options.statusCallback;\r\n function getDefinedNumber(a, b) {\r\n if (MakerJs.isNumber(a))\r\n return a;\r\n return b;\r\n }\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(options, modelToExport.exporterOptions['toJscadCSG']);\r\n }\r\n options.byLayers = options.byLayers || (options.layerOptions && true);\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var result2D = to2D(options);\r\n var csgs = [];\r\n if (options.byLayers) {\r\n for (var layerId in result2D) {\r\n var layerOptions = options.layerOptions[layerId];\r\n var csg = to3D(result2D[layerId], layerOptions.extrude || options.extrude, getDefinedNumber(layerOptions.z, options.z));\r\n csgs.push(csg);\r\n }\r\n }\r\n else {\r\n var csg = to3D(result2D, options.extrude, options.z);\r\n csgs.push(csg);\r\n }\r\n options.statusCallback = makePhasedCallback(originalCb, 50, 100);\r\n var status = { total: csgs.length - 1, complete: 0 };\r\n var result = csgs.shift();\r\n csgs.forEach(function (el, i) {\r\n result = union3D(result, el);\r\n status.complete++;\r\n options.statusCallback({ progress: status.complete / status.total });\r\n });\r\n return result;\r\n }\r\n /**\r\n * Creates a string of JavaScript code for execution with a Jscad environment.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String of JavaScript containing a main() function for Jscad.\r\n */\r\n function toJscadScript(modelToExport, options) {\r\n if (options === void 0) { options = {}; }\r\n function _chainToJscadScript(c, maxArcFacet) {\r\n return wrap(chainToJscadScript(c, maxArcFacet, options.accuracy));\r\n }\r\n function scriptUnion(augend, addend) {\r\n return augend + (\".union(\" + addend + \")\");\r\n }\r\n function scriptSubtraction(minuend, subtrahend) {\r\n return minuend + (\".subtract(\" + subtrahend + \")\");\r\n }\r\n function to2D(opts) {\r\n return convertChainsTo2D(_chainToJscadScript, scriptUnion, scriptSubtraction, modelToExport, options);\r\n }\r\n function to3D(cag, extrude, z) {\r\n var csg = cag + (\".extrude({ offset: [0, 0, \" + extrude + \"] })\");\r\n if (z) {\r\n csg = csg + (\".translate([0, 0, \" + z + \"])\");\r\n }\r\n return csg;\r\n }\r\n function wrap(s) {\r\n return \"\" + nl + indent + s + nl;\r\n }\r\n var indent = new Array((options.indent || 0) + 1).join(' ');\r\n var nl = options.indent ? '\\n' : '';\r\n var result = convert2Dto3D(to2D, to3D, scriptUnion, modelToExport, options).trim();\r\n return \"function \" + (options.functionName || 'main') + \"(){\" + wrap(\"return \" + result + \";\") + \"}\" + nl;\r\n }\r\n exporter.toJscadScript = toJscadScript;\r\n /**\r\n * Exports a model in STL format - 2D to 3D.\r\n *\r\n * @param jscadCAG @jscad/csg CAG engine.\r\n * @param stlSerializer @jscad/stl-serializer (require('@jscad/stl-serializer')).\r\n * @param modelToExport Model object to export.\r\n * @param options Optional options object.\r\n * @param options.byLayers Optional flag to separate chains by layers.\r\n * @param options.pointMatchingDistance Optional max distance to consider two points as the same.\r\n * @param options.maxArcFacet The maximum length between points on an arc or circle.\r\n * @param options.statusCallback Optional callback function to get the percentage complete.\r\n * @param options.extrude Optional default extrusion distance.\r\n * @param options.layerOptions Optional object map of options per layer, keyed by layer name. Each value for a key is an object with 'extrude' and 'z' properties.\r\n * @returns String in STL ASCII format.\r\n */\r\n function toJscadSTL(CAG, stlSerializer, modelToExport, options) {\r\n var originalCb = options.statusCallback;\r\n options.statusCallback = makePhasedCallback(originalCb, 0, 50);\r\n var csg = toJscadCSG(CAG, modelToExport, options);\r\n return stlSerializer.serialize(csg, { binary: false, statusCallback: makePhasedCallback(originalCb, 50, 50) });\r\n }\r\n exporter.toJscadSTL = toJscadSTL;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * Injects drawing into a PDFKit document.\r\n *\r\n * @param modelToExport Model object to export.\r\n * @param options Export options object.\r\n * @returns String of PDF file contents.\r\n */\r\n function toPDF(doc, modelToExport, options) {\r\n if (!modelToExport)\r\n return;\r\n //fixup options\r\n var opts = {\r\n origin: [0, 0],\r\n stroke: \"#000\"\r\n };\r\n MakerJs.extendObject(opts, options);\r\n //try to get the unit system from the itemToExport\r\n var scale = 1;\r\n var exportUnits = opts.units || modelToExport.units;\r\n if (exportUnits) {\r\n //convert to inch\r\n scale = MakerJs.units.conversionScale(exportUnits, MakerJs.unitType.Inch);\r\n }\r\n else {\r\n //assume pixels, convert to inch\r\n scale = 1 / 100;\r\n }\r\n //from inch to PDF PPI\r\n scale *= 72;\r\n //TODO scale each element without a whole clone\r\n var scaledModel = MakerJs.model.scale(MakerJs.cloneObject(modelToExport), scale);\r\n var size = MakerJs.measure.modelExtents(scaledModel);\r\n var left = -size.low[0];\r\n var offset = [left, size.high[1]];\r\n offset = MakerJs.point.add(offset, options.origin);\r\n MakerJs.model.findChains(scaledModel, function (chains, loose, layer) {\r\n function single(walkedPath) {\r\n var pathData = exporter.pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n chains.map(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = exporter.chainToSVGPathData(chain, offset);\r\n doc.path(pathData).stroke(opts.stroke);\r\n }\r\n else {\r\n var walkedPath = chain.links[0].walkedPath;\r\n if (walkedPath.pathContext.type === MakerJs.pathType.Circle) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([walkedPath.pathContext], [walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(walkedPath.pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n //TODO use only chainToSVGPathData instead of circle, so that we can use fill\r\n doc.circle(fixedPath.origin[0], fixedPath.origin[1], walkedPath.pathContext.radius).stroke(opts.stroke);\r\n }\r\n else {\r\n single(walkedPath);\r\n }\r\n }\r\n });\r\n loose.map(single);\r\n }, { byLayers: false });\r\n }\r\n exporter.toPDF = toPDF;\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var exporter;\r\n (function (exporter) {\r\n /**\r\n * @private\r\n */\r\n var chainLinkToPathDataMap = {};\r\n chainLinkToPathDataMap[MakerJs.pathType.Arc] = function (arc, endPoint, reversed, d, accuracy) {\r\n d.push('A');\r\n svgArcData(d, arc.radius, endPoint, accuracy, MakerJs.angle.ofArcSpan(arc) > 180, reversed ? (arc.startAngle > arc.endAngle) : (arc.startAngle < arc.endAngle));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.Line] = function (line, endPoint, reversed, d, accuracy) {\r\n d.push('L', MakerJs.round(endPoint[0], accuracy), MakerJs.round(endPoint[1], accuracy));\r\n };\r\n chainLinkToPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, endPoint, reversed, d, accuracy) {\r\n svgBezierData(d, seed, accuracy, reversed);\r\n };\r\n /**\r\n * @private\r\n */\r\n function svgCoords(p) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n /**\r\n * @private\r\n */\r\n function correctArc(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n arc.startAngle = MakerJs.angle.noRevolutions(arc.startAngle);\r\n arc.endAngle = arc.startAngle + arcSpan;\r\n }\r\n /**\r\n * Convert a chain to SVG path data.\r\n *\r\n * @param chain Chain to convert.\r\n * @param offset IPoint relative offset point.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @returns String of SVG path data.\r\n */\r\n function chainToSVGPathData(chain, offset, accuracy) {\r\n function offsetPoint(p) {\r\n return MakerJs.point.add(p, offset);\r\n }\r\n var first = chain.links[0];\r\n var firstPoint = offsetPoint(svgCoords(first.endPoints[first.reversed ? 1 : 0]));\r\n var d = ['M', MakerJs.round(firstPoint[0], accuracy), MakerJs.round(firstPoint[1], accuracy)];\r\n for (var i = 0; i < chain.links.length; i++) {\r\n var link = chain.links[i];\r\n var pathContext = link.walkedPath.pathContext;\r\n var fn = chainLinkToPathDataMap[pathContext.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathContext], [link.walkedPath.offset], function () {\r\n fixedPath = MakerJs.path.mirror(pathContext, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, offset);\r\n fn(fixedPath, offsetPoint(svgCoords(link.endPoints[link.reversed ? 0 : 1])), link.reversed, d, accuracy);\r\n }\r\n }\r\n if (chain.endless) {\r\n d.push('Z');\r\n }\r\n return d.join(' ');\r\n }\r\n exporter.chainToSVGPathData = chainToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function startSvgPathData(start, d, accuracy) {\r\n return [\"M\", MakerJs.round(start[0], accuracy), MakerJs.round(start[1], accuracy)].concat(d);\r\n }\r\n /**\r\n * @private\r\n */\r\n var svgPathDataMap = {};\r\n svgPathDataMap[MakerJs.pathType.Line] = function (line, accuracy) {\r\n return startSvgPathData(line.origin, MakerJs.point.rounded(line.end, accuracy), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Circle] = function (circle, accuracy, clockwiseCircle) {\r\n return startSvgPathData(circle.origin, svgCircleData(circle.radius, accuracy, clockwiseCircle), accuracy);\r\n };\r\n svgPathDataMap[MakerJs.pathType.Arc] = function (arc, accuracy) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n return svgPathDataMap[MakerJs.pathType.Circle](arc, accuracy);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n return startSvgPathData(arcPoints[0], d, accuracy);\r\n }\r\n };\r\n svgPathDataMap[MakerJs.pathType.BezierSeed] = function (seed, accuracy) {\r\n var d = [];\r\n svgBezierData(d, seed, accuracy);\r\n return startSvgPathData(seed.origin, d, accuracy);\r\n };\r\n /**\r\n * Export a path to SVG path data.\r\n *\r\n * @param pathToExport IPath to export.\r\n * @param pathOffset IPoint relative offset of the path object.\r\n * @param exportOffset IPoint relative offset point of the export.\r\n * @param accuracy Optional accuracy of SVG path data.\r\n * @param clockwiseCircle Optional flag to use clockwise winding for circles.\r\n * @returns String of SVG path data.\r\n */\r\n function pathToSVGPathData(pathToExport, pathOffset, exportOffset, accuracy, clockwiseCircle) {\r\n var fn = svgPathDataMap[pathToExport.type];\r\n if (fn) {\r\n var fixedPath;\r\n MakerJs.path.moveTemporary([pathToExport], [pathOffset], function () {\r\n fixedPath = MakerJs.path.mirror(pathToExport, false, true);\r\n });\r\n MakerJs.path.moveRelative(fixedPath, exportOffset);\r\n var d = fn(fixedPath, accuracy, clockwiseCircle);\r\n return d.join(' ');\r\n }\r\n return '';\r\n }\r\n exporter.pathToSVGPathData = pathToSVGPathData;\r\n /**\r\n * @private\r\n */\r\n function getPathDataByLayer(modelToExport, offset, options, accuracy) {\r\n var pathDataByLayer = {};\r\n options.unifyBeziers = true;\r\n MakerJs.model.findChains(modelToExport, function (chains, loose, layer) {\r\n function single(walkedPath, clockwise) {\r\n var pathData = pathToSVGPathData(walkedPath.pathContext, walkedPath.offset, offset, accuracy, clockwise);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n pathDataByLayer[layer] = [];\r\n function doChains(cs, clockwise) {\r\n cs.forEach(function (chain) {\r\n if (chain.links.length > 1) {\r\n var pathData = chainToSVGPathData(chain, offset, accuracy);\r\n pathDataByLayer[layer].push(pathData);\r\n }\r\n else {\r\n single(chain.links[0].walkedPath, clockwise);\r\n }\r\n if (chain.contains) {\r\n doChains(chain.contains, !clockwise);\r\n }\r\n });\r\n }\r\n doChains(chains, true);\r\n loose.forEach(function (wp) { return single(wp); });\r\n }, options);\r\n return pathDataByLayer;\r\n }\r\n function toSVGPathData(modelToExport) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var options = {\r\n fillRule: 'evenodd'\r\n };\r\n if (typeof args[0] === 'boolean') {\r\n options.byLayers = args[0];\r\n options.origin = args[1];\r\n options.accuracy = args[2];\r\n }\r\n else if (MakerJs.isObject(args[0])) {\r\n MakerJs.extendObject(options, args[0]);\r\n }\r\n var findChainsOptions = {\r\n byLayers: options.byLayers,\r\n contain: false\r\n };\r\n if (options.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n if (!options.origin) {\r\n options.origin = [-size.low[0], size.high[1]];\r\n }\r\n var pathDataArrayByLayer = getPathDataByLayer(modelToExport, options.origin, findChainsOptions, options.accuracy);\r\n var pathDataStringByLayer = {};\r\n for (var layer in pathDataArrayByLayer) {\r\n pathDataStringByLayer[layer] = pathDataArrayByLayer[layer].join(' ');\r\n }\r\n return findChainsOptions.byLayers ? pathDataStringByLayer : pathDataStringByLayer[''];\r\n }\r\n exporter.toSVGPathData = toSVGPathData;\r\n /**\r\n * Renders an item in SVG markup.\r\n *\r\n * @param itemToExport Item to render: may be a path, an array of paths, or a model object.\r\n * @param options Rendering options object.\r\n * @param options.annotate Boolean to indicate that the id's of paths should be rendered as SVG text elements.\r\n * @param options.origin point object for the rendered reference origin.\r\n * @param options.scale Number to scale the SVG rendering.\r\n * @param options.stroke String color of the rendered paths.\r\n * @param options.strokeWidth String numeric width and optional units of the rendered paths.\r\n * @param options.units String of the unit system. May be omitted. See makerjs.unitType for possible values.\r\n * @param options.useSvgPathOnly Boolean to use SVG path elements instead of line, circle etc.\r\n * @returns String of XML / SVG content.\r\n */\r\n function toSVG(itemToExport, options) {\r\n function append(value, layer, forcePush) {\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (!forcePush && typeof layer == \"string\" && layer.length > 0) {\r\n if (!(layer in layers)) {\r\n layers[layer] = [];\r\n }\r\n layers[layer].push(value);\r\n }\r\n else {\r\n elements.push(value);\r\n }\r\n }\r\n function cssStyle(elOpts) {\r\n var a = [];\r\n function push(name, val) {\r\n if (val === undefined)\r\n return;\r\n a.push(name + ':' + val);\r\n }\r\n push('stroke', elOpts.stroke);\r\n push('stroke-width', elOpts.strokeWidth);\r\n push('fill', elOpts.fill);\r\n return a.join(';');\r\n }\r\n function addSvgAttrs(attrs, elOpts) {\r\n if (!elOpts)\r\n return;\r\n MakerJs.extendObject(attrs, {\r\n \"stroke\": elOpts.stroke,\r\n \"stroke-width\": elOpts.strokeWidth,\r\n \"fill\": elOpts.fill,\r\n \"style\": elOpts.cssStyle || cssStyle(elOpts)\r\n });\r\n }\r\n function colorLayerOptions(layer) {\r\n if (opts.layerOptions && opts.layerOptions[layer])\r\n return opts.layerOptions[layer];\r\n if (layer in exporter.colors) {\r\n return {\r\n stroke: layer\r\n };\r\n }\r\n }\r\n function createElement(tagname, attrs, layer, innerText, forcePush) {\r\n if (innerText === void 0) { innerText = null; }\r\n if (forcePush === void 0) { forcePush = false; }\r\n if (tagname !== 'text') {\r\n addSvgAttrs(attrs, colorLayerOptions(layer));\r\n }\r\n if (!opts.scalingStroke) {\r\n attrs['vector-effect'] = 'non-scaling-stroke';\r\n }\r\n var tag = new exporter.XmlTag(tagname, attrs);\r\n tag.closingTags = opts.closingTags;\r\n if (innerText) {\r\n tag.innerText = innerText;\r\n }\r\n append(tag.toString(), layer, forcePush);\r\n }\r\n function fixPoint(pointToFix) {\r\n //in DXF Y increases upward. in SVG, Y increases downward\r\n var pointMirroredY = svgCoords(pointToFix);\r\n return MakerJs.point.scale(pointMirroredY, opts.scale);\r\n }\r\n function fixPath(pathToFix, origin) {\r\n //mirror creates a copy, so we don't modify the original\r\n var mirrorY = MakerJs.path.mirror(pathToFix, false, true);\r\n return MakerJs.path.moveRelative(MakerJs.path.scale(mirrorY, opts.scale), origin);\r\n }\r\n //fixup options\r\n var opts = {\r\n accuracy: .001,\r\n annotate: false,\r\n origin: null,\r\n scale: 1,\r\n stroke: \"#000\",\r\n strokeLineCap: \"round\",\r\n strokeWidth: '0.25mm',\r\n fill: \"none\",\r\n fillRule: \"evenodd\",\r\n fontSize: '9pt',\r\n useSvgPathOnly: true,\r\n viewBox: true\r\n };\r\n MakerJs.extendObject(opts, options);\r\n var modelToExport;\r\n var itemToExportIsModel = MakerJs.isModel(itemToExport);\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n if (modelToExport.exporterOptions) {\r\n MakerJs.extendObject(opts, modelToExport.exporterOptions['toSVG']);\r\n }\r\n }\r\n var elements = [];\r\n var layers = {};\r\n //measure the item to move it into svg area\r\n if (itemToExportIsModel) {\r\n modelToExport = itemToExport;\r\n }\r\n else if (Array.isArray(itemToExport)) {\r\n //issue: this won't handle an array of models\r\n var pathMap = {};\r\n itemToExport.forEach(function (p, i) { pathMap[i] = p; });\r\n modelToExport = { paths: pathMap };\r\n }\r\n else if (MakerJs.isPath(itemToExport)) {\r\n modelToExport = { paths: { modelToMeasure: itemToExport } };\r\n }\r\n var size = MakerJs.measure.modelExtents(modelToExport);\r\n //try to get the unit system from the itemToExport\r\n if (!opts.units) {\r\n var unitSystem = exporter.tryGetModelUnits(itemToExport);\r\n if (unitSystem) {\r\n opts.units = unitSystem;\r\n }\r\n }\r\n //convert unit system (if it exists) into SVG's units. scale if necessary.\r\n var useSvgUnit = exporter.svgUnit[opts.units];\r\n if (useSvgUnit && opts.viewBox) {\r\n opts.scale *= useSvgUnit.scaleConversion;\r\n }\r\n if (size && !opts.origin) {\r\n var left = -size.low[0] * opts.scale;\r\n opts.origin = [left, size.high[1] * opts.scale];\r\n }\r\n //also pass back to options parameter\r\n MakerJs.extendObject(options, opts);\r\n //begin svg output\r\n var svgAttrs;\r\n if (size && opts.viewBox) {\r\n var width = MakerJs.round(size.width * opts.scale, opts.accuracy);\r\n var height = MakerJs.round(size.height * opts.scale, opts.accuracy);\r\n var viewBox = [0, 0, width, height];\r\n var unit = useSvgUnit ? useSvgUnit.svgUnitType : '';\r\n svgAttrs = {\r\n width: width + unit,\r\n height: height + unit,\r\n viewBox: viewBox.join(' ')\r\n };\r\n }\r\n var svgTag = new exporter.XmlTag('svg', MakerJs.extendObject(svgAttrs || {}, opts.svgAttrs));\r\n append(svgTag.getOpeningTag(false));\r\n var groupAttrs = {\r\n id: 'svgGroup',\r\n \"stroke-linecap\": opts.strokeLineCap,\r\n \"fill-rule\": opts.fillRule,\r\n \"font-size\": opts.fontSize\r\n };\r\n addSvgAttrs(groupAttrs, opts);\r\n var svgGroup = new exporter.XmlTag('g', groupAttrs);\r\n append(svgGroup.getOpeningTag(false));\r\n if (opts.useSvgPathOnly) {\r\n var findChainsOptions = {\r\n byLayers: true\r\n };\r\n if (opts.fillRule === 'nonzero') {\r\n findChainsOptions.contain = {\r\n alternateDirection: true\r\n };\r\n }\r\n var pathDataByLayer = getPathDataByLayer(modelToExport, opts.origin, findChainsOptions, opts.accuracy);\r\n for (var layerId1 in pathDataByLayer) {\r\n var pathData = pathDataByLayer[layerId1].join(' ');\r\n var attrs = { \"d\": pathData };\r\n if (layerId1.length > 0) {\r\n attrs[\"id\"] = layerId1;\r\n }\r\n createElement(\"path\", attrs, layerId1, null, true);\r\n }\r\n }\r\n else {\r\n function drawText(id, textPoint, layer) {\r\n createElement(\"text\", {\r\n \"id\": id + \"_text\",\r\n \"x\": MakerJs.round(textPoint[0], opts.accuracy),\r\n \"y\": MakerJs.round(textPoint[1], opts.accuracy)\r\n }, layer, id);\r\n }\r\n function drawPath(id, x, y, d, layer, route, textPoint, annotate, flow) {\r\n createElement(\"path\", {\r\n \"id\": id,\r\n \"data-route\": route,\r\n \"d\": [\"M\", MakerJs.round(x, opts.accuracy), MakerJs.round(y, opts.accuracy)].concat(d).join(\" \")\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, textPoint, layer);\r\n }\r\n }\r\n function circleInPaths(id, center, radius, layer, route, annotate, flow) {\r\n var d = svgCircleData(radius, opts.accuracy);\r\n drawPath(id, center[0], center[1], d, layer, route, center, annotate, flow);\r\n }\r\n var map = {};\r\n map[MakerJs.pathType.Line] = function (id, line, layer, className, route, annotate, flow) {\r\n var start = line.origin;\r\n var end = line.end;\r\n createElement(\"line\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"x1\": MakerJs.round(start[0], opts.accuracy),\r\n \"y1\": MakerJs.round(start[1], opts.accuracy),\r\n \"x2\": MakerJs.round(end[0], opts.accuracy),\r\n \"y2\": MakerJs.round(end[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, MakerJs.point.middle(line), layer);\r\n }\r\n if (flow) {\r\n addFlowMarks(flow, layer, line.origin, line.end, MakerJs.angle.ofLineInDegrees(line));\r\n }\r\n };\r\n map[MakerJs.pathType.Circle] = function (id, circle, layer, className, route, annotate, flow) {\r\n var center = circle.origin;\r\n createElement(\"circle\", {\r\n \"id\": id,\r\n \"class\": className,\r\n \"data-route\": route,\r\n \"r\": circle.radius,\r\n \"cx\": MakerJs.round(center[0], opts.accuracy),\r\n \"cy\": MakerJs.round(center[1], opts.accuracy)\r\n }, layer);\r\n if (annotate) {\r\n drawText(id, center, layer);\r\n }\r\n };\r\n map[MakerJs.pathType.Arc] = function (id, arc, layer, className, route, annotate, flow) {\r\n correctArc(arc);\r\n var arcPoints = MakerJs.point.fromArc(arc);\r\n if (MakerJs.measure.isPointEqual(arcPoints[0], arcPoints[1])) {\r\n circleInPaths(id, arc.origin, arc.radius, layer, route, annotate, flow);\r\n }\r\n else {\r\n var d = ['A'];\r\n svgArcData(d, arc.radius, arcPoints[1], opts.accuracy, MakerJs.angle.ofArcSpan(arc) > 180, arc.startAngle > arc.endAngle);\r\n drawPath(id, arcPoints[0][0], arcPoints[0][1], d, layer, route, MakerJs.point.middle(arc), annotate, flow);\r\n if (flow) {\r\n addFlowMarks(flow, layer, arcPoints[1], arcPoints[0], MakerJs.angle.noRevolutions(arc.startAngle - 90));\r\n }\r\n }\r\n };\r\n map[MakerJs.pathType.BezierSeed] = function (id, seed, layer, className, route, annotate, flow) {\r\n var d = [];\r\n svgBezierData(d, seed, opts.accuracy);\r\n drawPath(id, seed.origin[0], seed.origin[1], d, layer, route, MakerJs.point.middle(seed), annotate, flow);\r\n };\r\n function addFlowMarks(flow, layer, origin, end, endAngle) {\r\n var className = 'flow';\r\n //origin: add a circle\r\n map[MakerJs.pathType.Circle]('', new MakerJs.paths.Circle(origin, flow.size / 2), layer, className, null, false, null);\r\n //end: add an arrow\r\n var arrowEnd = [-1 * flow.size, flow.size / 2];\r\n var arrowLines = [arrowEnd, MakerJs.point.mirror(arrowEnd, false, true)].map(function (p) { return new MakerJs.paths.Line(MakerJs.point.add(MakerJs.point.rotate(p, endAngle), end), end); });\r\n arrowLines.forEach(function (a) { return map[MakerJs.pathType.Line]('', a, layer, className, null, false, null); });\r\n }\r\n function beginModel(id, modelContext) {\r\n modelGroup.attrs = { id: id };\r\n append(modelGroup.getOpeningTag(false), modelContext.layer);\r\n }\r\n function endModel(modelContext) {\r\n append(modelGroup.getClosingTag(), modelContext.layer);\r\n }\r\n var modelGroup = new exporter.XmlTag('g');\r\n var walkOptions = {\r\n beforeChildWalk: function (walkedModel) {\r\n beginModel(walkedModel.childId, walkedModel.childModel);\r\n return true;\r\n },\r\n onPath: function (walkedPath) {\r\n var fn = map[walkedPath.pathContext.type];\r\n if (fn) {\r\n var offset = MakerJs.point.add(fixPoint(walkedPath.offset), opts.origin);\r\n fn(walkedPath.pathId, fixPath(walkedPath.pathContext, offset), walkedPath.layer, null, walkedPath.route, opts.annotate, opts.flow);\r\n }\r\n },\r\n afterChildWalk: function (walkedModel) {\r\n endModel(walkedModel.childModel);\r\n }\r\n };\r\n beginModel('0', modelToExport);\r\n MakerJs.model.walk(modelToExport, walkOptions);\r\n //export layers as groups\r\n for (var layerId2 in layers) {\r\n var layerGroup = new exporter.XmlTag('g', { id: layerId2 });\r\n addSvgAttrs(layerGroup.attrs, colorLayerOptions(layerId2));\r\n for (var i = 0; i < layers[layerId2].length; i++) {\r\n layerGroup.innerText += layers[layerId2][i];\r\n }\r\n layerGroup.innerTextEscaped = true;\r\n append(layerGroup.toString());\r\n }\r\n }\r\n append(svgGroup.getClosingTag());\r\n append(svgTag.getClosingTag());\r\n return elements.join('');\r\n }\r\n exporter.toSVG = toSVG;\r\n /**\r\n * @private\r\n */\r\n function svgCircleData(radius, accuracy, clockwiseCircle) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var d = ['m', -r, 0];\r\n function halfCircle(sign) {\r\n d.push('a');\r\n svgArcData(d, r, [2 * r * sign, 0], accuracy, false, !clockwiseCircle);\r\n }\r\n halfCircle(1);\r\n halfCircle(-1);\r\n d.push('z');\r\n return d;\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgBezierData(d, seed, accuracy, reversed) {\r\n if (seed.controls.length === 1) {\r\n d.push('Q', MakerJs.round(seed.controls[0][0], accuracy), MakerJs.round(seed.controls[0][1], accuracy));\r\n }\r\n else {\r\n var controls = reversed ? [seed.controls[1], seed.controls[0]] : seed.controls;\r\n d.push('C', MakerJs.round(controls[0][0], accuracy), MakerJs.round(controls[0][1], accuracy), MakerJs.round(controls[1][0], accuracy), MakerJs.round(controls[1][1], accuracy));\r\n }\r\n var final = reversed ? seed.origin : seed.end;\r\n d.push(MakerJs.round(final[0], accuracy), MakerJs.round(final[1], accuracy));\r\n }\r\n /**\r\n * @private\r\n */\r\n function svgArcData(d, radius, endPoint, accuracy, largeArc, increasing) {\r\n var r = MakerJs.round(radius, accuracy);\r\n var end = endPoint;\r\n d.push(r, r);\r\n d.push(0); //0 = x-axis rotation\r\n d.push(largeArc ? 1 : 0); //large arc=1, small arc=0\r\n d.push(increasing ? 0 : 1); //sweep-flag 0=increasing, 1=decreasing \r\n d.push(MakerJs.round(end[0], accuracy), MakerJs.round(end[1], accuracy));\r\n }\r\n /**\r\n * Map of MakerJs unit system to SVG unit system\r\n */\r\n exporter.svgUnit = {};\r\n //SVG Coordinate Systems, Transformations and Units documentation:\r\n //http://www.w3.org/TR/SVG/coords.html\r\n //The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.\r\n exporter.svgUnit[MakerJs.unitType.Inch] = { svgUnitType: \"in\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Millimeter] = { svgUnitType: \"mm\", scaleConversion: 1 };\r\n exporter.svgUnit[MakerJs.unitType.Centimeter] = { svgUnitType: \"cm\", scaleConversion: 1 };\r\n //Add conversions for all unitTypes\r\n exporter.svgUnit[MakerJs.unitType.Foot] = { svgUnitType: \"in\", scaleConversion: 12 };\r\n exporter.svgUnit[MakerJs.unitType.Meter] = { svgUnitType: \"cm\", scaleConversion: 100 };\r\n })(exporter = MakerJs.exporter || (MakerJs.exporter = {}));\r\n})(MakerJs || (MakerJs = {}));\r\n(function (MakerJs) {\r\n var importer;\r\n (function (importer) {\r\n /**\r\n * Create a model from SVG path data.\r\n *\r\n * @param pathData SVG path data.\r\n * @param options ISVGImportOptions object.\r\n * @param options.bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns An IModel object.\r\n */\r\n function fromSVGPathData(pathData, options) {\r\n if (options === void 0) { options = {}; }\r\n var result = {};\r\n function addPath(p) {\r\n if (!result.paths) {\r\n result.paths = {};\r\n }\r\n result.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!result.models) {\r\n result.models = {};\r\n }\r\n result.models['p_' + ++pathCount] = m;\r\n }\r\n function getPoint(cmd, offset) {\r\n if (offset === void 0) { offset = 0; }\r\n var p = MakerJs.point.mirror([cmd.data[0 + offset], cmd.data[1 + offset]], false, true);\r\n if (cmd.absolute) {\r\n return p;\r\n }\r\n else {\r\n return MakerJs.point.add(p, cmd.from);\r\n }\r\n }\r\n function lineTo(cmd, end) {\r\n if (!MakerJs.measure.isPointEqual(cmd.from, end)) {\r\n addPath(new MakerJs.paths.Line(cmd.from, end));\r\n }\r\n return end;\r\n }\r\n var map = {};\r\n map['M'] = function (cmd) {\r\n firstPoint = getPoint(cmd);\r\n return firstPoint;\r\n };\r\n map['Z'] = function (cmd) {\r\n return lineTo(cmd, firstPoint);\r\n };\r\n map['H'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n if (cmd.absolute) {\r\n end[0] = cmd.data[0];\r\n }\r\n else {\r\n end[0] += cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['V'] = function (cmd) {\r\n var end = MakerJs.point.clone(cmd.from);\r\n //subtract to mirror on y axis: SVG coords\r\n if (cmd.absolute) {\r\n end[1] = -cmd.data[0];\r\n }\r\n else {\r\n end[1] -= cmd.data[0];\r\n }\r\n return lineTo(cmd, end);\r\n };\r\n map['L'] = function (cmd) {\r\n var end = getPoint(cmd);\r\n return lineTo(cmd, end);\r\n };\r\n map['A'] = function (cmd) {\r\n var rx = cmd.data[0];\r\n var ry = cmd.data[1];\r\n var rotation = cmd.data[2];\r\n var large = cmd.data[3] === 1;\r\n var decreasing = cmd.data[4] === 1;\r\n var end = getPoint(cmd, 5);\r\n var elliptic = rx !== ry;\r\n //first, rotate so we are dealing with a zero angle x-axis\r\n var xAxis = new MakerJs.paths.Line(cmd.from, MakerJs.point.rotate(end, rotation, cmd.from));\r\n //next, un-distort any ellipse back into a circle in terms of x axis\r\n if (elliptic) {\r\n xAxis = MakerJs.path.distort(xAxis, 1, rx / ry);\r\n }\r\n //now create an arc, making sure we use the large and decreasing flags\r\n var arc = new MakerJs.paths.Arc(xAxis.origin, xAxis.end, rx, large, decreasing);\r\n if (elliptic) {\r\n //scale up if radius was insufficient.\r\n if (rx < arc.radius) {\r\n var scaleUp = arc.radius / rx;\r\n rx *= scaleUp;\r\n ry *= scaleUp;\r\n }\r\n //create an elliptical arc, this will re-distort\r\n var e = new MakerJs.models.EllipticArc(arc, 1, ry / rx, options.bezierAccuracy);\r\n //un-rotate back to where it should be.\r\n MakerJs.model.rotate(e, -rotation, cmd.from);\r\n addModel(e);\r\n }\r\n else {\r\n //just use the arc\r\n //un-rotate back to where it should be.\r\n MakerJs.path.rotate(arc, -rotation, cmd.from);\r\n addPath(arc);\r\n }\r\n return end;\r\n };\r\n map['C'] = function (cmd) {\r\n var control1 = getPoint(cmd, 0);\r\n var control2 = getPoint(cmd, 2);\r\n var end = getPoint(cmd, 4);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['S'] = function (cmd) {\r\n var control1;\r\n var prevControl2;\r\n if (cmd.prev.command === 'C') {\r\n prevControl2 = getPoint(cmd.prev, 2);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'S') {\r\n prevControl2 = getPoint(cmd.prev, 0);\r\n control1 = MakerJs.point.rotate(prevControl2, 180, cmd.from);\r\n }\r\n else {\r\n control1 = cmd.from;\r\n }\r\n var control2 = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control1, control2, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['Q'] = function (cmd) {\r\n var control = getPoint(cmd, 0);\r\n var end = getPoint(cmd, 2);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n map['T'] = function (cmd) {\r\n var control;\r\n var prevControl;\r\n if (cmd.prev.command === 'Q') {\r\n prevControl = getPoint(cmd.prev, 0);\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else if (cmd.prev.command === 'T') {\r\n prevControl = getPoint(cmd.prev, 2); //see below *\r\n control = MakerJs.point.rotate(prevControl, 180, cmd.from);\r\n }\r\n else {\r\n control = cmd.from;\r\n }\r\n //* save the control point in the data list, will be accessible from index 2\r\n var p = MakerJs.point.mirror(control, false, true);\r\n cmd.data.push.apply(cmd.data, p);\r\n var end = getPoint(cmd, 0);\r\n addModel(new MakerJs.models.BezierCurve(cmd.from, control, end, options.bezierAccuracy));\r\n return end;\r\n };\r\n var firstPoint = [0, 0];\r\n var currPoint = [0, 0];\r\n var pathCount = 0;\r\n var prevCommand;\r\n var regexpCommands = /([achlmqstvz])([0-9e\\.,\\+-\\s]*)/ig;\r\n var commandMatches;\r\n while ((commandMatches = regexpCommands.exec(pathData)) !== null) {\r\n if (commandMatches.index === regexpCommands.lastIndex) {\r\n regexpCommands.lastIndex++;\r\n }\r\n var command = commandMatches[1]; //0 = command and data, 1 = command, 2 = data\r\n var dataString = commandMatches[2];\r\n var currCmd = {\r\n command: command.toUpperCase(),\r\n data: [],\r\n from: currPoint,\r\n prev: prevCommand\r\n };\r\n if (command === currCmd.command) {\r\n currCmd.absolute = true;\r\n }\r\n currCmd.data = importer.parseNumericList(dataString);\r\n var fn = map[currCmd.command];\r\n if (fn) {\r\n currPoint = fn(currCmd);\r\n }\r\n prevCommand = currCmd;\r\n }\r\n return result;\r\n }\r\n importer.fromSVGPathData = fromSVGPathData;\r\n })(importer = MakerJs.importer || (MakerJs.importer = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var layout;\r\n (function (layout) {\r\n /**\r\n * @private\r\n */\r\n function getChildPlacement(parentModel, baseline) {\r\n //measure everything and cache the results\r\n var atlas = new MakerJs.measure.Atlas(parentModel);\r\n var measureParent = MakerJs.measure.modelExtents(parentModel, atlas);\r\n //measure height of the model from the baseline 0\r\n var parentTop = measureParent.high[1];\r\n var cpa = [];\r\n var xMap = {};\r\n var walkOptions = {\r\n beforeChildWalk: function (context) {\r\n var child = context.childModel;\r\n //get cached measurement of the child\r\n var m = atlas.modelMap[context.routeKey];\r\n if (!m)\r\n return;\r\n var childMeasure = MakerJs.measure.augment(m);\r\n //set a new origin at the x-center and y-baseline of the child\r\n MakerJs.model.originate(child, [childMeasure.center[0], parentTop * baseline]);\r\n //get the x-center of the child\r\n var x = child.origin[0] - measureParent.low[0];\r\n xMap[context.childId] = x;\r\n //get the x-center of the child as a percentage\r\n var xRatio = x / measureParent.width;\r\n cpa.push({ childId: context.childId, xRatio: xRatio });\r\n //do not walk the grandchildren. This is only for immediate children of the parentModel.\r\n return false;\r\n }\r\n };\r\n MakerJs.model.walk(parentModel, walkOptions);\r\n cpa.sort(function (a, b) { return a.xRatio - b.xRatio; });\r\n var first = cpa[0];\r\n var last = cpa[cpa.length - 1];\r\n var min = first.xRatio;\r\n var max = last.xRatio;\r\n var span = max - min;\r\n cpa.forEach(function (cp) { return cp.xRatio = (cp.xRatio - min) / span; });\r\n return {\r\n cpa: cpa,\r\n firstX: xMap[first.childId],\r\n lastX: measureParent.width - xMap[last.childId]\r\n };\r\n }\r\n /**\r\n * @private\r\n */\r\n function moveAndRotate(parentModel, cpa, rotate) {\r\n cpa.forEach(function (cp) {\r\n var child = parentModel.models[cp.childId];\r\n //move the child to the new location\r\n child.origin = cp.origin;\r\n //rotate the child\r\n if (rotate)\r\n MakerJs.model.rotate(child, cp.angle, cp.origin);\r\n });\r\n }\r\n /**\r\n * @private\r\n */\r\n var onPathMap = {};\r\n onPathMap[MakerJs.pathType.Arc] = function (arc, reversed, cpa) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n cpa.forEach(function (p) { return p.angle = reversed ? arc.endAngle - p.xRatio * arcSpan - 90 : arc.startAngle + p.xRatio * arcSpan + 90; });\r\n };\r\n onPathMap[MakerJs.pathType.Line] = function (line, reversed, cpa) {\r\n var lineAngle = MakerJs.angle.ofLineInDegrees(line);\r\n cpa.forEach(function (p) { return p.angle = lineAngle; });\r\n };\r\n /**\r\n * Layout the children of a model along a path.\r\n * The x-position of each child will be projected onto the path so that the proportion between children is maintained.\r\n * Each child will be rotated such that it will be perpendicular to the path at the child's x-center.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onPath The path on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the path. Default is zero.\r\n * @param reversed Flag to travel along the path in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the path. Default is false.\r\n * @param rotate Flag to rotate the child to perpendicular. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnPath(parentModel, onPath, baseline, reversed, contain, rotate) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotate === void 0) { rotate = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chosenPath = onPath;\r\n if (contain) {\r\n //see if we need to clip\r\n var onPathLength = MakerJs.measure.pathLength(onPath);\r\n if (result.firstX + result.lastX < onPathLength) {\r\n chosenPath = MakerJs.path.clone(onPath);\r\n MakerJs.path.alterLength(chosenPath, -result.firstX, true);\r\n MakerJs.path.alterLength(chosenPath, -result.lastX);\r\n }\r\n }\r\n cpa.forEach(function (p) { return p.origin = MakerJs.point.middle(chosenPath, reversed ? 1 - p.xRatio : p.xRatio); });\r\n var fn = onPathMap[chosenPath.type];\r\n if (fn) {\r\n fn(chosenPath, reversed, cpa);\r\n }\r\n moveAndRotate(parentModel, cpa, rotate);\r\n return parentModel;\r\n }\r\n layout.childrenOnPath = childrenOnPath;\r\n /**\r\n * @private\r\n */\r\n function miterAngles(points, offsetAngle) {\r\n var arc = new MakerJs.paths.Arc([0, 0], 0, 0, 0);\r\n return points.map(function (p, i) {\r\n var a;\r\n if (i === 0) {\r\n a = MakerJs.angle.ofPointInDegrees(p, points[i + 1]) + 90;\r\n }\r\n else if (i === points.length - 1) {\r\n a = MakerJs.angle.ofPointInDegrees(points[i - 1], p) + 90;\r\n }\r\n else {\r\n arc.origin = p;\r\n arc.startAngle = MakerJs.angle.ofPointInDegrees(p, points[i + 1]);\r\n arc.endAngle = MakerJs.angle.ofPointInDegrees(p, points[i - 1]);\r\n a = MakerJs.angle.ofArcMiddle(arc);\r\n }\r\n return a + offsetAngle;\r\n });\r\n }\r\n /**\r\n * Layout the children of a model along a chain.\r\n * The x-position of each child will be projected onto the chain so that the proportion between children is maintained.\r\n * The projected positions of the children will become an array of points that approximate the chain.\r\n * Each child will be rotated such that it will be mitered according to the vertex angles formed by this series of points.\r\n *\r\n * @param parentModel The model containing children to lay out.\r\n * @param onChain The chain on which to lay out.\r\n * @param baseline Numeric percentage value of vertical displacement from the chain. Default is zero.\r\n * @param reversed Flag to travel along the chain in reverse. Default is false.\r\n * @param contain Flag to contain the children layout within the length of the chain. Default is false.\r\n * @param rotate Flag to rotate the child to mitered angle. Default is true.\r\n * @returns The parentModel, for cascading.\r\n */\r\n function childrenOnChain(parentModel, onChain, baseline, reversed, contain, rotated) {\r\n if (baseline === void 0) { baseline = 0; }\r\n if (reversed === void 0) { reversed = false; }\r\n if (contain === void 0) { contain = false; }\r\n if (rotated === void 0) { rotated = true; }\r\n var result = getChildPlacement(parentModel, baseline);\r\n var cpa = result.cpa;\r\n var chainLength = onChain.pathLength;\r\n if (contain)\r\n chainLength -= result.firstX + result.lastX;\r\n var absolutes = cpa.map(function (cp) { return (reversed ? 1 - cp.xRatio : cp.xRatio) * chainLength; });\r\n var relatives;\r\n if (reversed)\r\n absolutes.reverse();\r\n relatives = absolutes.map(function (ab, i) { return Math.abs(ab - (i == 0 ? 0 : absolutes[i - 1])); });\r\n if (contain) {\r\n relatives[0] += reversed ? result.lastX : result.firstX;\r\n }\r\n else {\r\n relatives.shift();\r\n }\r\n //chain.toPoints always follows the chain in its order, from beginning to end. This is why we needed to contort the points input\r\n var points = MakerJs.chain.toPoints(onChain, relatives);\r\n if (points.length < cpa.length) {\r\n //add last point of chain, since our distances exceeded the chain\r\n var endLink = onChain.links[onChain.links.length - 1];\r\n points.push(endLink.endPoints[endLink.reversed ? 0 : 1]);\r\n }\r\n if (contain)\r\n points.shift(); //delete the first point which is the beginning of the chain\r\n if (reversed)\r\n points.reverse();\r\n var angles = miterAngles(points, -90);\r\n cpa.forEach(function (cp, i) {\r\n cp.angle = angles[i];\r\n cp.origin = points[i];\r\n });\r\n moveAndRotate(parentModel, cpa, rotated);\r\n return parentModel;\r\n }\r\n layout.childrenOnChain = childrenOnChain;\r\n /**\r\n * Layout clones in a radial format.\r\n *\r\n * Example:\r\n * ```\r\n * //daisy petals\r\n * var makerjs = require('makerjs');\r\n *\r\n * var belt = new makerjs.models.Belt(5, 50, 20);\r\n *\r\n * makerjs.model.move(belt, [25, 0]);\r\n *\r\n * var petals = makerjs.layout.cloneToRadial(belt, 8, 45);\r\n *\r\n * document.write(makerjs.exporter.toSVG(petals));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the radial result.\r\n * @param angleInDegrees angle of rotation between clones..\r\n * @returns A new model with clones in a radial format.\r\n */\r\n function cloneToRadial(itemToClone, count, angleInDegrees, rotationOrigin) {\r\n var result = {};\r\n var add;\r\n var rotateFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n add = result.models = {};\r\n rotateFn = MakerJs.model.rotate;\r\n }\r\n else {\r\n add = result.paths = {};\r\n rotateFn = MakerJs.path.rotate;\r\n }\r\n for (var i = 0; i < count; i++) {\r\n add[i] = rotateFn(MakerJs.cloneObject(itemToClone), i * angleInDegrees, rotationOrigin);\r\n }\r\n return result;\r\n }\r\n layout.cloneToRadial = cloneToRadial;\r\n /**\r\n * @private\r\n */\r\n function cloneTo(dimension, itemToClone, count, margin) {\r\n var result = {};\r\n var add;\r\n var measureFn;\r\n var moveFn;\r\n if (MakerJs.isModel(itemToClone)) {\r\n measureFn = MakerJs.measure.modelExtents;\r\n add = result.models = {};\r\n moveFn = MakerJs.model.move;\r\n }\r\n else {\r\n measureFn = MakerJs.measure.pathExtents;\r\n add = result.paths = {};\r\n moveFn = MakerJs.path.move;\r\n }\r\n var m = measureFn(itemToClone);\r\n var size = m.high[dimension] - m.low[dimension];\r\n for (var i = 0; i < count; i++) {\r\n var origin = [0, 0];\r\n origin[dimension] = i * (size + margin);\r\n add[i] = moveFn(MakerJs.cloneObject(itemToClone), origin);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a column format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grooves for a finger joint\r\n * var m = require('makerjs');\r\n *\r\n * var dogbone = new m.models.Dogbone(50, 20, 2, -1, false);\r\n *\r\n * var grooves = m.layout.cloneToColumn(dogbone, 5, 20);\r\n *\r\n * document.write(m.exporter.toSVG(grooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the column.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a column.\r\n */\r\n function cloneToColumn(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(1, itemToClone, count, margin);\r\n }\r\n layout.cloneToColumn = cloneToColumn;\r\n /**\r\n * Layout clones in a row format.\r\n *\r\n * Example:\r\n * ```\r\n * //Tongue and grooves for a box joint\r\n * var m = require('makerjs');\r\n * var tongueWidth = 60;\r\n * var grooveWidth = 50;\r\n * var grooveDepth = 30;\r\n * var groove = new m.models.Dogbone(grooveWidth, grooveDepth, 5, 0, true);\r\n *\r\n * groove.paths['leftTongue'] = new m.paths.Line([-tongueWidth / 2, 0], [0, 0]);\r\n * groove.paths['rightTongue'] = new m.paths.Line([grooveWidth, 0], [grooveWidth + tongueWidth / 2, 0]);\r\n *\r\n * var tongueAndGrooves = m.layout.cloneToRow(groove, 3);\r\n *\r\n * document.write(m.exporter.toSVG(tongueAndGrooves));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param count Number of clones in the row.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a row.\r\n */\r\n function cloneToRow(itemToClone, count, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n return cloneTo(0, itemToClone, count, margin);\r\n }\r\n layout.cloneToRow = cloneToRow;\r\n /**\r\n * Layout clones in a grid format.\r\n *\r\n * Example:\r\n * ```\r\n * //Grid of squares\r\n * var m = require('makerjs');\r\n * var square = new m.models.Square(43);\r\n * var grid = m.layout.cloneToGrid(square, 5, 5, 7);\r\n * document.write(m.exporter.toSVG(grid));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the grid.\r\n * @param yCount Number of rows in the grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a grid layout.\r\n */\r\n function cloneToGrid(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n return cloneToColumn(cloneToRow(itemToClone, xCount, margins[0]), yCount, margins[1]);\r\n }\r\n layout.cloneToGrid = cloneToGrid;\r\n /**\r\n * @private\r\n */\r\n function getMargins(margin) {\r\n if (Array.isArray(margin)) {\r\n return margin;\r\n }\r\n else {\r\n return [margin, margin];\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n function cloneToAlternatingRows(itemToClone, xCount, yCount, spacingFn) {\r\n var modelToMeasure;\r\n if (MakerJs.isModel(itemToClone)) {\r\n modelToMeasure = itemToClone;\r\n }\r\n else {\r\n modelToMeasure = { paths: { \"0\": itemToClone } };\r\n }\r\n var spacing = spacingFn(modelToMeasure);\r\n var result = { models: {} };\r\n for (var i = 0; i < yCount; i++) {\r\n var i2 = i % 2;\r\n result.models[i] = MakerJs.model.move(cloneToRow(itemToClone, xCount + i2, spacing.xMargin), [i2 * spacing.x, i * spacing.y]);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Layout clones in a brick format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Brick wall\r\n * var m = require('makerjs');\r\n * var brick = new m.models.RoundRectangle(50, 30, 4);\r\n * var wall = m.layout.cloneToBrick(brick, 8, 6, 3);\r\n * document.write(m.exporter.toSVG(wall));\r\n * ```\r\n *\r\n * ```\r\n * //Fish scales\r\n * var m = require('makerjs');\r\n * var arc = new m.paths.Arc([0, 0], 50, 20, 160);\r\n * var scales = m.layout.cloneToBrick(arc, 8, 20);\r\n * document.write(m.exporter.toSVG(scales));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the brick grid.\r\n * @param yCount Number of rows in the brick grid.\r\n * @param margin Optional numeric distance between each clone. Can also be a 2 dimensional array of numbers, to specify distances in x and y dimensions.\r\n * @returns A new model with clones in a brick layout.\r\n */\r\n function cloneToBrick(itemToClone, xCount, yCount, margin) {\r\n var margins = getMargins(margin);\r\n function spacing(modelToMeasure) {\r\n var m = MakerJs.measure.modelExtents(modelToMeasure);\r\n var xMargin = margins[0] || 0;\r\n var yMargin = margins[1] || 0;\r\n return { x: (m.width + xMargin) / -2, y: m.height + yMargin, xMargin: xMargin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToBrick = cloneToBrick;\r\n /**\r\n * Layout clones in a honeycomb format. Alternating rows will have an additional item in each row.\r\n *\r\n * Examples:\r\n * ```\r\n * //Honeycomb\r\n * var m = require('makerjs');\r\n * var hex = new m.models.Polygon(6, 50, 30);\r\n * var pattern = m.layout.cloneToHoneycomb(hex, 8, 9, 10);\r\n * document.write(m.exporter.toSVG(pattern));\r\n * ```\r\n *\r\n * @param itemToClone: Either a model or a path object.\r\n * @param xCount Number of columns in the honeycomb grid.\r\n * @param yCount Number of rows in the honeycomb grid.\r\n * @param margin Optional distance between each clone.\r\n * @returns A new model with clones in a honeycomb layout.\r\n */\r\n function cloneToHoneycomb(itemToClone, xCount, yCount, margin) {\r\n if (margin === void 0) { margin = 0; }\r\n function spacing(modelToMeasure) {\r\n var hex = MakerJs.measure.boundingHexagon(modelToMeasure);\r\n var width = 2 * MakerJs.solvers.equilateralAltitude(hex.radius);\r\n var s = width + margin;\r\n return { x: s / -2, y: MakerJs.solvers.equilateralAltitude(s), xMargin: margin };\r\n }\r\n return cloneToAlternatingRows(itemToClone, xCount, yCount, spacing);\r\n }\r\n layout.cloneToHoneycomb = cloneToHoneycomb;\r\n })(layout = MakerJs.layout || (MakerJs.layout = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n var hasLib = false;\r\n /**\r\n * @private\r\n */\r\n function ensureBezierLib() {\r\n if (hasLib)\r\n return;\r\n try {\r\n var lib = Bezier.prototype;\r\n hasLib = true;\r\n }\r\n catch (e) {\r\n throw \"Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag.\";\r\n }\r\n }\r\n /**\r\n * @private\r\n */\r\n var scratch;\r\n /**\r\n * @private\r\n */\r\n function getScratch(seed) {\r\n var points = [seed.origin];\r\n points.push.apply(points, seed.controls);\r\n points.push(seed.end);\r\n var bezierJsPoints = points.map(function (p) {\r\n var bp = {\r\n x: p[0], y: p[1]\r\n };\r\n return bp;\r\n });\r\n if (!scratch) {\r\n ensureBezierLib();\r\n scratch = new Bezier(bezierJsPoints);\r\n }\r\n else {\r\n //invoke the constructor on the same object\r\n Bezier.apply(scratch, bezierJsPoints);\r\n }\r\n return scratch;\r\n }\r\n /**\r\n * @private\r\n */\r\n function BezierToSeed(b, range) {\r\n var points = b.points.map(getIPoint);\r\n var seed = new BezierSeed(points);\r\n if (range) {\r\n seed.parentRange = range;\r\n }\r\n return seed;\r\n }\r\n /**\r\n * @private\r\n */\r\n function seedToBezier(seed) {\r\n var coords = [];\r\n coords.push.apply(coords, seed.origin);\r\n coords.push.apply(coords, seed.controls[0]);\r\n if (seed.controls.length > 1) {\r\n coords.push.apply(coords, seed.controls[1]);\r\n }\r\n coords.push.apply(coords, seed.end);\r\n ensureBezierLib();\r\n return new Bezier(coords);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getExtrema(b) {\r\n var extrema = b.extrema().values\r\n .map(function (m) { return MakerJs.round(m); })\r\n .filter(function (value, index, self) { return self.indexOf(value) === index; })\r\n .sort();\r\n if (extrema.length === 0)\r\n return [0, 1];\r\n //ensure leading zero\r\n if (extrema[0] !== 0) {\r\n extrema.unshift(0);\r\n }\r\n //ensure ending 1\r\n if (extrema[extrema.length - 1] !== 1) {\r\n extrema.push(1);\r\n }\r\n return extrema;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getIPoint(p) {\r\n return [p.x, p.y];\r\n }\r\n /**\r\n * @private\r\n */\r\n var TPoint = /** @class */ (function () {\r\n function TPoint(b, t, offset) {\r\n this.t = t;\r\n this.point = MakerJs.point.add(getIPoint(b.get(t)), offset);\r\n }\r\n return TPoint;\r\n }());\r\n /**\r\n * @private\r\n */\r\n function getError(b, startT, endT, arc, arcReversed) {\r\n var tSpan = endT - startT;\r\n function m(ratio) {\r\n var t = startT + tSpan * ratio;\r\n var bp = getIPoint(b.get(t));\r\n var ap = MakerJs.point.middle(arc, arcReversed ? 1 - ratio : ratio);\r\n return MakerJs.measure.pointDistance(ap, bp);\r\n }\r\n return m(0.25) + m(0.75);\r\n }\r\n /**\r\n * @private\r\n */\r\n function getLargestArc(b, startT, endT, accuracy) {\r\n var arc, lastGoodArc;\r\n var start = new TPoint(b, startT);\r\n var end = new TPoint(b, endT);\r\n var upper = end;\r\n var lower = start;\r\n var count = 0;\r\n var test = upper;\r\n var reversed;\r\n while (count < 100) {\r\n var middle = getIPoint(b.get((start.t + test.t) / 2));\r\n //if the 3 points are linear, this may throw\r\n try {\r\n arc = new MakerJs.paths.Arc(start.point, middle, test.point);\r\n }\r\n catch (e) {\r\n if (lastGoodArc) {\r\n return lastGoodArc;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n //only need to test once to see if this arc is polar / clockwise\r\n if (reversed === undefined) {\r\n reversed = MakerJs.measure.isPointEqual(start.point, MakerJs.point.fromAngleOnCircle(arc.endAngle, arc));\r\n }\r\n //now we have a valid arc, measure the error.\r\n var error = getError(b, startT, test.t, arc, reversed);\r\n //if error is within accuracy, this becomes the lower\r\n if (error <= accuracy) {\r\n arc.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n lower = test;\r\n lastGoodArc = arc;\r\n }\r\n else {\r\n upper = test;\r\n }\r\n //exit if lower is the end\r\n if (lower.t === upper.t || (lastGoodArc && (lastGoodArc !== arc) && (MakerJs.angle.ofArcSpan(arc) - MakerJs.angle.ofArcSpan(lastGoodArc)) < .5)) {\r\n return lastGoodArc;\r\n }\r\n count++;\r\n test = new TPoint(b, (lower.t + upper.t) / 2);\r\n }\r\n //arc failed, so return a line\r\n var line = new MakerJs.paths.Line(start.point, test.point);\r\n line.bezierData = {\r\n startT: startT,\r\n endT: test.t\r\n };\r\n return line;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getArcs(bc, b, accuracy, startT, endT, base) {\r\n var added = 0;\r\n var arc;\r\n while (startT < endT) {\r\n arc = getLargestArc(b, startT, endT, accuracy);\r\n //add an arc\r\n startT = arc.bezierData.endT;\r\n var len = MakerJs.measure.pathLength(arc);\r\n if (len < .0001) {\r\n continue;\r\n }\r\n bc.paths[arc.type + '_' + (base + added)] = arc;\r\n added++;\r\n }\r\n return added;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getActualBezierRange(curve, arc, endpoints, offset) {\r\n var b = getScratch(curve.seed);\r\n var tPoints = [arc.bezierData.startT, arc.bezierData.endT].map(function (t) { return new TPoint(b, t, offset); });\r\n var ends = endpoints.slice();\r\n //clipped arcs will still have endpoints closer to the original endpoints\r\n var endpointDistancetoStart = ends.map(function (e) { return MakerJs.measure.pointDistance(e, tPoints[0].point); });\r\n if (endpointDistancetoStart[0] > endpointDistancetoStart[1])\r\n ends.reverse();\r\n for (var i = 2; i--;) {\r\n if (!MakerJs.measure.isPointEqual(ends[i], tPoints[i].point)) {\r\n return null;\r\n }\r\n }\r\n return arc.bezierData;\r\n }\r\n /**\r\n * @private\r\n */\r\n function getChainBezierRange(curve, c, layer, addToLayer) {\r\n var endLinks = [c.links[0], c.links[c.links.length - 1]];\r\n if (endLinks[0].walkedPath.pathContext.bezierData.startT > endLinks[1].walkedPath.pathContext.bezierData.startT) {\r\n MakerJs.chain.reverse(c);\r\n endLinks.reverse();\r\n }\r\n var actualBezierRanges = endLinks.map(function (endLink) { return getActualBezierRange(curve, endLink.walkedPath.pathContext, endLink.endPoints, endLink.walkedPath.offset); });\r\n var result = {\r\n startT: actualBezierRanges[0] ? actualBezierRanges[0].startT : null,\r\n endT: actualBezierRanges[1] ? actualBezierRanges[1].endT : null\r\n };\r\n if (result.startT !== null && result.endT !== null) {\r\n return result;\r\n }\r\n else if (c.links.length > 2) {\r\n if (result.startT === null) {\r\n //exclude the first from the chain\r\n addToLayer(c.links[0].walkedPath.pathContext, layer, true);\r\n result.startT = c.links[1].walkedPath.pathContext.bezierData.startT;\r\n }\r\n if (result.endT === null) {\r\n //exclude the last from the chain\r\n addToLayer(c.links[c.links.length - 1].walkedPath.pathContext, layer, true);\r\n result.endT = c.links[c.links.length - 2].walkedPath.pathContext.bezierData.endT;\r\n }\r\n return result;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @private\r\n * Class for bezier seed.\r\n */\r\n var BezierSeed = /** @class */ (function () {\r\n function BezierSeed() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = MakerJs.pathType.BezierSeed;\r\n switch (args.length) {\r\n case 1://point array\r\n var points = args[0];\r\n this.origin = points[0];\r\n if (points.length === 3) {\r\n this.controls = [points[1]];\r\n this.end = points[2];\r\n }\r\n else if (points.length === 4) {\r\n this.controls = [points[1], points[2]];\r\n this.end = points[3];\r\n }\r\n else {\r\n this.end = points[1];\r\n }\r\n break;\r\n case 3://quadratic or cubic\r\n if (Array.isArray(args[1])) {\r\n this.controls = args[1];\r\n }\r\n else {\r\n this.controls = [args[1]];\r\n }\r\n this.end = args[2];\r\n break;\r\n case 4://cubic params\r\n this.controls = [args[1], args[2]];\r\n this.end = args[3];\r\n break;\r\n }\r\n }\r\n return BezierSeed;\r\n }());\r\n var BezierCurve = /** @class */ (function () {\r\n function BezierCurve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.type = BezierCurve.typeName;\r\n var isArrayArg0 = Array.isArray(args[0]);\r\n switch (args.length) {\r\n case 2:\r\n if (isArrayArg0) {\r\n this.accuracy = args[1];\r\n }\r\n else {\r\n //seed\r\n this.seed = args[0];\r\n this.accuracy = args[1];\r\n break;\r\n }\r\n //fall through to point array\r\n case 1://point array or seed\r\n if (isArrayArg0) {\r\n var points = args[0];\r\n this.seed = new BezierSeed(points);\r\n }\r\n else {\r\n this.seed = args[0];\r\n }\r\n break;\r\n default:\r\n switch (args.length) {\r\n case 4:\r\n if (MakerJs.isPoint(args[3])) {\r\n this.seed = new BezierSeed(args);\r\n break;\r\n }\r\n else {\r\n this.accuracy = args[3];\r\n //fall through\r\n }\r\n case 3:\r\n if (isArrayArg0) {\r\n this.seed = new BezierSeed(args.slice(0, 3));\r\n }\r\n break;\r\n case 5:\r\n this.accuracy = args[4];\r\n this.seed = new BezierSeed(args.slice(0, 4));\r\n break;\r\n }\r\n break;\r\n }\r\n this.paths = {};\r\n if (MakerJs.measure.isBezierSeedLinear(this.seed)) {\r\n //use a line and exit\r\n var line = new MakerJs.paths.Line(MakerJs.point.clone(this.seed.origin), MakerJs.point.clone(this.seed.end));\r\n line.bezierData = {\r\n startT: 0,\r\n endT: 1\r\n };\r\n this.paths = {\r\n \"0\": line\r\n };\r\n return;\r\n }\r\n var b = seedToBezier(this.seed);\r\n var extrema = getExtrema(b);\r\n this.paths = {};\r\n //use arcs\r\n if (!this.accuracy) {\r\n //get a default accuracy relative to the size of the bezier\r\n var len = b.length();\r\n //set the default to be a combination of fast rendering and good smoothing.\r\n this.accuracy = len / 100;\r\n }\r\n var count = 0;\r\n for (var i = 1; i < extrema.length; i++) {\r\n var extremaSpan = extrema[i] - extrema[i - 1];\r\n count += getArcs(this, b, this.accuracy * extremaSpan, extrema[i - 1], extrema[i], count);\r\n }\r\n }\r\n BezierCurve.getBezierSeeds = function (curve, options) {\r\n if (options === void 0) { options = {}; }\r\n options.shallow = true;\r\n options.unifyBeziers = false;\r\n var seedsByLayer = {};\r\n var addToLayer = function (pathToAdd, layer, clone) {\r\n if (clone === void 0) { clone = false; }\r\n if (!seedsByLayer[layer]) {\r\n seedsByLayer[layer] = [];\r\n }\r\n seedsByLayer[layer].push(clone ? MakerJs.path.clone(pathToAdd) : pathToAdd);\r\n };\r\n MakerJs.model.findChains(curve, function (chains, loose, layer) {\r\n chains.forEach(function (c) {\r\n var range = getChainBezierRange(curve, c, layer, addToLayer);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n c.links.forEach(function (link) { return addToLayer(link.walkedPath.pathContext, layer, true); });\r\n }\r\n });\r\n loose.forEach(function (wp) {\r\n if (wp.pathContext.type === MakerJs.pathType.Line) {\r\n //bezier is linear\r\n return addToLayer(wp.pathContext, layer, true);\r\n }\r\n var range = getActualBezierRange(curve, wp.pathContext, MakerJs.point.fromPathEnds(wp.pathContext), wp.offset);\r\n if (range) {\r\n var b = getScratch(curve.seed);\r\n var piece = b.split(range.startT, range.endT);\r\n addToLayer(BezierToSeed(piece), layer);\r\n }\r\n else {\r\n addToLayer(wp.pathContext, layer, true);\r\n }\r\n });\r\n }, options);\r\n if (options.byLayers) {\r\n return seedsByLayer;\r\n }\r\n else {\r\n return seedsByLayer[''];\r\n }\r\n };\r\n BezierCurve.computeLength = function (seed) {\r\n var b = seedToBezier(seed);\r\n return b.length();\r\n };\r\n BezierCurve.computePoint = function (seed, t) {\r\n var s = getScratch(seed);\r\n var computedPoint = s.compute(t);\r\n return getIPoint(computedPoint);\r\n };\r\n BezierCurve.typeName = 'BezierCurve';\r\n return BezierCurve;\r\n }());\r\n models.BezierCurve = BezierCurve;\r\n BezierCurve.metaParameters = [\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[100, 0], [-80, -60], [100, 220], [100, 60]],\r\n [[0, 0], [100, 0], [100, 100]],\r\n [[0, 0], [20, 0], [80, 100], [100, 100]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n * Our maximum circular arc span for accurate representation by a cubic curve.\r\n */\r\n var maxBezierArcspan = 45;\r\n /**\r\n * @private\r\n */\r\n function controlYForCircularCubic(arcSpanInRadians) {\r\n //from http://pomax.github.io/bezierinfo/#circles_cubic\r\n return 4 * (Math.tan(arcSpanInRadians / 4) / 3);\r\n }\r\n /**\r\n * @private\r\n */\r\n function controlPointsForCircularCubic(arc) {\r\n var arcSpan = MakerJs.angle.ofArcSpan(arc);\r\n //compute y for radius of 1\r\n var y = controlYForCircularCubic(MakerJs.angle.toRadians(arcSpan));\r\n //multiply by radius\r\n var c1 = [arc.radius, arc.radius * y];\r\n //get second control point by mirroring, then rotating\r\n var c2 = MakerJs.point.rotate(MakerJs.point.mirror(c1, false, true), arcSpan, [0, 0]);\r\n //rotate again to start angle, then offset by arc's origin\r\n return [c1, c2].map(function (p) { return MakerJs.point.add(arc.origin, MakerJs.point.rotate(p, arc.startAngle, [0, 0])); });\r\n }\r\n /**\r\n * @private\r\n */\r\n function bezierSeedFromArc(arc) {\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n if (span <= 90) {\r\n var endPoints = MakerJs.point.fromPathEnds(arc);\r\n var controls = controlPointsForCircularCubic(arc);\r\n return {\r\n type: MakerJs.pathType.BezierSeed,\r\n origin: endPoints[0],\r\n controls: controls,\r\n end: endPoints[1]\r\n };\r\n }\r\n return null;\r\n }\r\n var Ellipse = /** @class */ (function () {\r\n function Ellipse() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.models = {};\r\n var n = 360 / maxBezierArcspan;\r\n var accuracy;\r\n var isPointArgs0 = MakerJs.isPoint(args[0]);\r\n var realArgs = function (numArgs) {\r\n switch (numArgs) {\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n _this.origin = args[0];\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n _this.origin = args[0];\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n _this.origin = [args[0], args[1]];\r\n break;\r\n }\r\n //construct a bezier approximation for an arc with radius of 1.\r\n var a = 360 / n;\r\n var arc = new MakerJs.paths.Arc([0, 0], 1, 0, a);\r\n //clone and rotate to complete a circle\r\n for (var i = 0; i < n; i++) {\r\n var seed = bezierSeedFromArc(arc);\r\n switch (numArgs) {\r\n case 1:\r\n //radius\r\n seed = MakerJs.path.scale(seed, args[0]);\r\n break;\r\n case 2:\r\n if (isPointArgs0) {\r\n //origin, radius\r\n seed = MakerJs.path.scale(seed, args[1]);\r\n }\r\n else {\r\n //rx, ry\r\n seed = MakerJs.path.distort(seed, args[0], args[1]);\r\n }\r\n break;\r\n case 3:\r\n //origin, rx, ry\r\n seed = MakerJs.path.distort(seed, args[1], args[2]);\r\n break;\r\n case 4:\r\n //cx, cy, rx, ry\r\n seed = MakerJs.path.distort(seed, args[2], args[3]);\r\n break;\r\n }\r\n _this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n arc.startAngle += a;\r\n arc.endAngle += a;\r\n }\r\n };\r\n switch (args.length) {\r\n case 2:\r\n realArgs(2);\r\n break;\r\n case 3:\r\n if (isPointArgs0) {\r\n realArgs(3);\r\n }\r\n else {\r\n accuracy = args[2];\r\n realArgs(2);\r\n }\r\n break;\r\n case 4:\r\n if (isPointArgs0) {\r\n accuracy = args[3];\r\n realArgs(3);\r\n }\r\n else {\r\n realArgs(4);\r\n }\r\n break;\r\n case 5:\r\n accuracy = args[4];\r\n realArgs(4);\r\n break;\r\n }\r\n }\r\n return Ellipse;\r\n }());\r\n models.Ellipse = Ellipse;\r\n Ellipse.metaParameters = [\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n var EllipticArc = /** @class */ (function () {\r\n function EllipticArc() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.models = {};\r\n var arc;\r\n var accuracy;\r\n var distortX;\r\n var distortY;\r\n if (MakerJs.isPathArc(args[0])) {\r\n arc = args[0];\r\n distortX = args[1];\r\n distortY = args[2];\r\n accuracy = args[3];\r\n }\r\n else {\r\n arc = new MakerJs.paths.Arc([0, 0], 1, args[0], args[1]);\r\n distortX = args[2];\r\n distortY = args[3];\r\n accuracy = args[4];\r\n }\r\n var span = MakerJs.angle.ofArcSpan(arc);\r\n //split into equal chunks, no larger than max chunk size\r\n var count = Math.ceil(span / maxBezierArcspan);\r\n var subSpan = span / count;\r\n var subArc = MakerJs.path.clone(arc);\r\n for (var i = 0; i < count; i++) {\r\n subArc.startAngle = arc.startAngle + (i * subSpan);\r\n subArc.endAngle = subArc.startAngle + subSpan;\r\n var seed = bezierSeedFromArc(subArc);\r\n seed = MakerJs.path.distort(seed, distortX, distortY);\r\n this.models['Curve_' + (1 + i)] = new models.BezierCurve(seed, accuracy);\r\n }\r\n }\r\n return EllipticArc;\r\n }());\r\n models.EllipticArc = EllipticArc;\r\n EllipticArc.metaParameters = [\r\n { title: \"startAngle\", type: \"range\", min: 0, max: 90, value: 0 },\r\n { title: \"endAngle\", type: \"range\", min: 90, max: 360, value: 180 },\r\n { title: \"radiusX\", type: \"range\", min: 1, max: 50, value: 50 },\r\n { title: \"radiusY\", type: \"range\", min: 1, max: 50, value: 25 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n /**\r\n * @private\r\n */\r\n function getPoints(arg) {\r\n var coords;\r\n if (Array.isArray(arg)) {\r\n if (MakerJs.isPoint(arg[0])) {\r\n return arg;\r\n }\r\n coords = arg;\r\n }\r\n else {\r\n coords = MakerJs.importer.parseNumericList(arg);\r\n }\r\n var points = [];\r\n for (var i = 0; i < coords.length; i += 2) {\r\n points.push([coords[i], coords[i + 1]]);\r\n }\r\n return points;\r\n }\r\n var ConnectTheDots = /** @class */ (function () {\r\n function ConnectTheDots() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = this;\r\n this.paths = {};\r\n var isClosed;\r\n var points;\r\n switch (args.length) {\r\n case 1:\r\n isClosed = true;\r\n points = getPoints(args[0]);\r\n break;\r\n case 2:\r\n isClosed = args[0];\r\n points = getPoints(args[1]);\r\n break;\r\n }\r\n var connect = function (a, b, skipZeroDistance) {\r\n if (skipZeroDistance === void 0) { skipZeroDistance = false; }\r\n if (skipZeroDistance && MakerJs.measure.pointDistance(points[a], points[b]) == 0)\r\n return;\r\n _this.paths[\"ShapeLine\" + i] = new MakerJs.paths.Line(points[a], points[b]);\r\n };\r\n for (var i = 1; i < points.length; i++) {\r\n connect(i - 1, i);\r\n }\r\n if (isClosed && points.length > 2) {\r\n connect(points.length - 1, 0, true);\r\n }\r\n }\r\n return ConnectTheDots;\r\n }());\r\n models.ConnectTheDots = ConnectTheDots;\r\n ConnectTheDots.metaParameters = [\r\n { title: \"closed\", type: \"bool\", value: true },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [40, 40], [60, 20], [100, 100], [60, 60], [40, 80]],\r\n [[0, 0], [100, 0], [50, 87]],\r\n [-10, 0, 10, 0, 0, 20],\r\n '-10 0 10 0 0 20',\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Polygon = /** @class */ (function () {\r\n function Polygon(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n this.paths = {};\r\n this.paths = new models.ConnectTheDots(true, Polygon.getPoints(numberOfSides, radius, firstCornerAngleInDegrees, circumscribed)).paths;\r\n }\r\n Polygon.circumscribedRadius = function (radius, angleInRadians) {\r\n return radius / Math.cos(angleInRadians / 2);\r\n };\r\n Polygon.getPoints = function (numberOfSides, radius, firstCornerAngleInDegrees, circumscribed) {\r\n if (firstCornerAngleInDegrees === void 0) { firstCornerAngleInDegrees = 0; }\r\n if (circumscribed === void 0) { circumscribed = false; }\r\n var points = [];\r\n var a1 = MakerJs.angle.toRadians(firstCornerAngleInDegrees);\r\n var a = 2 * Math.PI / numberOfSides;\r\n if (circumscribed) {\r\n radius = Polygon.circumscribedRadius(radius, a);\r\n }\r\n for (var i = 0; i < numberOfSides; i++) {\r\n points.push(MakerJs.point.fromPolar(a * i + a1, radius));\r\n }\r\n return points;\r\n };\r\n return Polygon;\r\n }());\r\n models.Polygon = Polygon;\r\n Polygon.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 6 },\r\n { title: \"radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 },\r\n { title: \"radius on flats (vs radius on vertexes)\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Holes = /** @class */ (function () {\r\n /**\r\n * Create an array of circles of the same radius from an array of center points.\r\n *\r\n * Example:\r\n * ```\r\n * //Create some holes from an array of points\r\n * var makerjs = require('makerjs');\r\n * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]);\r\n * var svg = makerjs.exporter.toSVG(model);\r\n * document.write(svg);\r\n * ```\r\n *\r\n * @param holeRadius Hole radius.\r\n * @param points Array of points for origin of each hole.\r\n * @param ids Optional array of corresponding path ids for the holes.\r\n */\r\n function Holes(holeRadius, points, ids) {\r\n this.paths = {};\r\n for (var i = 0; i < points.length; i++) {\r\n var id = ids ? ids[i] : i.toString();\r\n this.paths[id] = new MakerJs.paths.Circle(points[i], holeRadius);\r\n }\r\n }\r\n return Holes;\r\n }());\r\n models.Holes = Holes;\r\n Holes.metaParameters = [\r\n { title: \"holeRadius\", type: \"range\", min: .1, max: 10, step: .1, value: 1 },\r\n {\r\n title: \"points\", type: \"select\", value: [\r\n [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80]],\r\n [[0, 0], [0, 25], [0, 50], [0, 75], [0, 100], [25, 50], [50, 50], [75, 50], [100, 100], [100, 75], [100, 50], [100, 25], [100, 0]]\r\n ]\r\n }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltCircle = /** @class */ (function () {\r\n function BoltCircle(boltRadius, holeRadius, boltCount, firstBoltAngleInDegrees) {\r\n if (firstBoltAngleInDegrees === void 0) { firstBoltAngleInDegrees = 0; }\r\n this.paths = {};\r\n var points = models.Polygon.getPoints(boltCount, boltRadius, firstBoltAngleInDegrees);\r\n var ids = points.map(function (p, i) { return \"bolt \" + i; });\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltCircle;\r\n }());\r\n models.BoltCircle = BoltCircle;\r\n BoltCircle.metaParameters = [\r\n { title: \"bolt circle radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 },\r\n { title: \"bolt count\", type: \"range\", min: 3, max: 24, value: 12 },\r\n { title: \"offset angle\", type: \"range\", min: 0, max: 180, value: 0 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var BoltRectangle = /** @class */ (function () {\r\n function BoltRectangle(width, height, holeRadius) {\r\n this.paths = {};\r\n var points = [[0, 0], [width, 0], [width, height], [0, height]];\r\n var ids = [\"BottomLeft_bolt\", \"BottomRight_bolt\", \"TopRight_bolt\", \"TopLeft_bolt\"];\r\n this.paths = new models.Holes(holeRadius, points, ids).paths;\r\n }\r\n return BoltRectangle;\r\n }());\r\n models.BoltRectangle = BoltRectangle;\r\n BoltRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"hole radius\", type: \"range\", min: 1, max: 50, value: 5 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dogbone = /** @class */ (function () {\r\n /**\r\n * Create a dogbone from width, height, corner radius, style, and bottomless flag.\r\n *\r\n * Example:\r\n * ```\r\n * var d = new makerjs.models.Dogbone(50, 100, 5);\r\n * ```\r\n *\r\n * @param width Width of the rectangle.\r\n * @param height Height of the rectangle.\r\n * @param radius Corner radius.\r\n * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal.\r\n * @param bottomless Optional flag to omit the bottom line and bottom corners (default false).\r\n */\r\n function Dogbone(width, height, radius, style, bottomless) {\r\n if (style === void 0) { style = 0; }\r\n if (bottomless === void 0) { bottomless = false; }\r\n this.paths = {};\r\n var maxSide = Math.min(height, width) / 2;\r\n var maxRadius;\r\n switch (style) {\r\n case -1: //horizontal\r\n case 1://vertical\r\n maxRadius = maxSide / 2;\r\n break;\r\n case 0: //equal\r\n default:\r\n maxRadius = maxSide * Math.SQRT2 / 2;\r\n break;\r\n }\r\n radius = Math.min(radius, maxRadius);\r\n var ax;\r\n var ay;\r\n var lx;\r\n var ly;\r\n var apexes;\r\n switch (style) {\r\n case -1:\r\n ax = 0;\r\n ay = radius;\r\n lx = 0;\r\n ly = radius * 2;\r\n apexes = [180, 0, 0, 180];\r\n break;\r\n case 1:\r\n ax = radius;\r\n ay = 0;\r\n lx = radius * 2;\r\n ly = 0;\r\n apexes = [270, 270, 90, 90];\r\n break;\r\n case 0:\r\n default:\r\n ax = ay = radius / Math.SQRT2;\r\n lx = ly = ax * 2;\r\n apexes = [225, 315, 45, 135];\r\n break;\r\n }\r\n if (bottomless) {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, 0], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, 0], [width, height - ly]);\r\n }\r\n else {\r\n this.paths['Left'] = new MakerJs.paths.Line([0, ly], [0, height - ly]);\r\n this.paths['Right'] = new MakerJs.paths.Line([width, ly], [width, height - ly]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([lx, 0], [width - lx, 0]);\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([ax, ay], radius, apexes[0] - 90, apexes[0] + 90);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([width - ax, ay], radius, apexes[1] - 90, apexes[1] + 90);\r\n }\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([width - ax, height - ay], radius, apexes[2] - 90, apexes[2] + 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([ax, height - ay], radius, apexes[3] - 90, apexes[3] + 90);\r\n this.paths['Top'] = new MakerJs.paths.Line([lx, height], [width - lx, height]);\r\n }\r\n return Dogbone;\r\n }());\r\n models.Dogbone = Dogbone;\r\n Dogbone.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 5 },\r\n { title: \"style\", type: \"select\", value: [0, 1, -1] },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Dome = /** @class */ (function () {\r\n function Dome(width, height, radius, bottomless) {\r\n this.paths = {};\r\n var w2 = width / 2;\r\n if (radius < 0)\r\n radius = 0;\r\n if (radius === void 0)\r\n radius = w2;\r\n radius = Math.min(radius, w2);\r\n radius = Math.min(radius, height);\r\n var wt = Math.max(w2 - radius, 0);\r\n var hr = Math.max(height - radius, 0);\r\n if (!bottomless) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([-w2, 0], [w2, 0]);\r\n }\r\n if (hr) {\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([-w2, 0], [-w2, hr]);\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([w2, 0], [w2, hr]);\r\n }\r\n if (radius > 0) {\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([-wt, hr], radius, 90, 180);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wt, hr], radius, 0, 90);\r\n }\r\n if (wt) {\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([-wt, height], [wt, height]);\r\n }\r\n }\r\n return Dome;\r\n }());\r\n models.Dome = Dome;\r\n Dome.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 25 },\r\n { title: \"bottomless\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var RoundRectangle = /** @class */ (function () {\r\n function RoundRectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n var radius = 0;\r\n switch (args.length) {\r\n case 3:\r\n width = args[0];\r\n height = args[1];\r\n radius = args[2];\r\n break;\r\n case 2:\r\n radius = args[1];\r\n //fall through to 1\r\n case 1:\r\n var m = MakerJs.measure.modelExtents(args[0]);\r\n this.origin = MakerJs.point.subtract(m.low, [radius, radius]);\r\n width = m.high[0] - m.low[0] + 2 * radius;\r\n height = m.high[1] - m.low[1] + 2 * radius;\r\n break;\r\n }\r\n var maxRadius = Math.min(height, width) / 2;\r\n radius = Math.min(radius, maxRadius);\r\n var wr = width - radius;\r\n var hr = height - radius;\r\n if (radius > 0) {\r\n this.paths[\"BottomLeft\"] = new MakerJs.paths.Arc([radius, radius], radius, 180, 270);\r\n this.paths[\"BottomRight\"] = new MakerJs.paths.Arc([wr, radius], radius, 270, 0);\r\n this.paths[\"TopRight\"] = new MakerJs.paths.Arc([wr, hr], radius, 0, 90);\r\n this.paths[\"TopLeft\"] = new MakerJs.paths.Arc([radius, hr], radius, 90, 180);\r\n }\r\n if (wr - radius > 0) {\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line([radius, 0], [wr, 0]);\r\n this.paths[\"Top\"] = new MakerJs.paths.Line([wr, height], [radius, height]);\r\n }\r\n if (hr - radius > 0) {\r\n this.paths[\"Right\"] = new MakerJs.paths.Line([width, radius], [width, hr]);\r\n this.paths[\"Left\"] = new MakerJs.paths.Line([0, hr], [0, radius]);\r\n }\r\n }\r\n return RoundRectangle;\r\n }());\r\n models.RoundRectangle = RoundRectangle;\r\n RoundRectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 50, value: 11 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Oval = /** @class */ (function () {\r\n function Oval(width, height) {\r\n this.paths = {};\r\n this.paths = new models.RoundRectangle(width, height, Math.min(height / 2, width / 2)).paths;\r\n }\r\n return Oval;\r\n }());\r\n models.Oval = Oval;\r\n Oval.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var OvalArc = /** @class */ (function () {\r\n function OvalArc(startAngle, endAngle, sweepRadius, slotRadius, selfIntersect, isolateCaps) {\r\n if (selfIntersect === void 0) { selfIntersect = false; }\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n if (slotRadius <= 0 || sweepRadius <= 0)\r\n return;\r\n startAngle = MakerJs.angle.noRevolutions(startAngle);\r\n endAngle = MakerJs.angle.noRevolutions(endAngle);\r\n if (MakerJs.round(startAngle - endAngle) == 0)\r\n return;\r\n if (endAngle < startAngle)\r\n endAngle += 360;\r\n var addCap = function (id, tiltAngle, offsetStartAngle, offsetEndAngle) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n return capModel.paths[id] = new MakerJs.paths.Arc(MakerJs.point.fromPolar(MakerJs.angle.toRadians(tiltAngle), sweepRadius), slotRadius, tiltAngle + offsetStartAngle, tiltAngle + offsetEndAngle);\r\n };\r\n var addSweep = function (id, offsetRadius) {\r\n return _this.paths[id] = new MakerJs.paths.Arc([0, 0], sweepRadius + offsetRadius, startAngle, endAngle);\r\n };\r\n addSweep(\"Outer\", slotRadius);\r\n var hasInner = (sweepRadius - slotRadius) > 0;\r\n if (hasInner) {\r\n addSweep(\"Inner\", -slotRadius);\r\n }\r\n var caps = [];\r\n caps.push(addCap(\"StartCap\", startAngle, 180, 0));\r\n caps.push(addCap(\"EndCap\", endAngle, 0, 180));\r\n //the distance between the cap origins\r\n var d = MakerJs.measure.pointDistance(caps[0].origin, caps[1].origin);\r\n if ((d / 2) < slotRadius) {\r\n //the caps intersect\r\n var int = MakerJs.path.intersection(caps[0], caps[1]);\r\n if (int) {\r\n if (!hasInner || !selfIntersect) {\r\n caps[0].startAngle = int.path1Angles[0];\r\n caps[1].endAngle = int.path2Angles[0];\r\n }\r\n if (!selfIntersect && hasInner && int.intersectionPoints.length == 2) {\r\n addCap(\"StartCap2\", startAngle, 180, 0).endAngle = int.path1Angles[1];\r\n addCap(\"EndCap2\", endAngle, 0, 180).startAngle = int.path2Angles[1] + 360;\r\n }\r\n }\r\n }\r\n }\r\n return OvalArc;\r\n }());\r\n models.OvalArc = OvalArc;\r\n OvalArc.metaParameters = [\r\n { title: \"start angle\", type: \"range\", min: -360, max: 360, step: 1, value: 180 },\r\n { title: \"end angle\", type: \"range\", min: -360, max: 360, step: 1, value: 0 },\r\n { title: \"sweep\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"radius\", type: \"range\", min: 0, max: 100, step: 1, value: 15 },\r\n { title: \"self intersect\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Rectangle = /** @class */ (function () {\r\n function Rectangle() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.paths = {};\r\n var width;\r\n var height;\r\n if (args.length === 2 && !MakerJs.isObject(args[0])) {\r\n width = args[0];\r\n height = args[1];\r\n }\r\n else {\r\n var margin = 0;\r\n var m;\r\n if (MakerJs.isModel(args[0])) {\r\n m = MakerJs.measure.modelExtents(args[0]);\r\n if (args.length === 2) {\r\n margin = args[1];\r\n }\r\n }\r\n else {\r\n //use measurement\r\n m = args[0];\r\n }\r\n this.origin = MakerJs.point.subtract(m.low, [margin, margin]);\r\n width = m.high[0] - m.low[0] + 2 * margin;\r\n height = m.high[1] - m.low[1] + 2 * margin;\r\n }\r\n this.paths = new models.ConnectTheDots(true, [[0, 0], [width, 0], [width, height], [0, height]]).paths;\r\n }\r\n return Rectangle;\r\n }());\r\n models.Rectangle = Rectangle;\r\n Rectangle.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Ring = /** @class */ (function () {\r\n function Ring(outerRadius, innerRadius) {\r\n this.paths = {};\r\n var radii = {\r\n \"Ring_outer\": outerRadius,\r\n \"Ring_inner\": innerRadius\r\n };\r\n for (var id in radii) {\r\n if (radii[id] === void 0)\r\n continue;\r\n this.paths[id] = new MakerJs.paths.Circle(MakerJs.point.zero(), radii[id]);\r\n }\r\n }\r\n return Ring;\r\n }());\r\n models.Ring = Ring;\r\n Ring.metaParameters = [\r\n { title: \"outer radius\", type: \"range\", min: 0, max: 100, step: 1, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, step: 1, value: 20 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Belt = /** @class */ (function () {\r\n function Belt(leftRadius, distance, rightRadius) {\r\n this.paths = {};\r\n var left = new MakerJs.paths.Arc([0, 0], leftRadius, 0, 360);\r\n var right = new MakerJs.paths.Arc([distance, 0], rightRadius, 0, 360);\r\n var angles = MakerJs.solvers.circleTangentAngles(left, right);\r\n if (!angles) {\r\n this.paths[\"Belt\"] = new MakerJs.paths.Circle(Math.max(leftRadius, rightRadius));\r\n }\r\n else {\r\n angles = angles.sort(function (a, b) { return a - b; });\r\n left.startAngle = angles[0];\r\n left.endAngle = angles[1];\r\n right.startAngle = angles[1];\r\n right.endAngle = angles[0];\r\n this.paths[\"Left\"] = left;\r\n this.paths[\"Right\"] = right;\r\n this.paths[\"Top\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[0], left), MakerJs.point.fromAngleOnCircle(angles[0], right));\r\n this.paths[\"Bottom\"] = new MakerJs.paths.Line(MakerJs.point.fromAngleOnCircle(angles[1], left), MakerJs.point.fromAngleOnCircle(angles[1], right));\r\n }\r\n }\r\n return Belt;\r\n }());\r\n models.Belt = Belt;\r\n Belt.metaParameters = [\r\n { title: \"left radius\", type: \"range\", min: 0, max: 100, value: 30 },\r\n { title: \"distance between centers\", type: \"range\", min: 0, max: 100, value: 50 },\r\n { title: \"right radius\", type: \"range\", min: 0, max: 100, value: 15 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var SCurve = /** @class */ (function () {\r\n function SCurve(width, height) {\r\n this.paths = {};\r\n function findRadius(x, y) {\r\n return x + (y * y - x * x) / (2 * x);\r\n }\r\n var h2 = height / 2;\r\n var w2 = width / 2;\r\n var radius;\r\n var startAngle;\r\n var endAngle;\r\n var arcOrigin;\r\n if (width > height) {\r\n radius = findRadius(h2, w2);\r\n startAngle = 270;\r\n endAngle = 360 - MakerJs.angle.toDegrees(Math.acos(w2 / radius));\r\n arcOrigin = [0, radius];\r\n }\r\n else {\r\n radius = findRadius(w2, h2);\r\n startAngle = 180 - MakerJs.angle.toDegrees(Math.asin(h2 / radius));\r\n endAngle = 180;\r\n arcOrigin = [radius, 0];\r\n }\r\n var curve = new MakerJs.paths.Arc(arcOrigin, radius, startAngle, endAngle);\r\n this.paths['curve_start'] = curve;\r\n this.paths['curve_end'] = MakerJs.path.moveRelative(MakerJs.path.mirror(curve, true, true), [width, height]);\r\n }\r\n return SCurve;\r\n }());\r\n models.SCurve = SCurve;\r\n SCurve.metaParameters = [\r\n { title: \"width\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"height\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Slot = /** @class */ (function () {\r\n function Slot(origin, endPoint, radius, isolateCaps) {\r\n if (isolateCaps === void 0) { isolateCaps = false; }\r\n var _this = this;\r\n this.paths = {};\r\n var capRoot;\r\n if (isolateCaps) {\r\n capRoot = { models: {} };\r\n this.models = { 'Caps': capRoot };\r\n }\r\n var addCap = function (id, capPath) {\r\n var capModel;\r\n if (isolateCaps) {\r\n capModel = { paths: {} };\r\n capRoot.models[id] = capModel;\r\n }\r\n else {\r\n capModel = _this;\r\n }\r\n capModel.paths[id] = capPath;\r\n };\r\n var a = MakerJs.angle.ofPointInDegrees(origin, endPoint);\r\n var len = MakerJs.measure.pointDistance(origin, endPoint);\r\n this.paths['Top'] = new MakerJs.paths.Line([0, radius], [len, radius]);\r\n this.paths['Bottom'] = new MakerJs.paths.Line([0, -radius], [len, -radius]);\r\n addCap('StartCap', new MakerJs.paths.Arc([0, 0], radius, 90, 270));\r\n addCap('EndCap', new MakerJs.paths.Arc([len, 0], radius, 270, 90));\r\n MakerJs.model.rotate(this, a, [0, 0]);\r\n this.origin = origin;\r\n }\r\n return Slot;\r\n }());\r\n models.Slot = Slot;\r\n Slot.metaParameters = [\r\n {\r\n title: \"origin\", type: \"select\", value: [\r\n [0, 0],\r\n [10, 0],\r\n [10, 10]\r\n ]\r\n },\r\n {\r\n title: \"end\", type: \"select\", value: [\r\n [80, 0],\r\n [0, 30],\r\n [10, 30]\r\n ]\r\n },\r\n { title: \"radius\", type: \"range\", min: 1, max: 50, value: 10 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Square = /** @class */ (function () {\r\n function Square(side) {\r\n this.paths = {};\r\n this.paths = new models.Rectangle(side, side).paths;\r\n }\r\n return Square;\r\n }());\r\n models.Square = Square;\r\n Square.metaParameters = [\r\n { title: \"side\", type: \"range\", min: 1, max: 100, value: 100 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Star = /** @class */ (function () {\r\n function Star(numberOfPoints, outerRadius, innerRadius, skipPoints) {\r\n if (skipPoints === void 0) { skipPoints = 2; }\r\n this.paths = {};\r\n if (!innerRadius) {\r\n innerRadius = outerRadius * Star.InnerRadiusRatio(numberOfPoints, skipPoints);\r\n }\r\n var outerPoints = models.Polygon.getPoints(numberOfPoints, outerRadius);\r\n var innerPoints = models.Polygon.getPoints(numberOfPoints, innerRadius, 180 / numberOfPoints);\r\n var allPoints = [];\r\n for (var i = 0; i < numberOfPoints; i++) {\r\n allPoints.push(outerPoints[i]);\r\n allPoints.push(innerPoints[i]);\r\n }\r\n var model = new models.ConnectTheDots(true, allPoints);\r\n this.paths = model.paths;\r\n delete model.paths;\r\n }\r\n Star.InnerRadiusRatio = function (numberOfPoints, skipPoints) {\r\n //formula from http://www.jdawiseman.com/papers/easymath/surds_star_inner_radius.html\r\n //Cos(Pi()*m/n) / Cos(Pi()*(m-1)/n)\r\n if (numberOfPoints > 0 && skipPoints > 1 && skipPoints < numberOfPoints / 2) {\r\n return Math.cos(Math.PI * skipPoints / numberOfPoints) / Math.cos(Math.PI * (skipPoints - 1) / numberOfPoints);\r\n }\r\n return 0;\r\n };\r\n return Star;\r\n }());\r\n models.Star = Star;\r\n Star.metaParameters = [\r\n { title: \"number of sides\", type: \"range\", min: 3, max: 24, value: 8 },\r\n { title: \"outer radius\", type: \"range\", min: 1, max: 100, value: 50 },\r\n { title: \"inner radius\", type: \"range\", min: 0, max: 100, value: 15 },\r\n { title: \"skip points (when inner radius is zero)\", type: \"range\", min: 0, max: 12, value: 2 }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nvar MakerJs;\r\n(function (MakerJs) {\r\n var models;\r\n (function (models) {\r\n var Text = /** @class */ (function () {\r\n /**\r\n * Renders text in a given font to a model.\r\n * @param font OpenType.Font object.\r\n * @param text String of text to render.\r\n * @param fontSize Font size.\r\n * @param combine Flag (default false) to perform a combineUnion upon each character with characters to the left and right.\r\n * @param centerCharacterOrigin Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @param opentypeOptions Optional opentype.RenderOptions object.\r\n * @returns Model of the text.\r\n */\r\n function Text(font, text, fontSize, combine, centerCharacterOrigin, bezierAccuracy, opentypeOptions) {\r\n if (combine === void 0) { combine = false; }\r\n if (centerCharacterOrigin === void 0) { centerCharacterOrigin = false; }\r\n var _this = this;\r\n this.models = {};\r\n var charIndex = 0;\r\n var prevDeleted;\r\n var prevChar;\r\n var cb = function (glyph, x, y, _fontSize, options) {\r\n var charModel = Text.glyphToModel(glyph, _fontSize, bezierAccuracy);\r\n charModel.origin = [x, 0];\r\n if (centerCharacterOrigin && (charModel.paths || charModel.models)) {\r\n var m = MakerJs.measure.modelExtents(charModel);\r\n if (m) {\r\n var w = m.high[0] - m.low[0];\r\n MakerJs.model.originate(charModel, [m.low[0] + w / 2, 0]);\r\n }\r\n }\r\n if (combine && charIndex > 0) {\r\n var combineOptions = {};\r\n var prev;\r\n if (prevDeleted) {\r\n //form a temporary complete geometry of the previous character using the previously deleted segments\r\n prev = {\r\n models: {\r\n deleted: prevDeleted,\r\n char: prevChar\r\n }\r\n };\r\n }\r\n else {\r\n prev = prevChar;\r\n }\r\n MakerJs.model.combine(prev, charModel, false, true, false, true, combineOptions);\r\n //save the deleted segments from this character for the next iteration\r\n prevDeleted = combineOptions.out_deleted[1];\r\n }\r\n _this.models[charIndex] = charModel;\r\n charIndex++;\r\n prevChar = charModel;\r\n };\r\n font.forEachGlyph(text, 0, 0, fontSize, opentypeOptions, cb);\r\n }\r\n /**\r\n * Convert an opentype glyph to a model.\r\n * @param glyph Opentype.Glyph object.\r\n * @param fontSize Font size.\r\n * @param bezierAccuracy Optional accuracy of Bezier curves.\r\n * @returns Model of the glyph.\r\n */\r\n Text.glyphToModel = function (glyph, fontSize, bezierAccuracy) {\r\n var charModel = {};\r\n var firstPoint;\r\n var currPoint;\r\n var pathCount = 0;\r\n function addPath(p) {\r\n if (!charModel.paths) {\r\n charModel.paths = {};\r\n }\r\n charModel.paths['p_' + ++pathCount] = p;\r\n }\r\n function addModel(m) {\r\n if (!charModel.models) {\r\n charModel.models = {};\r\n }\r\n charModel.models['p_' + ++pathCount] = m;\r\n }\r\n var p = glyph.getPath(0, 0, fontSize);\r\n p.commands.map(function (command, i) {\r\n var points = [[command.x, command.y], [command.x1, command.y1], [command.x2, command.y2]].map(function (p) {\r\n if (p[0] !== void 0) {\r\n return MakerJs.point.mirror(p, false, true);\r\n }\r\n });\r\n switch (command.type) {\r\n case 'M':\r\n firstPoint = points[0];\r\n break;\r\n case 'Z':\r\n points[0] = firstPoint;\r\n //fall through to line\r\n case 'L':\r\n if (!MakerJs.measure.isPointEqual(currPoint, points[0])) {\r\n addPath(new MakerJs.paths.Line(currPoint, points[0]));\r\n }\r\n break;\r\n case 'C':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[2], points[0], bezierAccuracy));\r\n break;\r\n case 'Q':\r\n addModel(new models.BezierCurve(currPoint, points[1], points[0], bezierAccuracy));\r\n break;\r\n }\r\n currPoint = points[0];\r\n });\r\n return charModel;\r\n };\r\n return Text;\r\n }());\r\n models.Text = Text;\r\n Text.metaParameters = [\r\n { title: \"font\", type: \"font\", value: '*' },\r\n { title: \"text\", type: \"text\", value: 'Hello' },\r\n { title: \"font size\", type: \"range\", min: 10, max: 200, value: 72 },\r\n { title: \"combine\", type: \"bool\", value: false },\r\n { title: \"center character origin\", type: \"bool\", value: false }\r\n ];\r\n })(models = MakerJs.models || (MakerJs.models = {}));\r\n})(MakerJs || (MakerJs = {}));\r\nMakerJs.version = \"0.11.1\";\nvar Bezier = require('bezier-js');\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/makerjs/dist/index.js\n// module id = 97\n// module chunks = 0","var clone = (function() {\n'use strict';\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n*/\nfunction clone(parent, circular, depth, prototype) {\n var filter;\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n filter = circular.filter;\n circular = circular.circular\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth == 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n};\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n};\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n};\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n};\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n};\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/clone/clone.js\n// module id = 98\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/buffer/index.js\n// module id = 99\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/base64-js/index.js\n// module id = 100\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ieee754/index.js\n// module id = 101\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/isarray/index.js\n// module id = 102\n// module chunks = 0","\nimport sort from './sort';\nimport range from './range';\nimport within from './within';\n\nexport default function kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/index.js\n// module id = 103\n// module chunks = 0","\nexport default function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/sort.js\n// module id = 104\n// module chunks = 0","\nexport default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/range.js\n// module id = 105\n// module chunks = 0","\nexport default function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/kdbush/src/within.js\n// module id = 106\n// module chunks = 0","/**\r\n * Graham's Scan Convex Hull Algorithm\r\n * @desc An implementation of the Graham's Scan Convex Hull algorithm in JavaScript.\r\n * @author Brian Barnett, brian@3kb.co.uk, http://brianbar.net/ || http://3kb.co.uk/\r\n * @version 1.0.4\r\n */\r\nfunction ConvexHullGrahamScan(){this.anchorPoint=void 0,this.reverse=!1,this.points=[]}ConvexHullGrahamScan.prototype={constructor:ConvexHullGrahamScan,Point:function(n,t){this.x=n,this.y=t},_findPolarAngle:function(n,t){var i,o,h=57.295779513082;if(!n||!t)return 0;if(i=t.x-n.x,o=t.y-n.y,0==i&&0==o)return 0;var r=Math.atan2(o,i)*h;return this.reverse?0>=r&&(r+=360):r>=0&&(r+=360),r},addPoint:function(n,t){return void 0===this.anchorPoint?void(this.anchorPoint=new this.Point(n,t)):this.anchorPoint.y>t&&this.anchorPoint.x>n||this.anchorPoint.y===t&&this.anchorPoint.x>n||this.anchorPoint.y>t&&this.anchorPoint.x===n?(this.points.push(new this.Point(this.anchorPoint.x,this.anchorPoint.y)),void(this.anchorPoint=new this.Point(n,t))):void this.points.push(new this.Point(n,t))},_sortPoints:function(){var n=this;return this.points.sort(function(t,i){var o=n._findPolarAngle(n.anchorPoint,t),h=n._findPolarAngle(n.anchorPoint,i);return h>o?-1:o>h?1:0})},_checkPoints:function(n,t,i){var o,h=this._findPolarAngle(n,t),r=this._findPolarAngle(n,i);return h>r?(o=h-r,!(o>180)):r>h?(o=r-h,o>180):!0},getHull:function(){var n,t,i=[];if(this.reverse=this.points.every(function(n){return n.x<0&&n.y<0}),n=this._sortPoints(),t=n.length,3>t)return n.unshift(this.anchorPoint),n;for(i.push(n.shift(),n.shift());;){var o,h,r;if(i.push(n.shift()),o=i[i.length-3],h=i[i.length-2],r=i[i.length-1],this._checkPoints(o,h,r)&&i.splice(i.length-2,1),0==n.length){if(t==i.length){var e=this.anchorPoint;return i=i.filter(function(n){return!!n}),i.some(function(n){return n.x==e.x&&n.y==e.y})||i.unshift(this.anchorPoint),i}n=i,t=n.length,i=[],i.push(n.shift(),n.shift())}}}},\"function\"==typeof define&&define.amd&&define(function(){return ConvexHullGrahamScan}),\"undefined\"!=typeof module&&(module.exports=ConvexHullGrahamScan);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/graham_scan/graham_scan.min.js\n// module id = 107\n// module chunks = 0","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-options.js\n// module id = 108\n// module chunks = 0","module.exports = require('./lib/bezier');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/index.js\n// module id = 109\n// module chunks = 0","(function() {\n \"use strict\";\n\n var utils = require(\"./utils.js\");\n\n /**\n * Poly Bezier\n * @param {[type]} curves [description]\n */\n var PolyBezier = function(curves) {\n this.curves = [];\n this._3d = false;\n if (!!curves) {\n this.curves = curves;\n this._3d = this.curves[0]._3d;\n }\n };\n\n PolyBezier.prototype = {\n valueOf: function() {\n return this.toString();\n },\n toString: function() {\n return (\n \"[\" +\n this.curves\n .map(function(curve) {\n return utils.pointsToString(curve.points);\n })\n .join(\", \") +\n \"]\"\n );\n },\n addCurve: function(curve) {\n this.curves.push(curve);\n this._3d = this._3d || curve._3d;\n },\n length: function() {\n return this.curves\n .map(function(v) {\n return v.length();\n })\n .reduce(function(a, b) {\n return a + b;\n });\n },\n curve: function(idx) {\n return this.curves[idx];\n },\n bbox: function() {\n var c = this.curves;\n var bbox = c[0].bbox();\n for (var i = 1; i < c.length; i++) {\n utils.expandbox(bbox, c[i].bbox());\n }\n return bbox;\n },\n offset: function(d) {\n var offset = [];\n this.curves.forEach(function(v) {\n offset = offset.concat(v.offset(d));\n });\n return new PolyBezier(offset);\n }\n };\n\n module.exports = PolyBezier;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/poly-bezier.js\n// module id = 110\n// module chunks = 0","var normalise = require(\"./normalise-svg.js\");\n\nvar M = { x: false, y: false };\n\nfunction makeBezier(Bezier, term, values) {\n if (term === 'Z') return;\n if (term === 'M') {\n M = {x: values[0], y: values[1]};\n return;\n }\n // ES7: new Bezier(M.x, M.y, ...values)\n var cvalues = [false, M.x, M.y].concat(values);\n var PreboundConstructor = Bezier.bind.apply(Bezier, cvalues)\n var curve = new PreboundConstructor();\n var last = values.slice(-2);\n M = { x : last[0], y: last[1] };\n return curve;\n}\n\nfunction convertPath(Bezier, d) {\n var terms = normalise(d).split(\" \"),\n term,\n matcher = new RegExp(\"[MLCQZ]\", \"\"),\n segment,\n values,\n segments = [],\n ARGS = { \"C\": 6, \"Q\": 4, \"L\": 2, \"M\": 2};\n\n while (terms.length) {\n term = terms.splice(0,1)[0];\n if (matcher.test(term)) {\n values = terms.splice(0, ARGS[term]).map(parseFloat);\n segment = makeBezier(Bezier, term, values);\n if (segment) segments.push(segment);\n }\n }\n\n return new Bezier.PolyBezier(segments);\n}\n\nmodule.exports = convertPath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/svg-to-beziers.js\n// module id = 111\n// module chunks = 0","/**\n * Normalise an SVG path to absolute coordinates\n * and full commands, rather than relative coordinates\n * and/or shortcut commands.\n */\nfunction normalizePath(d) {\n // preprocess \"d\" so that we have spaces between values\n d = d\n .replace(/,/g, \" \") // replace commas with spaces\n .replace(/-/g, \" - \") // add spacing around minus signs\n .replace(/-\\s+/g, \"-\") // remove spacing to the right of minus signs.\n .replace(/([a-zA-Z])/g, \" $1 \");\n\n // set up the variables used in this function\n var instructions = d.replace(/([a-zA-Z])\\s?/g, \"|$1\").split(\"|\"),\n instructionLength = instructions.length,\n i,\n instruction,\n op,\n lop,\n args = [],\n alen,\n a,\n sx = 0,\n sy = 0,\n x = 0,\n y = 0,\n cx = 0,\n cy = 0,\n cx2 = 0,\n cy2 = 0,\n normalized = \"\";\n\n // we run through the instruction list starting at 1, not 0,\n // because we split up \"|M x y ....\" so the first element will\n // always be an empty string. By design.\n for (i = 1; i < instructionLength; i++) {\n // which instruction is this?\n instruction = instructions[i];\n op = instruction.substring(0, 1);\n lop = op.toLowerCase();\n\n // what are the arguments? note that we need to convert\n // all strings into numbers, or + will do silly things.\n args = instruction\n .replace(op, \"\")\n .trim()\n .split(\" \");\n args = args\n .filter(function(v) {\n return v !== \"\";\n })\n .map(parseFloat);\n alen = args.length;\n\n // we could use a switch, but elaborate code in a \"case\" with\n // fallthrough is just horrid to read. So let's use ifthen\n // statements instead.\n\n // moveto command (plus possible lineto)\n if (lop === \"m\") {\n normalized += \"M \";\n if (op === \"m\") {\n x += args[0];\n y += args[1];\n } else {\n x = args[0];\n y = args[1];\n }\n // records start position, for dealing\n // with the shape close operator ('Z')\n sx = x;\n sy = y;\n normalized += x + \" \" + y + \" \";\n if (alen > 2) {\n for (a = 0; a < alen; a += 2) {\n if (op === \"m\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n }\n } else if (lop === \"l\") {\n // lineto commands\n for (a = 0; a < alen; a += 2) {\n if (op === \"l\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"h\") {\n for (a = 0; a < alen; a++) {\n if (op === \"h\") {\n x += args[a];\n } else {\n x = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"v\") {\n for (a = 0; a < alen; a++) {\n if (op === \"v\") {\n y += args[a];\n } else {\n y = args[a];\n }\n normalized += [\"L\",x,y,''].join(\" \");\n }\n } else if (lop === \"q\") {\n // quadratic curveto commands\n for (a = 0; a < alen; a += 4) {\n if (op === \"q\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx = args[a];\n cy = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"t\") {\n for (a = 0; a < alen; a += 2) {\n // reflect previous cx/cy over x/y\n cx = x + (x - cx);\n cy = y + (y - cy);\n // then get real end point\n if (op === \"t\") {\n x += args[a];\n y += args[a + 1];\n } else {\n x = args[a];\n y = args[a + 1];\n }\n normalized += [\"Q\",cx,cy,x,y,''].join(\" \");\n }\n } else if (lop === \"c\") {\n // cubic curveto commands\n for (a = 0; a < alen; a += 6) {\n if (op === \"c\") {\n cx = x + args[a];\n cy = y + args[a + 1];\n cx2 = x + args[a + 2];\n cy2 = y + args[a + 3];\n x += args[a + 4];\n y += args[a + 5];\n } else {\n cx = args[a];\n cy = args[a + 1];\n cx2 = args[a + 2];\n cy2 = args[a + 3];\n x = args[a + 4];\n y = args[a + 5];\n }\n normalized += [\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"s\") {\n for (a = 0; a < alen; a += 4) {\n // reflect previous cx2/cy2 over x/y\n cx = x + (x - cx2);\n cy = y + (y - cy2);\n // then get real control and end point\n if (op === \"s\") {\n cx2 = x + args[a];\n cy2 = y + args[a + 1];\n x += args[a + 2];\n y += args[a + 3];\n } else {\n cx2 = args[a];\n cy2 = args[a + 1];\n x = args[a + 2];\n y = args[a + 3];\n }\n normalized +=[\"C\",cx,cy,cx2,cy2,x,y,''].join(\" \");\n }\n } else if (lop === \"z\") {\n normalized += \"Z \";\n // not unimportant: path closing changes the current x/y coordinate\n x = sx;\n y = sy;\n }\n }\n return normalized.trim();\n}\n\nmodule.exports = normalizePath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bezier-js/lib/normalise-svg.js\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 9f43369..ee1dc24 100644 --- a/src/App.js +++ b/src/App.js @@ -60,7 +60,7 @@ class About extends Component{

Source code

This is an open source project you can find the source code at this link - on Github. + on Github. You can download and use this webapp even without an internet connection, after you've downloded the source code you can open the index.html file in the build folder with any modern browser and start measuring your vessels.