vendor: 2,214 bytes, line 1
1"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 r=n(9329),o=n(5376),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},78:function(t,e,n){var r=n(6733),o=n(8389),i=n(962),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw new s("Can't convert object to primitive value")}},79:function(t,e,n){var r=n(9617).f,o=n(6401),i=n(8979)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(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 r=n(2697).IteratorPrototype,o=n(8584),i=n(8612),s=n(79),a=n(237),c=function(){return this};t.exports=function(t,e,n,u){var h=e+" Iterator";return t.prototype=o(r,{next:i(+!u,n)}),s(t,h,!1,!0),a[h]=c,t}},446:function(t,e,n){var r=n(9227),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},455:function(t,e,n){function r(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var s=t.apply(e,n);function a(t){r(s,o,i,a,c,"next",t)}function c(t){r(s,o,i,a,c,"throw",t)}a(void 0)})}}n.d(e,{A:function(){return o}})},469:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},565:function(t,e,n){var r=n(7383),o=n(8389),i=n(4937),s=n(4272),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},798:function(t,e,n){var r=n(4411),o=n(8389),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},877:function(t,e,n){var r=n(4411),o=n(3817),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},962:function(t,e,n){var r=n(8389),o=n(5387),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}
vendor: 3,244 bytes, line 1
1},1154:function(t,e,n){var r=n(5920),o=n(5514);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},1409:function(t,e,n){var r=n(6805),o=n(2170),i=n(8742),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),h=o(s,u);if(t&&n!=n){for(;u>h;)if((a=c[h++])!=a)return!0}else for(;u>h;h++)if((t||h in c)&&c[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},1461:function(t,e,n){var r=n(8979),o=n(8584),i=n(9617).f,s=r("unscopables"),a=Array.prototype;void 0===a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1575:function(t,e,n){var r=n(7383),o=n(5920),i=n(8560),s=n(213),a=n(5735),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},1789:function(t,e,n){var r,o,i,s=n(798),a=n(4411),c=n(962),u=n(9915),h=n(6401),l=n(877),p=n(23),f=n(7285),d="Object already initialized",v=a.TypeError,_=a.WeakMap;if(s||l.state){var y=l.state||(l.state=new _);y.get=y.get,y.has=y.has,y.set=y.set,r=function(t,e){if(y.has(t))throw new v(d);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var m=p("state");f[m]=!0,r=function(t,e){if(h(t,m))throw new v(d);return e.facade=t,u(t,m,e),e},o=function(t){return h(t,m)?t[m]:{}},i=function(t){return h(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},1814:function(t,e,n){var r=n(3237),o=TypeError;t.exports=function(t){if(r(t))throw new o("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 r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{A:function(){return r}})},2170:function(t,e,n){var r=n(9227),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},2411:function(t){t.exports=!1},2697:function(t,e,n){var r,o,i,s=n(9391),a=n(8389),c=n(962),u=n(8584),h=n(6371),l=n(7448),p=n(8979),f=n(2411),d=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=h(h(i)))!==Object.prototype&&(r=o):v=!0),!c(r)||s(function(){var t={};return r[d].call(t)!==t})?r={}:f&&(r=u(r)),a(r[d])||l(r,d,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},2888:function(t,e,n){function r(t){return r="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},r(t)}n.d(e,{A:function(){return r}})},2943:function(t,e,n){var r=n(5920),o=n(9391),i=n(4512),s=Object,a=r("".split);t.exports=o(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?a(t,""):s(t)}:s},3036:function(t,e,n){var r=n(6401),o=n(1575),i=n(3763),s=n(9617);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,h=0;h<a.length;h++){var l=a[h];r(t,l)||n&&r(n,l)||c(t,l,u(e,l))}}},3175:function(t,e,n){var r=n(1154),o=n(5735),i=n(4546);
vendor: 4,117 bytes, line 1
1t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},3237:function(t){t.exports=function(t){return null==t}},3332:function(t,e,n){var r=n(5920),o=n(6401),i=n(6805),s=n(1409).indexOf,a=n(7285),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,h=[];for(n in r)!o(a,n)&&o(r,n)&&c(h,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(h,n)||c(h,n));return h}},3763:function(t,e,n){var r=n(7084),o=n(6733),i=n(4373),s=n(8612),a=n(6805),c=n(8745),u=n(6401),h=n(8669),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),h)try{return l(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},3809:function(t,e,n){var r=n(7084),o=n(4542),i=n(9617),s=n(5735),a=n(6805),c=n(8784);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,h=0;u>h;)i.f(t,n=o[h++],r[n]);return t}},3817:function(t,e,n){var r=n(4411),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},4156:function(t,e,n){var r=n(9391),o=n(8389),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n===h||n!==u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s},4272:function(t,e,n){var r=n(5007);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},4373:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},4411:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4512:function(t,e,n){var r=n(5920),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},4542:function(t,e,n){var r=n(7084),o=n(9391);t.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},4546:function(t,e,n){var r=n(8389),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},4937:function(t,e,n){var r=n(5920);t.exports=r({}.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 r=n(5724),o=n(9391),i=n(4411).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},5168:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5376:function(t,e,n){var r=n(5920),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+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 r=n(8389),o=n(4983),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},5724:function(t,e,n){var r,o,i=n(4411),s=n(5168),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,h=u&&u.v8;h&&(o=(r=h.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},5735:function(t,e,n){var r=n(962),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},5920:function(t,e,n){var r=n(6344),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);t.exports=r?s:function(t){return function(){return i.apply(t,arguments)}}},6344:function(t,e,n){var r=n(9391);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},6371:function(t,e,n){var r=n(6401),o=n(8389),i=n(8805),s=n(23),a=n(9731),c=s("IE_PROTO"),u=Object,h=u.prototype;
vendor: 12,888 bytes, line 1
1t.exports=a?u.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof u?h:null}},6401:function(t,e,n){var r=n(5920),o=n(8805),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},6433:function(t,e,n){n.d(e,{A:function(){return s}});var r=class{x;y;pressure;time;constructor(t,e,n,r){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=r||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}},o=class t{constructor(t,e,n,r,o,i){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=r,this.startWidth=o,this.endWidth=i}static fromPoints(e,n){const r=this.calculateControlPoints(e[0],e[1],e[2]).c2,o=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new t(e[1],r,o,e[2],n.start,n.end)}static calculateControlPoints(t,e,n){const o=t.x-e.x,i=t.y-e.y,s=e.x-n.x,a=e.y-n.y,c=(t.x+e.x)/2,u=(t.y+e.y)/2,h=(e.x+n.x)/2,l=(e.y+n.y)/2,p=Math.sqrt(o*o+i*i),f=Math.sqrt(s*s+a*a),d=p+f==0?0:f/(p+f),v=h+(c-h)*d,_=l+(u-l)*d,y=e.x-v,m=e.y-_;return{c1:new r(c+y,u+m),c2:new r(h+y,l+m)}}length(){let t,e,n=0;for(let r=0;r<=10;r+=1){const o=r/10,i=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){const r=i-t,o=s-e;n+=Math.sqrt(r*r+o*o)}t=i,e=s}return n}point(t,e,n,r,o){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*r*(1-t)*t*t+o*t*t*t}},i=class{_et;constructor(){try{this._et=new EventTarget}catch{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)}};var s=class t extends i{constructor(e,n={}){super(),this.canvas=e,this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle=n.throttle??16,this.minDistance=n.minDistance??5,this.dotSize=n.dotSize||0,this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=n.compositeOperation||"source-over",this.canvasContextOptions=n.canvasContextOptions??{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let n,r,o,i=0,s=null;const a=()=>{i=Date.now(),s=null,n=t.apply(r,o),s||(r=null,o=[])};return function(...c){const u=Date.now(),h=e-(u-i);return r=this,o=c,h<=0||h>e?(s&&(clearTimeout(s),s=null),i=u,n=t.apply(r,o),s||(r=null,o=[])):s||(s=window.setTimeout(a,h)),n}}(t.prototype._strokeUpdate,this.throttle):t.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._handlePointerCancel=this._handlePointerCancel.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}dotSize;minWidth;maxWidth;penColor;minDistance;velocityFilterWeight;compositeOperation;backgroundColor;throttle;canvasContextOptions;_ctx;_drawingStroke=!1;_isEmpty=!0;_dataUrl;_dataUrlOptions;_lastPoints=[];_data=[];_lastVelocity=0;_lastWidth=0;_strokeMoveUpdate;_strokePointerId;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._dataUrl=void 0,this._dataUrlOptions=void 0,this._strokePointerId=void 0}redraw(){const t=this._data,e=this._dataUrl,n=this._dataUrlOptions;this.clear(),e&&this.fromDataURL(e,n),this.fromData(t,{clear:!1})}fromDataURL(t,e={}){return new Promise((n,r)=>{const o=new Image,i=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/i,a=e.height||this.canvas.height/i,c=e.xOffset||0,u=e.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,c,u,s,a),n()},o.onerror=t=>{r(t)},o.crossOrigin="anonymous",o.src=t,this._isEmpty=!1,this._dataUrl=t,this._dataUrlOptions={...e}})}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",this.canvas.style.webkitUserSelect="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.style.webkitUserSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){const t=window.document===this.canvas.ownerDocument?window:this.canvas.ownerDocument.defaultView??this.canvas.ownerDocument;return{addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("pointercancel",this._handlePointerCancel),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd),t("touchcancel",this._handleTouchCancel)}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)))}_handlePointerCancel(t){this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handleTouchCancel(t){t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t),!1)}_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}),e("touchcancel",this._handleTouchCancel,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1}),e("pointercancel",this._handlePointerCancel,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),r={...n,points:[]};this._data.push(r),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],r=n.points,o=r.length>0&&r[r.length-1],i=!!o&&e.distanceTo(o)<=this.minDistance,s=this._getPointGroupOptions(n);if(!o||!o||!i){const t=this._addPoint(e,s);o?t&&this._drawCurve(t,s):this._drawDot(e,s),r.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 o=this.canvas.getBoundingClientRect();return new r(t-o.left,e-o.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),r=o.fromPoints(n,t);return n.shift(),r}return null}_calculateCurveWidths(t,e,n){const r=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(r,n),i={end:o,start:this._lastWidth};return this._lastVelocity=r,this._lastWidth=o,i}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const r=this._ctx;r.moveTo(t,e),r.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const n=this._ctx,r=t.endWidth-t.startWidth,o=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<o;n+=1){const i=n/o,s=i*i,a=s*i,c=1-i,u=c*c,h=u*c;let l=h*t.startPoint.x;l+=3*u*i*t.control1.x,l+=3*c*s*t.control2.x,l+=a*t.endPoint.x;let p=h*t.startPoint.y;p+=3*u*i*t.control1.y,p+=3*c*s*t.control2.y,p+=a*t.endPoint.y;const f=Math.min(t.startWidth+a*r,e.maxWidth);this._drawCurveSegment(l,p,f)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,r=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,r),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const o of t){const{points:t}=o,i=this._getPointGroupOptions(o);if(t.length>1)for(let n=0;n<t.length;n+=1){const o=t[n],s=new r(o.x,o.y,o.pressure,o.time);0===n&&this._reset(i);const a=this._addPoint(s,i);a&&e(a,i)}else this._reset(i),n(t[0],i)}}
vendor: 4,396 bytes, line 1
1toSVG({includeBackgroundColor:t=!1,includeDataUrl:e=!1}={}){const n=this._data,r=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/r,i=this.canvas.height/r,s=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),s.setAttribute("viewBox",`0 0 ${o} ${i}`),s.setAttribute("width",o.toString()),s.setAttribute("height",i.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),s.appendChild(t)}if(e&&this._dataUrl){const t=this._dataUrlOptions?.ratio||window.devicePixelRatio||1,e=this._dataUrlOptions?.width||this.canvas.width/t,n=this._dataUrlOptions?.height||this.canvas.height/t,r=this._dataUrlOptions?.xOffset||0,o=this._dataUrlOptions?.yOffset||0,i=document.createElement("image");i.setAttribute("x",r.toString()),i.setAttribute("y",o.toString()),i.setAttribute("width",e.toString()),i.setAttribute("height",n.toString()),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("href",this._dataUrl),s.appendChild(i)}return this._fromData(n,(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 r=`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",r),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),s.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:r,maxWidth:o})=>{const i=document.createElement("circle"),a=n>0?n:(r+o)/2;i.setAttribute("r",a.toString()),i.setAttribute("cx",t.x.toString()),i.setAttribute("cy",t.y.toString()),i.setAttribute("fill",e),s.appendChild(i)}),s.outerHTML}}},6454:function(t,e,n){var r=n(4411),o=n(3763).f,i=n(9915),s=n(7448),a=n(3817),c=n(3036),u=n(4156);t.exports=function(t,e){var n,h,l,p,f,d=t.target,v=t.global,_=t.stat;if(n=v?r:_?r[d]||a(d,{}):(r[d]||{}).prototype)for(h in e){if(p=e[h],l=t.dontCallGetSet?(f=o(n,h))&&f.value:n[h],!u(v?h:d+(_?".":"#")+h,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),s(n,h,p,t)}}},6733:function(t,e,n){var r=n(6344),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6746:function(t,e,n){var r=n(5920),o=n(8389),i=n(877),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6805:function(t,e,n){var r=n(2943),o=n(1814);t.exports=function(t){return r(o(t))}},7084:function(t,e,n){var r=n(9391);t.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},7285:function(t){t.exports={}},7383:function(t,e,n){var r=n(4411),o=n(8389);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},7448:function(t,e,n){var r=n(8389),o=n(9617),i=n(8075),s=n(3817);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&i(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},7453:function(t,e,n){var r=n(7383);t.exports=r("document","documentElement")},7593:function(t,e,n){var r=n(6733),o=n(962),i=n(565),s=n(9950),a=n(78),c=n(8979),u=TypeError,h=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=s(t,h);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},7920:function(t,e,n){var r=n(6805),o=n(1461),i=n(237),s=n(1789),a=n(9617).f,c=n(9552),u=n(17),h=n(2411),l=n(7084),p="Array Iterator",f=s.set,d=s.getterFor(p);t.exports=c(Array,"Array",function(t,e){f(this,{type:p,target:r(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,u(void 0,!0);switch(t.kind){case"keys":return u(n,!1);case"values":return u(e[n],!1)}return u([n,e[n]],!1)},"values");var v=i.Arguments=i.Array;
vendor: 6,059 bytes, line 1
1if(o("keys"),o("values"),o("entries"),!h&&l&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(t){}},8075:function(t,e,n){var r=n(5920),o=n(9391),i=n(8389),s=n(6401),a=n(7084),c=n(9470).CONFIGURABLE,u=n(6746),h=n(1789),l=h.enforce,p=h.get,f=String,d=Object.defineProperty,v=r("".slice),_=r("".replace),y=r([].join),m=a&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),g=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===v(f(e),0,7)&&(e="["+_(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&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 r=l(t);return s(r,"source")||(r.source=y(g,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return i(this)&&p(this).source||u(this)},"toString")},8389:function(t,e,n){var r=n(5387),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},8545:function(t,e,n){n.d(e,{A:function(){return o}});var r=n(2146);function o(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,r.A)(t,e)}},8560:function(t,e,n){var r=n(3332),o=n(2103).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8584:function(t,e,n){var r,o=n(5735),i=n(3809),s=n(2103),a=n(7285),c=n(7453),u=n(9511),h=n(23),l="prototype",p="script",f=h("IE_PROTO"),d=function(){},v=function(t){return"<"+p+">"+t+"</"+p+">"},_=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;y="undefined"!=typeof document?document.domain&&r?_(r):(e=u("iframe"),n="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):_(r);for(var o=s.length;o--;)delete y[l][s[o]];return y()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[l]=o(t),n=new d,d[l]=null,n[f]=t):n=y(),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 r=n(7084),o=n(9391),i=n(9511);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},8742:function(t,e,n){var r=n(446);t.exports=function(t){return r(t.length)}},8745:function(t,e,n){var r=n(7593),o=n(565);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},8784:function(t,e,n){var r=n(3332),o=n(2103);t.exports=Object.keys||function(t){return r(t,o)}},8805:function(t,e,n){var r=n(1814),o=Object;t.exports=function(t){return o(r(t))}},8856:function(t,e,n){n.d(e,{A:function(){return i}});var r=n(2888);function o(t){var e=function(t,e){if("object"!=(0,r.A)(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==(0,r.A)(e)?e:e+""}function i(t,e,n){return(e=o(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 r=n(4411),o=n(9329),i=n(6401),s=n(5376),a=n(5007),c=n(4272),u=r.Symbol,h=o("wks"),l=c?u.for||u:u&&u.withoutSetter||s;t.exports=function(t){return i(h,t)||(h[t]=a&&i(u,t)?u[t]:l("Symbol."+t)),h[t]}},9227:function(t,e,n){var r=n(469);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},9329:function(t,e,n){var r=n(2411),o=n(877);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.3",mode:r?"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 r=n(7084),o=n(6401),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},9511:function(t,e,n){var r=n(4411),o=n(962),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},9552:function(t,e,n){var r=n(6454),o=n(6733),i=n(2411),s=n(9470),a=n(8389),c=n(394),u=n(6371),h=n(3175),l=n(79),p=n(9915),f=n(7448),d=n(8979),v=n(237),_=n(2697),y=s.PROPER,m=s.CONFIGURABLE,g=_.IteratorPrototype,b=_.BUGGY_SAFARI_ITERATORS,w=d("iterator"),x="keys",P="values",S="entries",E=function(){return this};t.exports=function(t,e,n,s,d,_,O){c(n,e,s);var k,T,C,M=function(t){if(t===d&&W)return W;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)}},A=e+" Iterator",j=!1,D=t.prototype,U=D[w]||D["@@iterator"]||d&&D[d],W=!b&&U||M(d),L="Array"===e&&D.entries||U;if(L&&(k=u(L.call(new t)))!==Object.prototype&&k.next&&(i||u(k)===g||(h?h(k,g):a(k[w])||f(k,w,E)),l(k,A,!0,!0),i&&(v[A]=E)),y&&d===P&&U&&U.name!==P&&(!i&&m?p(D,"name",P):(j=!0,W=function(){return o(U,this)})),d)if(T={values:M(P),keys:_?W:M(x),entries:M(S)},O)for(C in T)(b||j||!(C in D))&&f(D,C,T[C]);else r({target:e,proto:!0,forced:b||j},T);return i&&!O||D[w]===W||f(D,w,W,{name:d}),v[e]=W,T}},9617:function(t,e,n){var r=n(7084),o=n(8669),i=n(4542),s=n(5735),a=n(8745),c=TypeError,u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",f="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n[f]){var r=h(t,e);
vendor: 691 bytes, line 1
1r&&r[f]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:l in n?n[l]:r[l],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9731:function(t,e,n){var r=n(9391);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},9915:function(t,e,n){var r=n(7084),o=n(9617),i=n(8612);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9950:function(t,e,n){var r=n(5514),o=n(3237);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.