"use strict";(self.webpackChunkgravityformssignature=self.webpackChunkgravityformssignature||[]).push([[721],{17:function(t){t.exports=function(t,e){return{value:t,done:e}}},23:function(t,e,n){var o=n(9329),r=n(5376),i=o("keys");t.exports=function(t){return i[t]||(i[t]=r(t))}},78:function(t,e,n){var o=n(6733),r=n(8389),i=n(962),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&r(n=t.toString)&&!i(a=o(n,t)))return a;if(r(n=t.valueOf)&&!i(a=o(n,t)))return a;if("string"!==e&&r(n=t.toString)&&!i(a=o(n,t)))return a;throw new s("Can't convert object to primitive value")}},79:function(t,e,n){var o=n(9617).f,r=n(6401),i=n(8979)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!r(t,i)&&o(t,i,{configurable:!0,value:e})}},213:function(t,e){e.f=Object.getOwnPropertySymbols},237:function(t){t.exports={}},394:function(t,e,n){var o=n(2697).IteratorPrototype,r=n(8584),i=n(8612),s=n(79),a=n(237),u=function(){return this};t.exports=function(t,e,n,c){var h=e+" Iterator";return t.prototype=r(o,{next:i(+!c,n)}),s(t,h,!1,!0),a[h]=u,t}},446:function(t,e,n){var o=n(9227),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},455:function(t,e,n){function o(t,e,n,o,r,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(o,r)}function r(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(t){o(s,r,i,a,u,"next",t)}function u(t){o(s,r,i,a,u,"throw",t)}a(void 0)})}}n.d(e,{A:function(){return r}})},469:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var o=+t;return(o>0?n:e)(o)}},565:function(t,e,n){var o=n(7383),r=n(8389),i=n(4937),s=n(4272),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return r(e)&&i(e.prototype,a(t))}},798:function(t,e,n){var o=n(4411),r=n(8389),i=o.WeakMap;t.exports=r(i)&&/native code/.test(String(i))},877:function(t,e,n){var o=n(4411),r=n(3817),i="__core-js_shared__",s=o[i]||r(i,{});t.exports=s},962:function(t,e,n){var o=n(8389),r=n(5387),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:o(t)||t===i}:function(t){return"object"==typeof t?null!==t:o(t)}},1154:function(t,e,n){var o=n(5920),r=n(5514);t.exports=function(t,e,n){try{return o(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},1409:function(t,e,n){var o=n(6805),r=n(2170),i=n(8742),s=function(t){return function(e,n,s){var a,u=o(e),c=i(u),h=r(s,c);if(t&&n!=n){for(;c>h;)if((a=u[h++])!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},1461:function(t,e,n){var o=n(8979),r=n(8584),i=n(9617).f,s=o("unscopables"),a=Array.prototype;void 0===a[s]&&i(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},1575:function(t,e,n){var o=n(7383),r=n(5920),i=n(8560),s=n(213),a=n(5735),u=r([].concat);t.exports=o("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?u(e,n(t)):e}},1789:function(t,e,n){var o,r,i,s=n(798),a=n(4411),u=n(962),c=n(9915),h=n(6401),l=n(877),f=n(23),p=n(7285),d="Object already initialized",v=a.TypeError,y=a.WeakMap;if(s||l.state){var _=l.state||(l.state=new y);_.get=_.get,_.has=_.has,_.set=_.set,o=function(t,e){if(_.has(t))throw new v(d);return e.facade=t,_.set(t,e),e},r=function(t){return _.get(t)||{}},i=function(t){return _.has(t)}}else{var m=f("state");p[m]=!0,o=function(t,e){if(h(t,m))throw new v(d);return e.facade=t,c(t,m,e),e},r=function(t){return h(t,m)?t[m]:{}},i=function(t){return h(t,m)}}t.exports={set:o,get:r,has:i,enforce:function(t){return i(t)?r(t):o(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=r(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},1814:function(t,e,n){var o=n(3237),r=TypeError;t.exports=function(t){if(o(t))throw new r("Can't call method on "+t);return t}},2103:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2146:function(t,e,n){function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}n.d(e,{A:function(){return o}})},2170:function(t,e,n){var o=n(9227),r=Math.max,i=Math.min;t.exports=function(t,e){var n=o(t);return n<0?r(n+e,0):i(n,e)}},2411:function(t){t.exports=!1},2697:function(t,e,n){var o,r,i,s=n(9391),a=n(8389),u=n(962),c=n(8584),h=n(6371),l=n(7448),f=n(8979),p=n(2411),d=f("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(r=h(h(i)))!==Object.prototype&&(o=r):v=!0),!u(o)||s(function(){var t={};return o[d].call(t)!==t})?o={}:p&&(o=c(o)),a(o[d])||l(o,d,function(){return this}),t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:v}},2888:function(t,e,n){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}n.d(e,{A:function(){return o}})},2943:function(t,e,n){var o=n(5920),r=n(9391),i=n(4512),s=Object,a=o("".split);t.exports=r(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?a(t,""):s(t)}:s},3036:function(t,e,n){var o=n(6401),r=n(1575),i=n(3763),s=n(9617);t.exports=function(t,e,n){for(var a=r(e),u=s.f,c=i.f,h=0;h<a.length;h++){var l=a[h];o(t,l)||n&&o(n,l)||u(t,l,c(e,l))}}},3175:function(t,e,n){var o=n(1154),r=n(5735),i=n(4546);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=o(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t(n,o):n.__proto__=o,n}}():void 0)},3237:function(t){t.exports=function(t){return null==t}},3332:function(t,e,n){var o=n(5920),r=n(6401),i=n(6805),s=n(1409).indexOf,a=n(7285),u=o([].push);t.exports=function(t,e){var n,o=i(t),c=0,h=[];for(n in o)!r(a,n)&&r(o,n)&&u(h,n);for(;e.length>c;)r(o,n=e[c++])&&(~s(h,n)||u(h,n));return h}},3763:function(t,e,n){var o=n(7084),r=n(6733),i=n(4373),s=n(8612),a=n(6805),u=n(8745),c=n(6401),h=n(8669),l=Object.getOwnPropertyDescriptor;e.f=o?l:function(t,e){if(t=a(t),e=u(e),h)try{return l(t,e)}catch(t){}if(c(t,e))return s(!r(i.f,t,e),t[e])}},3809:function(t,e,n){var o=n(7084),r=n(4542),i=n(9617),s=n(5735),a=n(6805),u=n(8784);e.f=o&&!r?Object.defineProperties:function(t,e){s(t);for(var n,o=a(e),r=u(e),c=r.length,h=0;c>h;)i.f(t,n=r[h++],o[n]);return t}},3817:function(t,e,n){var o=n(4411),r=Object.defineProperty;t.exports=function(t,e){try{r(o,t,{value:e,configurable:!0,writable:!0})}catch(n){o[t]=e}return e}},4156:function(t,e,n){var o=n(9391),r=n(8389),i=/#|\.prototype\./,s=function(t,e){var n=u[a(t)];return n===h||n!==c&&(r(e)?o(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s},4272:function(t,e,n){var o=n(5007);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},4373:function(t,e){var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!n.call({1:2},1);e.f=r?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},4411:function(t,e,n){var o=function(t){return t&&t.Math===Math&&t};t.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n.g&&n.g)||o("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4512:function(t,e,n){var o=n(5920),r=o({}.toString),i=o("".slice);t.exports=function(t){return i(r(t),8,-1)}},4542:function(t,e,n){var o=n(7084),r=n(9391);t.exports=o&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},4546:function(t,e,n){var o=n(8389),r=String,i=TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw new i("Can't set "+r(t)+" as a prototype")}},4937:function(t,e,n){var o=n(5920);t.exports=o({}.isPrototypeOf)},4983:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},5007:function(t,e,n){var o=n(5724),r=n(9391),i=n(4411).String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41})},5168:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5376:function(t,e,n){var o=n(5920),r=0,i=Math.random(),s=o(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++r+i,36)}},5387:function(t){var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},5514:function(t,e,n){var o=n(8389),r=n(4983),i=TypeError;t.exports=function(t){if(o(t))return t;throw new i(r(t)+" is not a function")}},5674:function(t,e,n){n.d(e,{A:function(){return s}});class o{constructor(t,e,n,o){if(isNaN(t)||isNaN(e))throw new Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=n||0,this.time=o||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class r{static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,o=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new r(t[1],n,o,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const r=t.x-e.x,i=t.y-e.y,s=e.x-n.x,a=e.y-n.y,u=(t.x+e.x)/2,c=(t.y+e.y)/2,h=(e.x+n.x)/2,l=(e.y+n.y)/2,f=Math.sqrt(r*r+i*i),p=Math.sqrt(s*s+a*a),d=f+p==0?0:p/(f+p),v=h+(u-h)*d,y=l+(c-l)*d,_=e.x-v,m=e.y-y;return{c1:new o(u+_,c+m),c2:new o(h+_,l+m)}}constructor(t,e,n,o,r,i){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=o,this.startWidth=r,this.endWidth=i}length(){let t,e,n=0;for(let o=0;o<=10;o+=1){const r=o/10,i=this.point(r,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(r,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){const o=i-t,r=s-e;n+=Math.sqrt(o*o+r*r)}t=i,e=s}return n}point(t,e,n,o,r){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+r*t*t*t}}class i{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,n){this._et.addEventListener(t,e,n)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,n){this._et.removeEventListener(t,e,n)}}class s extends i{constructor(t,e={}){var n,o,r;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=null!==(n=e.throttle)&&void 0!==n?n:16,this.minDistance=null!==(o=e.minDistance)&&void 0!==o?o:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!==(r=e.canvasContextOptions)&&void 0!==r?r:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let n,o,r,i=0,s=null;const a=()=>{i=Date.now(),s=null,n=t.apply(o,r),s||(o=null,r=[])};return function(...u){const c=Date.now(),h=e-(c-i);return o=this,r=u,h<=0||h>e?(s&&(clearTimeout(s),s=null),i=c,n=t.apply(o,r),s||(o=null,r=[])):s||(s=window.setTimeout(a,h)),n}}(s.prototype._strokeUpdate,this.throttle):s.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0}fromDataURL(t,e={}){return new Promise((n,o)=>{const r=new Image,i=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/i,a=e.height||this.canvas.height/i,u=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),r.onload=()=>{this._ctx.drawImage(r,u,c,s,a),n()},r.onerror=t=>{o(t)},r.crossOrigin="anonymous",r.src=t,this._isEmpty=!1})}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!==(t=this.canvas.ownerDocument.defaultView)&&void 0!==t?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))}_handleTouchEnd(t){0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return t.persistentDeviceId||t.pointerId}_allowPointerId(t,e=!1){return void 0===this._strokePointerId?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){!this._drawingStroke&&this._isLeftButtonPressed(t)&&this._allowPointerId(t,!0)&&(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){this._allowPointerId(t)&&(this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handlePointerUp(t){!this._isLeftButtonPressed(t)&&this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),o=Object.assign(Object.assign({},n),{points:[]});this._data.push(o),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),n=this._data[this._data.length-1],o=n.points,r=o.length>0&&o[o.length-1],i=!!r&&e.distanceTo(r)<=this.minDistance,s=this._getPointGroupOptions(n);if(!r||!r||!i){const t=this._addPoint(e,s);r?t&&this._drawCurve(t,s):this._drawDot(e,s),o.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,n){const r=this.canvas.getBoundingClientRect();return new o(t-r.left,e-r.top,n,(new Date).getTime())}_addPoint(t,e){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],e),o=r.fromPoints(n,t);return n.shift(),o}return null}_calculateCurveWidths(t,e,n){const o=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(o,n),i={end:r,start:this._lastWidth};return this._lastVelocity=o,this._lastWidth=r,i}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const n=this._ctx,o=t.endWidth-t.startWidth,r=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<r;n+=1){const i=n/r,s=i*i,a=s*i,u=1-i,c=u*u,h=c*u;let l=h*t.startPoint.x;l+=3*c*i*t.control1.x,l+=3*u*s*t.control2.x,l+=a*t.endPoint.x;let f=h*t.startPoint.y;f+=3*c*i*t.control1.y,f+=3*u*s*t.control2.y,f+=a*t.endPoint.y;const p=Math.min(t.startWidth+a*o,e.maxWidth);this._drawCurveSegment(l,f,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,o=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,o),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const r of t){const{points:t}=r,i=this._getPointGroupOptions(r);if(t.length>1)for(let n=0;n<t.length;n+=1){const r=t[n],s=new o(r.x,r.y,r.pressure,r.time);0===n&&this._reset(i);const a=this._addPoint(s,i);a&&e(a,i)}else this._reset(i),n(t[0],i)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/n,r=this.canvas.height/n,i=document.createElementNS("http://www.w3.org/2000/svg","svg");if(i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),i.setAttribute("viewBox",`0 0 ${o} ${r}`),i.setAttribute("width",o.toString()),i.setAttribute("height",r.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),i.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{const n=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){const o=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;n.setAttribute("d",o),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),i.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:o,maxWidth:r})=>{const s=document.createElement("circle"),a=n>0?n:(o+r)/2;s.setAttribute("r",a.toString()),s.setAttribute("cx",t.x.toString()),s.setAttribute("cy",t.y.toString()),s.setAttribute("fill",e),i.appendChild(s)}),i.outerHTML}}},5724:function(t,e,n){var o,r,i=n(4411),s=n(5168),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,h=c&&c.v8;h&&(r=(o=h.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!r&&s&&(!(o=s.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=s.match(/Chrome\/(\d+)/))&&(r=+o[1]),t.exports=r},5735:function(t,e,n){var o=n(962),r=String,i=TypeError;t.exports=function(t){if(o(t))return t;throw new i(r(t)+" is not an object")}},5920:function(t,e,n){var o=n(6344),r=Function.prototype,i=r.call,s=o&&r.bind.bind(i,i);t.exports=o?s:function(t){return function(){return i.apply(t,arguments)}}},6344:function(t,e,n){var o=n(9391);t.exports=!o(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},6371:function(t,e,n){var o=n(6401),r=n(8389),i=n(8805),s=n(23),a=n(9731),u=s("IE_PROTO"),c=Object,h=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=i(t);if(o(e,u))return e[u];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?h:null}},6401:function(t,e,n){var o=n(5920),r=n(8805),i=o({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(r(t),e)}},6454:function(t,e,n){var o=n(4411),r=n(3763).f,i=n(9915),s=n(7448),a=n(3817),u=n(3036),c=n(4156);t.exports=function(t,e){var n,h,l,f,p,d=t.target,v=t.global,y=t.stat;if(n=v?o:y?o[d]||a(d,{}):(o[d]||{}).prototype)for(h in e){if(f=e[h],l=t.dontCallGetSet?(p=r(n,h))&&p.value:n[h],!c(v?h:d+(y?".":"#")+h,t.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(t.sham||l&&l.sham)&&i(f,"sham",!0),s(n,h,f,t)}}},6733:function(t,e,n){var o=n(6344),r=Function.prototype.call;t.exports=o?r.bind(r):function(){return r.apply(r,arguments)}},6746:function(t,e,n){var o=n(5920),r=n(8389),i=n(877),s=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6805:function(t,e,n){var o=n(2943),r=n(1814);t.exports=function(t){return o(r(t))}},7084:function(t,e,n){var o=n(9391);t.exports=!o(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},7285:function(t){t.exports={}},7383:function(t,e,n){var o=n(4411),r=n(8389);t.exports=function(t,e){return arguments.length<2?(n=o[t],r(n)?n:void 0):o[t]&&o[t][e];var n}},7448:function(t,e,n){var o=n(8389),r=n(9617),i=n(8075),s=n(3817);t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(o(n)&&i(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},7453:function(t,e,n){var o=n(7383);t.exports=o("document","documentElement")},7593:function(t,e,n){var o=n(6733),r=n(962),i=n(565),s=n(9950),a=n(78),u=n(8979),c=TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,u=s(t,h);if(u){if(void 0===e&&(e="default"),n=o(u,t,e),!r(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},7920:function(t,e,n){var o=n(6805),r=n(1461),i=n(237),s=n(1789),a=n(9617).f,u=n(9552),c=n(17),h=n(2411),l=n(7084),f="Array Iterator",p=s.set,d=s.getterFor(f);t.exports=u(Array,"Array",function(t,e){p(this,{type:f,target:o(t),index:0,kind:e})},function(){var t=d(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)},"values");var v=i.Arguments=i.Array;if(r("keys"),r("values"),r("entries"),!h&&l&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(t){}},8075:function(t,e,n){var o=n(5920),r=n(9391),i=n(8389),s=n(6401),a=n(7084),u=n(9470).CONFIGURABLE,c=n(6746),h=n(1789),l=h.enforce,f=h.get,p=String,d=Object.defineProperty,v=o("".slice),y=o("".replace),_=o([].join),m=a&&!r(function(){return 8!==d(function(){},"length",{value:8}).length}),g=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===v(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||u&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=l(t);return s(o,"source")||(o.source=_(g,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return i(this)&&f(this).source||c(this)},"toString")},8389:function(t,e,n){var o=n(5387),r=o.all;t.exports=o.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},8545:function(t,e,n){n.d(e,{A:function(){return r}});var o=n(2146);function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,o.A)(t,e)}},8560:function(t,e,n){var o=n(3332),r=n(2103).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,r)}},8584:function(t,e,n){var o,r=n(5735),i=n(3809),s=n(2103),a=n(7285),u=n(7453),c=n(9511),h=n(23),l="prototype",f="script",p=h("IE_PROTO"),d=function(){},v=function(t){return"<"+f+">"+t+"</"+f+">"},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},_=function(){try{o=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;_="undefined"!=typeof document?document.domain&&o?y(o):(e=c("iframe"),n="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):y(o);for(var r=s.length;r--;)delete _[l][s[r]];return _()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[l]=r(t),n=new d,d[l]=null,n[p]=t):n=_(),void 0===e?n:i.f(n,e)}},8612:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8669:function(t,e,n){var o=n(7084),r=n(9391),i=n(9511);t.exports=!o&&!r(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},8742:function(t,e,n){var o=n(446);t.exports=function(t){return o(t.length)}},8745:function(t,e,n){var o=n(7593),r=n(565);t.exports=function(t){var e=o(t,"string");return r(e)?e:e+""}},8784:function(t,e,n){var o=n(3332),r=n(2103);t.exports=Object.keys||function(t){return o(t,r)}},8805:function(t,e,n){var o=n(1814),r=Object;t.exports=function(t){return r(o(t))}},8856:function(t,e,n){n.d(e,{A:function(){return i}});var o=n(2888);function r(t){var e=function(t,e){if("object"!=(0,o.A)(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=(0,o.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==(0,o.A)(e)?e:e+""}function i(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},8979:function(t,e,n){var o=n(4411),r=n(9329),i=n(6401),s=n(5376),a=n(5007),u=n(4272),c=o.Symbol,h=r("wks"),l=u?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return i(h,t)||(h[t]=a&&i(c,t)?c[t]:l("Symbol."+t)),h[t]}},9227:function(t,e,n){var o=n(469);t.exports=function(t){var e=+t;return e!=e||0===e?0:o(e)}},9329:function(t,e,n){var o=n(2411),r=n(877);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.3",mode:o?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},9391:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9470:function(t,e,n){var o=n(7084),r=n(6401),i=Function.prototype,s=o&&Object.getOwnPropertyDescriptor,a=r(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!o||o&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},9511:function(t,e,n){var o=n(4411),r=n(962),i=o.document,s=r(i)&&r(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},9552:function(t,e,n){var o=n(6454),r=n(6733),i=n(2411),s=n(9470),a=n(8389),u=n(394),c=n(6371),h=n(3175),l=n(79),f=n(9915),p=n(7448),d=n(8979),v=n(237),y=n(2697),_=s.PROPER,m=s.CONFIGURABLE,g=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,w=d("iterator"),x="keys",P="values",S="entries",E=function(){return this};t.exports=function(t,e,n,s,d,y,O){u(n,e,s);var k,T,M,j=function(t){if(t===d&&L)return L;if(!b&&t&&t in D)return D[t];switch(t){case x:case P:case S:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",A=!1,D=t.prototype,W=D[w]||D["@@iterator"]||d&&D[d],L=!b&&W||j(d),I="Array"===e&&D.entries||W;if(I&&(k=c(I.call(new t)))!==Object.prototype&&k.next&&(i||c(k)===g||(h?h(k,g):a(k[w])||p(k,w,E)),l(k,C,!0,!0),i&&(v[C]=E)),_&&d===P&&W&&W.name!==P&&(!i&&m?f(D,"name",P):(A=!0,L=function(){return r(W,this)})),d)if(T={values:j(P),keys:y?L:j(x),entries:j(S)},O)for(M in T)(b||A||!(M in D))&&p(D,M,T[M]);else o({target:e,proto:!0,forced:b||A},T);return i&&!O||D[w]===L||p(D,w,L,{name:d}),v[e]=L,T}},9617:function(t,e,n){var o=n(7084),r=n(8669),i=n(4542),s=n(5735),a=n(8745),u=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,l="enumerable",f="configurable",p="writable";e.f=o?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var o=h(t,e);o&&o[p]&&(t[e]=n.value,n={configurable:f in n?n[f]:o[f],enumerable:l in n?n[l]:o[l],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9731:function(t,e,n){var o=n(9391);t.exports=!o(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},9915:function(t,e,n){var o=n(7084),r=n(9617),i=n(8612);t.exports=o?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9950:function(t,e,n){var o=n(5514),r=n(3237);t.exports=function(t,e){var n=t[e];return r(n)?void 0:o(n)}}}]);