1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6371],{18985:function(t,e,n){n.r(e),n.d(e,{default:function(){return j}});var i,o,r=n(43964),a=n(52983),s=n(84064);function l(t){var e=t.getContext("2d");if(!e)throw Error("Could not get 2d context from canvas");var n=t.width,i=t.height,o=e.getImageData(0,0,n,i).data,r=u(!0,n,i,o),a=u(!1,n,i,o),s=d(!0,n,i,o),l=d(!1,n,i,o);if(null===r||null===a||null===s||null===l)return t;var c=l-s+1,h=a-r+1,f=e.getImageData(s,r,c,h);return t.width=c,t.height=h,e.clearRect(0,0,c,h),e.putImageData(f,0,0),t}function c(t,e,n,i){return({red:i[(n*e+t)*4],green:i[(n*e+t)*4+1],blue:i[(n*e+t)*4+2],alpha:i[(n*e+t)*4+3]}).alpha}function u(t,e,n,i){for(var o=t?1:-1,r=t?0:n-1,a=r;t?a<n:a>-1;a+=o)for(var s=0;s<e;s++)if(c(s,a,e,i))return a;return null}function d(t,e,n,i){for(var o=t?1:-1,r=t?0:e-1,a=r;t?a<e:a>-1;a+=o)for(var s=0;s<n;s++)if(c(a,s,e,i))return a;return null}n(97458),n(78520),n(43412),n(63730);var h=function(t,e,n){void 0===e&&(e="La Belle Aurore"),void 0===n&&(n="1.5em");var i=(0,r.f)().createElement("canvas"),o=i.getContext("2d");if(o){i.width=2240,i.height=400,o.clearRect(0,0,i.width,i.height),o.scale(4,4),o.font="".concat(n," ").concat(e),o.fillStyle="#000",o.textBaseline="middle";var a=o.measureText(t).width,s=1.5*parseInt(n);return o.scale(.25,.25),i.width=4*a+160,i.height=4*s+160,o.clearRect(0,0,i.width,i.height),o.scale(4,4),o.font="".concat(n," ").concat(e),o.fillStyle="#000",o.textBaseline="middle",o.fillText(t,20,i.height/2/4),i}};function f(){return(f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}function p(t){return(p="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})(t)}function v(t,e){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_=function(){return!!t})()}function y(t,e,n){this.x=t,this.y=e,this.time=n||new Date().getTime()}function m(t,e,n,i){this.startPoint=t,this.control1=e,this.control2=n,this.endPoint=i}function x(t,e){var n,i,o,r,a,s,l,c,u,d=this,h=e||{};(this.velocityFilterWeight=h.velocityFilterWeight||.7,this.minWidth=h.minWidth||.5,this.maxWidth=h.maxWidth||2.5,this.throttle="throttle"in h?h.throttle:16,this.minDistance="minDistance"in h?h.minDistance:5,this.throttle)?this._strokeMoveUpdate=(n=x.prototype._strokeUpdate,i=this.throttle,l=null,c=0,o||(o={}),u=function(){c=!1===o.leading?0:Date.now(),l=null,s=n.apply(r,a),l||(r=a=null)},function(){var t=Date.now();c||!1!==o.leading||(c=t);var e=i-(t-c);return r=this,a=arguments,e<=0||e>i?(l&&(clearTimeout(l),l=null),c=t,s=n.apply(r,a),l||(r=a=null)):l||!1===o.trailing||(l=setTimeout(u,e)),s}):this._strokeMoveUpdate=x.prototype._strokeUpdate,this.dotSize=h.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=h.penColor||"black",this.backgroundColor=h.backgroundColor||"rgba(0,0,0,0)",this.onBegin=h.onBegin,this.onEnd=h.onEnd,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(d._mouseButtonDown=!0,d._strokeBegin(t))},this._handleMouseMove=function(t){d._mouseButtonDown&&d._strokeMoveUpdate(t)},this._handleMouseUp=function(t){1===t.which&&d._mouseButtonDown&&(d._mouseButtonDown=!1,d._strokeEnd(t))},this._handleTouchStart=function(t){if(1===t.targetTouches.length){var e=t.changedTouches[0];d._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];d._strokeMoveUpdate(e)},this._handleTouchEnd=function(t){t.target===d._canvas&&(t.preventDefault(),d._strokeEnd(t))},this.on()}y.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},y.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},y.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.time===t.time},m.prototype.length=function(){for(var t=0,e=void 0,n=void 0,i=0;i<=10;i+=1){var o=i/10,r=this._point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){var s=r-e,l=a-n;t+=Math.sqrt(s*s+l*l)}e=r,n=a}return t},m.prototype._point=function(t,e,n,i,o){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*i*(1-t)*t*t+o*t*t*t},x.prototype.clear=function(){var t=this._ctx,e=this._canvas;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._isEmpty=!0},x.prototype.fromDataURL=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new Image,o=n.ratio||window.devicePixelRatio||1,r=n.width||this._canvas.width/o,a=n.height||this._canvas.height/o;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,r,a)},this._isEmpty=!1},x.prototype.toDataURL=function(t){var e;if("image/svg+xml"===t)return this._toSVG();for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return(e=this._canvas).toDataURL.apply(e,[t].concat(i))},x.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},x.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},x.prototype.isEmpty=function(){return this._isEmpty},x.prototype._strokeBegin=function(t){this._data.push([]),this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},x.prototype._strokeUpdate=function(t){var e=t.clientX,n=t.clientY,i=this._createPoint(e,n),o=this._data[this._data.length-1],r=o&&o[o.length-1],a=r&&i.distanceTo(r)<this.minDistance;if(!(r&&a)){var s=this._addPoint(i),l=s.curve,c=s.widths;l&&c&&this._drawCurve(l,c.start,c.end),this._data[this._data.length-1].push({x:i.x,y:i.y,time:i.time,color:this.penColor})}},x.prototype._strokeEnd=function(t){var e=this.points.length>2,n=this.points[0];if(!e&&n&&this._drawDot(n),n){var i=this._data[this._data.length-1],o=i[i.length-1];n.equals(o)||i.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"==typeof this.onEnd&&this.onEnd(t)},x.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},x.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},x.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},x.prototype._createPoint=function(t,e,n){var i=this._canvas.getBoundingClientRect();return new y(t-i.left,e-i.top,n||new Date().getTime())},x.prototype._addPoint=function(t){var e=this.points;if(e.push(t),e.length>2){3===e.length&&e.unshift(e[0]);var n=this._calculateCurveControlPoints(e[0],e[1],e[2]).c2,i=this._calculateCurveControlPoints(e[1],e[2],e[3]).c1,o=new m(e[1],n,i,e[2]),r=this._calculateCurveWidths(o);return e.shift(),{curve:o,widths:r}}return{}},x.prototype._calculateCurveControlPoints=function(t,e,n){var i=t.x-e.x,o=t.y-e.y,r=e.x-n.x,a=e.y-n.y,s={x:(t.x+e.x)/2,y:(t.y+e.y)/2},l={x:(e.x+n.x)/2,y:(e.y+n.y)/2},c=Math.sqrt(r*r+a*a),u=s.x-l.x,d=s.y-l.y,h=c/(Math.sqrt(i*i+o*o)+c),f={x:l.x+u*h,y:l.y+d*h},p=e.x-f.x,v=e.y-f.y;return{c1:new y(s.x+p,s.y+v),c2:new y(l.x+p,l.y+v)}},x.prototype._calculateCurveWidths=function(t){var e=t.startPoint,n=t.endPoint,i={start:null,end:null},o=this.velocityFilterWeight*n.velocityFrom(e)+(1-this.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(o);return i.start=this._lastWidth,i.end=r,this._lastVelocity=o,this._lastWidth=r,i},x.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)},x.prototype._drawPoint=function(t,e,n){var i=this._ctx;
1i.moveTo(t,e),i.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1},x.prototype._drawCurve=function(t,e,n){var i=this._ctx,o=n-e,r=Math.floor(t.length());i.beginPath();for(var a=0;a<r;a+=1){var s=a/r,l=s*s,c=l*s,u=1-s,d=u*u,h=d*u,f=h*t.startPoint.x;f+=3*d*s*t.control1.x+3*u*l*t.control2.x+c*t.endPoint.x;var p=h*t.startPoint.y;p+=3*d*s*t.control1.y+3*u*l*t.control2.y+c*t.endPoint.y;var v=e+c*o;this._drawPoint(f,p,v)}i.closePath(),i.fill()},x.prototype._drawDot=function(t){var e=this._ctx,n="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,n),e.closePath(),e.fill()},x.prototype._fromData=function(t,e,n){for(var i=0;i<t.length;i+=1){var o=t[i];if(o.length>1)for(var r=0;r<o.length;r+=1){var a=o[r],s=new y(a.x,a.y,a.time),l=a.color;if(0===r)this.penColor=l,this._reset(),this._addPoint(s);else if(r!==o.length-1){var c=this._addPoint(s),u=c.curve,d=c.widths;u&&d&&e(u,d,l)}}else this._reset(),n(o[0])}},x.prototype._toSVG=function(){var t=this,e=this._data,n=this._canvas,i=Math.max(window.devicePixelRatio||1,1),o=n.width/i,r=n.height/i,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(e,function(t,e,n){var i=document.createElement("path");if(!isNaN(t.control1.x)&&!isNaN(t.control1.y)&&!isNaN(t.control2.x)&&!isNaN(t.control2.y)){var 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);i.setAttribute("d",o),i.setAttribute("stroke-width",(2.25*e.end).toFixed(3)),i.setAttribute("stroke",n),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),a.appendChild(i)}},function(e){var n=document.createElement("circle"),i="function"==typeof t.dotSize?t.dotSize():t.dotSize;n.setAttribute("r",i),n.setAttribute("cx",e.x),n.setAttribute("cy",e.y),n.setAttribute("fill",e.color),a.appendChild(n)});var s=a.innerHTML;if(void 0===s){var l=document.createElement("dummy"),c=a.childNodes;l.innerHTML="";for(var u=0;u<c.length;u+=1)l.appendChild(c[u].cloneNode(!0));s=l.innerHTML}return"data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+o+" "+r+'" width="'+o+'" height="'+r+'">'+s+"</svg>")},x.prototype.fromData=function(t){var e=this;this.clear(),this._fromData(t,function(t,n){return e._drawCurve(t,n.start,n.end)},function(t){return e._drawDot(t)}),this._data=t},x.prototype.toData=function(){return this._data};var w={exports:{}},b=(w.exports,o||(o=1,i=function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){function n(t,e,n,i){return({red:i[4*(n*e+t)],green:i[4*(n*e+t)+1],blue:i[4*(n*e+t)+2],alpha:i[4*(n*e+t)+3]}).alpha}function i(t,e,i,o){for(var r=t?1:-1,a=t?0:i-1,s=a;t?s<i:s>-1;s+=r)for(var l=0;l<e;l++)if(n(l,s,e,o))return s;return null}function o(t,e,i,o){for(var r=t?1:-1,a=t?0:e-1,s=a;t?s<e:s>-1;s+=r)for(var l=0;l<i;l++)if(n(s,l,e,o))return s;return null}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.getContext("2d"),n=t.width,r=t.height,a=e.getImageData(0,0,n,r).data,s=i(!0,n,r,a),l=i(!1,n,r,a),c=o(!0,n,r,a),u=o(!1,n,r,a)-c+1,d=l-s+1,h=e.getImageData(c,s,u,d);return t.width=u,t.height=d,e.clearRect(0,0,u,d),e.putImageData(h,0,0),t}}])},w.exports=i()),w.exports),C=(0,r.g)(b),P=["canvasProps","clearOnResize"],E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw 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&&v(t,e)}(i,t);var e,n=(e=_(),function(){var t,n=g(i);return t=e?Reflect.construct(n,arguments,g(this).constructor):n.apply(this,arguments),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){var t;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,o=Array(e),r=0;r<e;r++)o[r]=arguments[r];return(t=n.call.apply(n,[this].concat(o))).staticThis=t.constructor,t._sigPad=null,t._canvas=null,t.setRef=function(e){t._canvas=e,null===t._canvas&&(t._sigPad=null)},t._excludeOurProps=function(){var e=t.props;return e.canvasProps,e.clearOnResize,function(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n={};for(var i in t)if(({}).hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],-1===e.indexOf(n)&&({}).propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,P)},t.componentDidMount=function(){var e=t.getCanvas();t._sigPad=new x(e,t._excludeOurProps()),t._resizeCanvas(),t.on()},t.componentWillUnmount=function(){t.off()},t.componentDidUpdate=function(){Object.assign(t._sigPad,t._excludeOurProps())},t.getCanvas=function(){if(null===t._canvas)throw t.staticThis.refNullError;return t._canvas},t.getTrimmedCanvas=function(){var e=t.getCanvas(),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0),C(n)},t.getSignaturePad=function(){if(null===t._sigPad)throw t.staticThis.refNullError;return t._sigPad},t._checkClearOnResize=function(){t.props.clearOnResize&&t._resizeCanvas()},t._resizeCanvas=function(){var e,n,i=null!==(e=t.props.canvasProps)&&void 0!==e?e:{},o=i.width,r=i.height;if(void 0===o||void 0===r){var a=t.getCanvas(),s=Math.max(null!==(n=window.devicePixelRatio)&&void 0!==n?n:1,1);void 0===o&&(a.width=a.offsetWidth*s),void 0===r&&(a.height=a.offsetHeight*s),a.getContext("2d").scale(s,s),t.clear()}},t.render=function(){var e=t.props.canvasProps;return a.createElement("canvas",f({ref:t.setRef},e))},t.on=function(){return window.addEventListener("resize",t._checkClearOnResize),t.getSignaturePad().on()},t.off=function(){return window.removeEventListener("resize",t._checkClearOnResize),t.getSignaturePad().off()},t.clear=function(){return t.getSignaturePad().clear()},t.isEmpty=function(){return t.getSignaturePad().isEmpty()},t.fromDataURL=function(e,n){return t.getSignaturePad().fromDataURL(e,n)},t.toDataURL=function(e,n){return t.getSignaturePad().toDataURL(e,n)},t.fromData=function(e){return t.getSignaturePad().fromData(e)},t.toData=function(){return t.getSignaturePad().toData()},t}return Object.defineProperty(i,"prototype",{writable:!1}),i}
1(a.Component);E.propTypes={velocityFilterWeight:s.P.number,minWidth:s.P.number,maxWidth:s.P.number,minDistance:s.P.number,dotSize:s.P.oneOfType([s.P.number,s.P.func]),penColor:s.P.string,throttle:s.P.number,onEnd:s.P.func,onBegin:s.P.func,canvasProps:s.P.object,clearOnResize:s.P.bool},E.defaultProps={clearOnResize:!0},E.refNullError=Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var S=(0,a.forwardRef)(function(t,e){var n=t.fieldKey,i=t.repeatIndex,o=t.responsiveStyles,s=t.defaultValue,l=void 0===s?null:s,c=t.disabled,u=t.showClear,d=t.onClear,h=void 0===d?function(){}:d,f=t.onEnd,p=void 0===f?function(){}:f,v=t.translation,g=(0,r.b)((0,a.useState)(null!==l),2),_=g[0],y=g[1],m=(0,a.useRef)(void 0),x=o.getTarget("field",!0);return(0,a.useImperativeHandle)(e,function(){return{clear:function(){var t;null===(t=m.current)||void 0===t||t.clear()},isEmpty:function(){var t;return null===(t=m.current)||void 0===t?void 0:t.isEmpty()},getTrimmedCanvas:function(){var t;return null===(t=m.current)||void 0===t?void 0:t.getTrimmedCanvas()},getCanvas:function(){var t;return null===(t=m.current)||void 0===t?void 0:t.getCanvas()},fromDataURL:function(t,e){var n;return null===(n=m.current)||void 0===n?void 0:n.fromDataURL(t,e)}}}),(0,a.useEffect)(function(){!function(){var t;(0,r.k)(this,void 0,void 0,function(){var e,n,i,o,a;return(0,r.l)(this,function(s){switch(s.label){case 0:if((e=null===(t=m.current)||void 0===t?void 0:t.getCanvas())&&null===l)return e.getContext("2d").clearRect(0,0,e.width,e.height),[2];return[4,l];case 1:if(!(n=s.sent()))return[3,3];return[4,(0,r.ap)(n)];case 2:return o=s.sent(),[3,4];case 3:o="",s.label=4;case 4:return i=o,(a=new Image).onload=function(){if(e){var t,n,o=Math.min(e.offsetWidth/a.width,e.offsetHeight/a.height,1.5),s=a.width*o,l=a.height*o,c=e.offsetHeight-l;e.getContext("2d").clearRect(0,0,e.width,e.height),t=e,n={width:s,height:l,xOffset:0,yOffset:c},new Promise(function(e,o){var a=t.getContext("2d"),s=new Image,l=n.ratio||(0,r.ao)(),c=n.width||t.width/l,u=n.height||t.height/l,d=n.xOffset||0,h=n.yOffset||0;s.onload=function(){null==a||a.drawImage(s,d,h,c,u),e()},s.onerror=function(t){o(t)},s.crossOrigin="anonymous",s.src=i})}},a.src=i,[2]}})})}()},[l]),(0,r.a)(r.F,{children:[(void 0===u||u)&&_&&(0,r.j)("div",(0,r._)({css:(0,r._)((0,r._)({background:"#ffffff",position:"absolute",bottom:"5px",right:"5px",borderRadius:"6px",display:"flex",cursor:"pointer",color:"rgb(173, 173, 173)",fontSize:"14px",transition:"0.15s ease-in-out all"},void 0!==c&&c?o.getTarget("disabled"):{}),{"&:hover":{color:"black"}}),onClick:function(){m.current.clear(),h(),y(!1)}},{children:v.clear})),(0,r.j)(E,{penColor:"black",dotSize:4,minWidth:1.5,maxWidth:3,clearOnResize:!1,canvasProps:{id:"".concat(n).concat(i),style:(0,r._)((0,r._)({},x),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})},ref:m,onEnd:function(){p(),y(!m.current.isEmpty())}})]})});function k(t){var e,n,i=t.show,o=void 0!==i&&i,s=t.setShow,c=void 0===s?function(){}:s,u=t.fieldKey,d=t.repeatIndex,f=t.defaultValue,p=t.responsiveStyles,v=t.onClear,g=void 0===v?function(){}:v,_=t.onEnd,y=void 0===_?function(){}:_,m=t.signMethods,x=void 0===m?"":m,w=t.isInitials,b=void 0!==w&&w,C=t.translation,P="draw"===x,E=(0,r.b)((0,a.useState)(P),2),k=E[0],D=E[1],j=(0,r.b)((0,a.useState)(""),2),R=j[0],T=j[1],O=(0,r.b)((0,a.useState)(!1),2),M=O[0],I=O[1],z=(0,r.b)((0,a.useState)(),2),L=z[0],W=z[1],B=(0,r.b)((0,a.useState)(""),2),F=B[0],U=B[1],A=(0,a.useRef)(R),N=(0,a.useRef)(null),V=b?"feathery-signer-initials":"feathery-signer-name",q=function(){return sessionStorage.getItem(V)||""};(0,a.useEffect)(function(){o&&T(q())},[o]),(0,a.useEffect)(function(){A.current=R,""!==R?(I(!0),K()):(U(""),W(void 0),I(!1))},[R]);var H=function(){W(void 0),U(""),T(""),P||D(!1)},K=(0,a.useCallback)((0,r.n)(function(){var t=A.current;if(!t){U(""),W(void 0),I(!1);return}try{var e=h(t);if(!e)throw Error("Could not find signature canvas");var n=l(e).toDataURL("image/png",1),i=(0,r.ar)(n,"".concat(u,".png"));U(n),W(i),I(!1)}catch(t){console.error("Error generating signature:",t),I(!1)}},1e3),[]),G=function(){c(!1),H()},Y=function(){L&&(y(L),sessionStorage.setItem(V,R),c(!1),H())};return o?(0,r.a)("div",(0,r._)({css:{position:"fixed",display:"flex",top:0,left:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.2)",zIndex:r.aq,alignItems:"center",justifyContent:"center",fontSize:"16px",fontFamily:null!==(n=null===(e=null==p?void 0:p.getTarget("fc"))||void 0===e?void 0:e.fontFamily)&&void 0!==n?n:"sans-serif"}},{children:[(0,r.j)("div",{onClick:function(){return G()},css:{position:"fixed",top:0,left:0,width:"100%",height:"100%"}}),(0,r.a)("div",(0,r._)({className:"feathery-modal",css:{position:"relative",backgroundColor:"#fff",borderRadius:"14px",width:"100%",maxWidth:"600px"}},{children:[(0,r.a)("div",(0,r._)({css:{position:"relative",display:"flex",padding:"20px",borderBottom:"1px solid #e9e9e9"}},{children:[(0,r.j)("h3",(0,r._)({css:{padding:0,margin:0,flex:"1"}},{children:b?C.initials_title:C.title})),(0,r.j)(r.ab,{onClick:function(){return G()},css:{"&:hover":{cursor:"pointer"}}})]})),(0,r.a)("div",(0,r._)({css:{position:"relative",padding:"20px 20px 30px 20px","& h3":{fontSize:"1em",margin:0,padding:0}}},{children:[!k&&!P&&(0,r.a)(r.F,{children:[(0,r.a)("div",(0,r._)({css:{display:"flex",gap:"15p
1x",flexDirection:"column",paddingBottom:"30px"}},{children:[(0,r.j)("h3",{children:b?C.initials_type_option:C.type_option}),(0,r.j)("input",{defaultValue:q(),onChange:function(t){T(t.target.value.trim())},placeholder:b?C.initials_type_placeholder:C.type_placeholder,css:{padding:"8px 10px",borderRadius:"4px",border:"1px solid #e9e9e9","&:focus,&:focus-visible":{border:"1px solid #5e5e5e",outline:"none"}}}),(0,r.a)("div",(0,r._)({css:{position:"relative",width:"100%",height:"100px",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2em",fontFamily:"La Belle Aurore"}},{children:[M&&(0,r.j)("div",(0,r._)({css:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"sans-serif",fontSize:".9rem",borderRadius:"4px"}},{children:b?C.initials_type_loading:C.type_loading})),F?(0,r.j)("img",{src:F,alt:"Signature",css:{maxHeight:"100%",maxWidth:"100%"}}):b?C.initials_type_example:C.type_example]}))]})),"type"!==x&&(0,r.a)(r.F,{children:[(0,r.j)("div",(0,r._)({css:{height:"1px",display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #e9e9e9"}},{children:(0,r.j)("div",(0,r._)({css:{backgroundColor:"#fff",padding:"10px",color:"#5e5e5e"}},{children:C.or_label}))})),(0,r.j)("div",(0,r._)({css:{paddingTop:"30px"}},{children:(0,r.a)("div",(0,r._)({onClick:function(){return D(!0)},css:{padding:"20px",borderRadius:"4px",border:"1px solid #e9e9e9","& h3":{padding:0,margin:0,marginBottom:"10px"},"& p":{margin:0,padding:0},"&:hover":{border:"1px solid #5e5e5e",cursor:"pointer"}}},{children:[(0,r.j)("h3",{children:b?C.initials_draw_option:C.draw_option}),(0,r.j)("p",{children:b?C.initials_draw_subtitle:C.draw_subtitle})]}))}))]})]}),k&&(0,r.a)("div",(0,r._)({css:{display:"flex",flexDirection:"column",gap:"15px"}},{children:[(0,r.j)("p",(0,r._)({css:{margin:0,padding:0}},{children:b?C.initials_draw_instructions:C.draw_instructions})),(0,r.j)("div",(0,r._)({css:{position:"relative",width:"100%",height:"200px"}},{children:(0,r.j)(S,{ref:N,fieldKey:u,repeatIndex:d,responsiveStyles:p,onClear:g,onEnd:function(){try{var t,e,n,i=(t=N.current.getCanvas(),n=(e=(0,r.f)().createElement("canvas")).getContext("2d"),e.width=t.width,e.height=t.height,n&&n.drawImage(t,0,0),e);if(!i)throw Error("Could not find signature canvas");var o=l(i).toDataURL("image/png",1),a=(0,r.ar)(o,"".concat(u,".png"));U(o),W(a)}catch(t){console.error("Error generating signature:",t)}},showClear:!1,translation:C})}))]}))]})),(0,r.a)("div",(0,r._)({css:{position:"relative",display:"flex",padding:"20px 20px",borderTop:"1px solid #e9e9e9",justifyContent:"space-between","& button":{padding:"12px 0px",width:"120px",borderRadius:"4px",outline:"none",border:"none",fontSize:"1rem",transition:"background-color ease-in-out 0.1s","&:hover":{cursor:"pointer"}}}},{children:[P||!k?(0,r.j)("button",(0,r._)({onClick:function(){return G()},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:C.cancel})):(0,r.j)("button",(0,r._)({onClick:function(t){t.preventDefault(),D(!1),W(void 0)},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:C.back})),(0,r.a)("div",{children:[f&&(0,r.j)("button",(0,r._)({onClick:function(t){t.preventDefault(),g()},css:{marginRight:"10px","&:hover":{backgroundColor:"#e1e1e1"}}},{children:C.clear})),(0,r.j)("button",(0,r._)({onClick:function(){M||Y()},disabled:M||!L,css:{backgroundColor:"#535353",color:"#fff","&:hover":{backgroundColor:"#3a3a3a"},"&:disabled":{"&:hover":{cursor:"not-allowed"}}}},{children:b?C.initials_confirm:C.confirm}))]})]}))]}))]})):null}var D={label:"Sign here",title:"Add your signature",type_option:"Type your signature",type_placeholder:"Your full name",type_example:"Full Name",type_loading:"Generating signature",or_label:"or",draw_option:"Draw your signature",draw_subtitle:"Draw your signature here using your mouse or trackpad",draw_instructions:"Draw your signature in the box below",confirm:"Sign",cancel:"Cancel",back:"Back",clear:"Clear",initials_label:"Initial here",initials_title:"Add your initials",initials_type_option:"Type your initials",initials_type_placeholder:"Your initials",initials_type_example:"A.B.",initials_type_loading:"Generating initials",initials_draw_option:"Draw your initials",initials_draw_subtitle:"Draw your initials here using your mouse or trackpad",initials_draw_instructions:"Draw your initials in the box below",initials_confirm:"Initial"};function j(t){var e,i,o,s,l,c=t.element,u=t.responsiveStyles,d=t.defaultValue,h=void 0===d?null:d,f=t.editMode,p=t.repeatIndex,v=t.elementProps,g=t.disabled,_=void 0!==g&&g,y=t.onEnd,m=t.onClear,x=t.ReactPortal,w=void 0===x?null:x,b=t.children,C=(0,r.b)((0,a.useState)(!1),2),P=C[0],E=C[1],j=null!==(e=c.servar)&&void 0!==e?e:{},R=null!==(i=j.key)&&void 0!==i?i:c.key,T=(null===(o=j.metadata)||void 0===o?void 0:o.sign_type)==="initials",O=(0,r._)((0,r._)({},D),c.properties.translate);return(0,a.useEffect)(function(){n.g.webfontloaderPromise||(n.g.webfontloaderPromise=n.e(3461).then(n.bind(n,59137)).then(function(t){return t.w})),n.g.webfontloaderPromise.then(function(t){t.load({google:{families:["La Belle Aurore"]}})})},[]),(0,r.a)(r.F,{children:[(0,r.j)(null!=w?w:function(t){var e=t.children;return(0,r.j)(r.F,{children:e})},{children:(0,r.j)(k,{show:P,setShow:E,defaultValue:h,fieldKey:R,repeatIndex:p,responsiveStyles:u,onClear:void 0===m?function(){}:m,onEnd:void 0===y?function(){}:y,signMethods:null!==(l=null===(s=j.metadata)||void 0===s?void 0:s.sign_methods)&&void 0!==l?l:"",isInitials:T,translation:O})}),(0,r.a)("div",(0,r._)({css:(0,r._)((0,r._)({maxWidth:"100%",width:"100%",height:"100%"},u.getTarget("fc")),{position:"relative",pointerEvents:f||_?"none":"auto"})},void 0===v?{}:v,{children:[b,(0,r.a)("div",(0,r._)({css:(0,r._)({position:"relative"},u.getTarget("sub-fc"))},{children:[(0,r.a)(a.Suspense,(0,r._)({fallback:(0,r.j)("div",{css:(0,r._)((0,r._)({},u.getTarget("field",!0)),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})})},{children:[(0,r.j)("div",(0,r._)({onClick:function(){_||E(!0)},css:(0,r._)((0,r._)({position:"absolute",display:"flex",top:0,left:0,width:"100%",height:"100%",zIndex:r.q,alignItems:"center",justifyContent:"center"},_?{backgroundColor:"rgb(229, 229, 229)"}:{}),{"&:hover":{cursor:"pointer"}})},{children:!h&&!_&&(j.name||(T?O.initials_label:O.label))})),(0,r.j)(S,{fieldKey:R,repeatIndex:p,responsiveStyles:u,defaultValue:h,disabled:_,showClear:!1,translation:O})]})),(0,r.j)(r.E,{id:j.key,"aria-label":c.properties.aria_label})]}))]}))]})}}}]);
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.