(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";function getFontHeight(e){var t=arguments.length<=1||void 0===arguments[1]?document.documentElement:arguments[1];if(/(\d+(\.\d+)?)(px|em|rem)/.test(e)){var n=+RegExp.$1,r=RegExp.$3;if(isNaN(n))return NaN;switch(r){case"px":return n;case"rem":t=document.documentElement;break;case"em":break;default:return NaN}return n*window.getComputedStyle(t).fontSize}return NaN}exports.getFontHeight=getFontHeight;var StringMeasure=exports.StringMeasure=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.canvas;require(2).classCallCheck(this,e);var r=n instanceof HTMLCanvasElement?n:document.createElement("canvas");this.$ctx=r.getContext("2d")}return require(2).createClass(e,[{key:"font",set:function(e){this.$ctx.font=e},get:function(){return this.$ctx.font}},{key:"$canvas",get:function(){return this.$ctx.canvas}},{key:"fontHeight",get:function(){var e=this.$ctx;return getFontHeight(e.font,e.canvas)}}]),require(2).createClass(e,[{key:"measureText",value:function(e){return this.$ctx.measureText(e)}},{key:"measureTextWidth",value:function(e){return this.$ctx.measureText(e).width}},{key:"measureTextToWidth",value:function(e,t){for(var n=0,r="",i=e.length,u=0;t>u&&i>n;n++)r+=e[n],u=this.measureTextWidth(r);return u>t&&(e=e.substr(0,e.length-1),u=this.measureTextWidth(e)),{width:u,text:r}}},{key:"measureTextToLines",value:function(e,t){var n=t.maxWidth,r=t.maxHeight,i=void 0===r?1/0:r,u=t.lineHeight,a=t.lineCount,s=void 0===a?1/0:a,o=e.length,c=0,h=[],g=u||0;for(u=u||this.fontHeight,u||(u=0);o>c&&i>g&&h.length<s;){var d=this.measureTextToWidth(e.substring(c),n).text;if(!d.length)throw Error("invalid width");c+=d.length,h.push(d),g+=u}return h}}]),e}(),defaultStringMeasure=exports.defaultStringMeasure=void 0,_defaultStringMeasure=void 0;Object.defineProperty(exports,"defaultStringMeasure",{get:function(){return _defaultStringMeasure||(_defaultStringMeasure=new StringMeasure),_defaultStringMeasure}});


},{"2":2}],2:[function(require,module,exports){
"use strict";exports.defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},exports.inherits=function(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)},exports.possibleConstructorReturn=function(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},exports.createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),exports.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},exports.slicedToArray=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(c){o=!0,i=c}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),exports.get=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var u=o.get;if(void 0!==u)return u.call(n)};


},{}]},{},[1]);
