var Bump = class {
	constructor(e, n) {
		this._context = e, this._x = n;
	}
	areaStart() {
		this._line = 0;
	}
	areaEnd() {
		this._line = NaN;
	}
	lineStart() {
		this._point = 0;
	}
	lineEnd() {
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	}
	point(e, n) {
		switch (e = +e, n = +n, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, n) : this._context.moveTo(e, n);
				break;
			case 1: this._point = 2;
			default:
				this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, n, e, n) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + n) / 2, e, this._y0, e, n);
				break;
		}
		this._x0 = e, this._y0 = n;
	}
};
function bumpX(n) {
	return new Bump(n, !0);
}
function bumpY(n) {
	return new Bump(n, !1);
}
export { bumpX, bumpY };
