instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n,r=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),i=null!=(n=e.value)?n:"";this.isEqualValue(i,o)||this.setEditorContents(this.editor,i)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),a(this.cleanProps,this.dirtyProps).some((function(t){return!c["default"](e[t],r.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!c["default"](e[n],t.props[n])}))},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var r=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,a=(r=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var s=this.editor;s.setContents(r),p((function(){return n.setEditorSelection(s,a)}))}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new f["default"](e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?c["default"](e.ops,t.ops):c["default"](e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),p((function(){return n.setEditorSelection(e,r)}))},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=l["default"].findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,r=t.preserveWhitespace,o={key:this.state.generation,ref:function(t){e.editingArea=t}};return u["default"].Children.count(n)?u["default"].cloneElement(u["default"].Children.only(n),o):r?u["default"].createElement("pre",i({},o)):u["default"].createElement("div",i({},o))},t.prototype.render=function(){var e;return u["default"].createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!=e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,r){var o,i;if(this.editor){var a=this.isDelta(this.value)?r.getContents():r.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(i=(o=this.props).onChange)||void 0===i||i.call(o,e,t,n,r))}},t.prototype.onEditorChangeSelection=function(e,t,n){var r,o,i,a,s,u;if(this.editor){var l=this.getEditorSelection(),f=!l&&e,d=l&&!e;c["default"](e,l)||(this.selection=e,null===(o=(r=this.props).onChangeSelection)||void 0===o||o.call(r,e,t,n),f?null===(a=(i=this.props).onFocus)||void 0===a||a.call(i,e,t,n):d&&(null===(u=(s=this.props).onBlur)||void 0===u||u.call(s,l,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=f["default"],t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(u["default"].Component);function p(e){Promise.resolve().then(e)}e.exports=d},4696:function(e,t,n){var r;e.exports=(r=n(1594),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n
=e;e++)t=e/u,n=this._point(t,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this._point(t,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y),e>0&&(a=n-o,s=r-i,l+=Math.sqrt(a*a+s*s)),o=n,i=r;return l}},{key:"_point",value:function(e,t,n,r,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+o*e*e*e}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n2,n=this.points[0];!t&&n&&this._strokeDraw(n),"function"==typeof this.onEnd&&this.onEnd(e)}},{key:"_createPoint",value:function(e){var t=this._canvas.getBoundingClientRect();return new c["default"](e.clientX-t.left,e.clientY-t.top)}},{key:"_addPoint",value:function(e){var t,n,r,o=this.points;o.push(e),o.length>2&&(3===o.length&&o.unshift(o[0]),t=this._calculateCurveControlPoints(o[0],o[1],o[2]).c2,n=this._calculateCurveControlPoints(o[1],o[2],o[3]).c1,r=new l["default"](o[1],t,n,o[2]),this._addCurve(r),o.shift())}},{key:"_calculateCurveControlPoints",value:function(e,t,n){var r=e.x-t.x,o=e.y-t.y,i=t.x-n.x,a=t.y-n.y,s={x:(e.x+t.x)/2,y:(e.y+t.y)/2},u={x:(t.x+n.x)/2,y:(t.y+n.y)/2},l=Math.sqrt(r*r+o*o),f=Math.sqrt(i*i+a*a),d=s.x-u.x,p=s.y-u.y,h=f/(l+f),m={x:u.x+d*h,y:u.y+p*h},y=t.x-m.x,g=t.y-m.y;return{c1:new c["default"](s.x+y,s.y+g),c2:new c["default"](u.x+y,u.y+g)}}},{key:"_addCurve",value:function(e){var t,n,r=e.startPoint;t=e.endPoint.velocityFrom(r),t=this.velocityFilterWeight*t+(1-this.velocityFilterWeight)*this._lastVelocity,n=this._strokeWidth(t),this._drawCurve(e,this._lastWidth,n),this._lastVelocity=t,this._lastWidth=n}},{key:"_drawPoint",value:function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1}},{key:"_drawCurve",value:function(e,t,n){var r,o,i,a,s,u,l,c,f,d,p,h=this._ctx,m=n-t;for(r=Math.floor(e.length()),h.beginPath(),i=0;r>i;i++)u=(s=(a=i/r)*a)*a,d=(f=(c=(l=1-a)*l)*l)*e.startPoint.x,d+=3*c*a*e.control1.x,d+=3*l*s*e.control2.x,d+=u*e.endPoint.x,p=f*e.startPoint.y,p+=3*c*a*e.control1.y,p+=3*l*s*e.control2.y,p+=u*e.endPoint.y,o=t+u*m,this._drawPoint(d,p,o);h.closePath(),h.fill()}},{key:"_strokeWidth",value:function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)}},{key:"render",value:function(){return u["default"].createElement("div",{id:"signature-pad",className:"m-signature-pad"},u["default"].createElement("div",{className:"m-signature-pad--body"},u["default"].createElement("canvas",{ref:"cv"})),this.props.clearButton&&u["default"].createElement("div",{className:"m-signature-pad--footer"},u["default"].createElement("button",{className:"btn btn-default button clear",onClick:this.clear.bind(this)},"Clear")))}}]),t}(u["default"].Component);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne instanceof HTMLElement;const o="blur",i="change",a="input",s="onBlur",u="onChange",l="onSubmit",c="onTouched",f="all",d="undefined",p="max",h="min",m="maxLength",y="minLength",g="pattern",v="required",b="validate";var w=e=>null==e;const O=e=>"object"==typeof e;var _=e=>!w(e)&&!Array.isArray(e)&&O(e)&&!(e instanceof Date),x=e=>/^\w*$/.test(e),k=e=>e.filter(Boolean),E=e=>k(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function C(e,t,n){let r=-1;const o=x(t)?[t]:E(t),i=o.length,a=i-1;for(;++r{for(const n in e)x(n)?t[n]=e[n]:C(t,n,e[n]);return t},j=e=>e===undefined,P=(e={},t,n)=>{const r=k(t.split(/[,[\].]+?/)).reduce(((e,t)=>w(e)?e:e[t]),e);return j(r)||r===e?j(e[t])?n:e[t]:r},A=(e,t)=>{r(e)&&e.removeEventListener&&(e.removeEventListener(a,t),e.removeEventListener(i,t),e.removeEventListener(o,t))};const D={isValid:!1,value:null};var T=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e),D):D,N=e=>"radio"===e.type,M=e=>"file"===e.type,L=e=>"checkbox"===e.type,I=e=>"select-multiple"===e.type;const R={value:!1,isValid:!1},q={value:!0,isValid:!0};var F=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.ref.checked)).map((({ref:{value:e}})=>e));return{value:t,isValid:!!t.length}}const{checked:t,value:n,attributes:r}=e[0].ref;return t?r&&!j(r.value)?j(n)||""===n?q:{value:n,isValid:!0}:q:R}return R};function V(e,t,n,r,o){const i=e.current[t];if(i){const{ref:{value:e,disabled:t},ref:n,valueAsNumber:s,valueAsDate:u,setValueAs:l}=i;if(t&&r)return;return M(n)?n.files:N(n)?T(i.options).value:I(n)?(a=n.options,[...a].filter((({selected:e})=>e)).map((({value:e})=>e))):L(n)?F(i.options).value:o?e:s?""===e?NaN:+e:u?n.valueAsDate:l?l(e):e}var a;if(n)return P(n.current,t)}function B(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&B(e.parentNode)}var U=e=>_(e)&&!Object.keys(e).length,H=e=>"boolean"==typeof e;function z(e,t){const n=x(t)?[t]:E(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r0&&(i=e);++o_(e)&&!U(e)||H(e))).length)&&(i?delete i[t]:delete e[t]),i=r}}return e}const W=(e,t)=>e&&e.ref===t;var K=e=>w(e)||!O(e);function Y(e,t){if(K(e)||K(t))return t;for(const r in t){const o=e[r],i=t[r];try{e[r]=_(o)&&_(i)||Array.isArray(o)&&Array.isArray(i)?Y(o,i):i}catch(n){}}return e}function G(t,n,r){if(K(t)||K(n)||t instanceof Date||n instanceof Date)return t===n;if(!(0,e.isValidElement)(t)){const e=Object.keys(t),o=Object.keys(n);if(e.length!==o.length)return!1;for(const o of e){const e=t[o];if(!r||"ref"!==o){const t=n[o];if((_(e)||Array.isArray(e))&&(_(t)||Array.isArray(t))?!G(e,t,r):e!==t)return!1}}}return!0}function $(e,t,n,r,o){let i=-1;for(;++iY($(e,t,n.slice(0,e.length)),$(t,e,n.slice(0,e.length))),Z=e=>"string"==typeof e,X=(e,t,n,r,o)=>{const i={};for(const t in e.current)(j(o)||(Z(o)?t.startsWith(o):Array.isArray(o)&&o.find((e=>t.startsWith(e)))))&&(i[t]=V(e,t,undefined,r));return n?S(i):Y(t,S(i))},J=e=>e instanceof RegExp,ee=e=>_(e)&&!J(e)?e:{value:e,message:""},te=e=>"function"==typeof e,ne=t=>Z(t)||(0,e.isValidElement)(t);function re(e,t,n="validate"){if(ne(e)||H(e)&&!e)return{type:n,message:ne(e)?e:"",ref:t}}var oe=(e,t,n,r,o)=>t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),{[r]:o||!0})}):{},ie=async(e,t,{ref:n,ref:{value:r},options:o,required:i,maxLength:a,minLength:s,min:u,max:l,pattern:c,validate:f},d)=>{const O=n.name,x={},k=N(n),E=L(n),C=k||E,S=""===r,j=oe.bind(null,O,t,x),P=(e,t,r,o=m,i=y)=>{const a=e?t:r;x[O]=Object.assign({type:e?o:i,message:a,ref:n},j(e?o:i,a))};if(i&&(!k&&!E&&(S||w(r))||H(r)&&!r||E&&!F(o).isValid||k&&!T(o).isValid)){const{value:r,message:o}=ne(i)?{value:!!i,message:i}:ee(i);if(r&&(x[O]=Object.assign({type:v,message:o,ref:C?((e.current[O].options||[])[0]||{}).ref:n},j(v,o)),!t))return x}if(!(w(u)&&w(l)||""===r)){let e,o;const i=ee(l),a=ee(u);if(isNaN(r)){const t=n.valueAsDate||new Date(r);Z(i.value)&&(e=t>new Date(i.value)),Z(a.value)&&(o=ti.value),w(a.value)||(o=te.value,i=!w(n.value)&&r.length{for(const r in t){const o=e+(_(t)?`.${r}`:`[${r}]`);K(t[r])?n.push(o):ae(o,t[r],n)}return n};var se=(e,t,n,r,o)=>{let i=undefined;return n.add(t),U(e)||(i=P(e,t),(_(i)||Array.isArray(i))&&ae(t,i).forEach((e=>n.add(e)))),j(i)?o?r:P(r,t):i},ue=({isOnBlur:e,isOnChange:t,isOnTouch:n,isTouched:r,isReValidateOnBlur:o,isReValidateOnChange:i,isBlurEvent:a,isSubmitted:s,isOnAll:u})=>!u&&(!s&&n?!(r||a):(s?o:e)?!a:!(s?i:t)||a),le=e=>e.substring(0,e.indexOf("["));const ce=(e,t)=>RegExp(`^${t}([|.)\\d+`.replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e);var fe=(e,t)=>[...e].some((e=>ce(t,e)));var de=typeof window!==d&&typeof document!==d;function pe(e){var t;let n;if(K(e)||de&&(e instanceof File||r(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return n=new Date(e.getTime()),n;if(e instanceof Set){n=new Set;for(const t of e)n.add(t);return n}if(e instanceof Map){n=new Map;for(const t of e.keys())n.set(t,pe(e.get(t)));return n}n=Array.isArray(e)?[]:{};for(const t in e)n[t]=pe(e[t]);return n}var he=e=>({isOnSubmit:!e||e===l,isOnBlur:e===s,isOnChange:e===u,isOnAll:e===f,isOnTouch:e===c}),me=e=>N(e)||L(e);const ye=typeof window===d,ge=de?"Proxy"in window:typeof Proxy!==d;function ve({mode:t=l,reValidateMode:n=u,resolver:s,context:c,defaultValues:d={},shouldFocusError:p=!0,shouldUnregister:h=!0,criteriaMode:m}={}){const y=(0,e.useRef)({}),g=(0,e.useRef)({}),v=(0,e.useRef)({}),b=(0,e.useRef)(new Set),O=(0,e.useRef)({}),E=(0,e.useRef)({}),D=(0,e.useRef)({}),T=(0,e.useRef)({}),R=(0,e.useRef)(d),q=(0,e.useRef)(!1),F=(0,e.useRef)(!1),H=(0,e.useRef)(),Y=(0,e.useRef)({}),$=(0,e.useRef)({}),J=(0,e.useRef)(c),ee=(0,e.useRef)(s),ne=(0,e.useRef)(new Set),re=(0,e.useRef)(he(t)),{isOnSubmit:oe,isOnTouch:ce}=re.current,ve=m===f,[be,we]=(0,e.useState)({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!oe,errors:{}}),Oe=(0,e.useRef)({isDirty:!ge,dirtyFields:!ge,touched:!ge||ce,isValidating:!ge,isSubmitting:!ge,isValid:!ge}),_e=(0,e.useRef)(be),xe=(0,e.useRef)(),{isOnBlur:ke,isOnChange:Ee}=(0,e.useRef)(he(n)).current;J.current=c,ee.current=s,_e.current=be,Y.current=h?{}:U(Y.current)?pe(d):Y.current;const Ce=(0,e.useCallback)(((e={})=>{q.current||(_e.current=Object.assign(Object.assign({},_e.current),e),we(_e.current))}),[]),Se=()=>Oe.current.isValidating&&Ce({isValidating:!0}),je=(0,e.useCallback)(((e,t,n=!1,r={},o)=>{let i=n||(({errors:e,name:t,error:n,validFields:r,fieldsWithValidation:o})=>{const i=j(n),a=P(e,t);return i&&!!a||!i&&!G(a,n,!0)||i&&P(o,t)&&!P(r,t)})({errors:_e.current.errors,error:t,name:e,validFields:T.current,fieldsWithValidation:D.current});const a=P(_e.current.errors,e);t?(z(T.current,e),i=i||!a||!G(a,t,!0),C(_e.current.errors,e,t)):((P(D.current,e)||ee.current)&&(C(T.current,e,!0),i=i||a),z(_e.current.errors,e)),(i&&!w(n)||!U(r)||Oe.current.isValidating)&&Ce(Object.assign(Object.assign(Object.assign({},r),ee.current?{isValid:!!o}:{}),{isValidating:!1}))}),[]),Pe=(0,e.useCallback)(((e,t)=>{const{ref:n,options:o}=y.current[e],i=de&&r(n)&&w(t)?"":t;N(n)?(o||[]).forEach((({ref:e})=>e.checked=e.value===i)):M(n)&&!Z(i)?n.files=i:I(n)?[...n.options].forEach((e=>e.selected=i.includes(e.value))):L(n)&&o?o.length>1?o.forEach((({ref:e})=>e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value)):o[0].ref.checked=!!i:n.value=i}),[]),Ae=(0,e.useCallback)(((e,t)=>{if(Oe.current.isDirty){const n=Ve();return e&&t&&C(n,e,t),!G(n,R.current)}return!1}),[]),De=(0,e.useCallback)(((e,t=!0)=>{if(Oe.current.isDirty||Oe.current.dirtyFields){const n=!G(P(R.current,e),V(y,e,Y)),r=P(_e.current.dirtyFields,e),o=_e.current.isDirty;n?C(_e.current.dirtyFields,e,!0):z(_e.current.dirtyFields,e);const i={isDirty:Ae(),dirtyFields:_e.current.dirtyFields},a=Oe.current.isDirty&&o!==i.isDirty||Oe.current.dirtyFields&&r!==P(_e.current.dirtyFields,e);return a&&t&&Ce(i),a?i:{}}return{}}),[]),Te=(0,e.useCallback)((async(e,t)=>{const n=(await ie(y,ve,y.current[e],Y))[e];return je(e,n,t),j(n)}),[je,ve]),Ne=(0,e.useCallback)((async e=>{const{errors:t}=await ee.current(Ve(),J.current,ve),n=_e.current.isValid;if(Array.isArray(e)){const n=e.map((e=>{const n=P(t,e);return n?C(_e.current.errors,e,n):z(_e.current.errors,e),!n})).every(Boolean);return Ce({isValid:U(t),isValidating:!1}),n}{const r=P(t,e);return je(e,r,n!==U(t),{},U(t)),!r}}),[je,ve]),Me=(0,e.useCallback)((async e=>{const t=e||Object.keys(y.current);if(Se(),ee.current)return Ne(t);if(Array.isArray(t)){!e&&(_e.current.errors={});const n=await Promise.all(t.map((async e=>await Te(e,null))));return Ce({isValidating:!1}),n.every(Boolean)}return await Te(t)}),[Ne,Te]),Le=(0,e.useCallback)(((e,t,{shouldDirty:n,shouldValidate:r})=>{const o={};C(o,e,t);for(const i of ae(e,t))y.current[i]&&(Pe(i,P(o,i)),n&&De(i),r&&Me(i))}),[Me,Pe,De]),Ie=(0,e.useCallback)(((e,t,n)=>{if(!h&&!K(t)&&C(Y.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),y.current[e])Pe(e,t),n.shouldDirty&&De(e),n.shouldValidate&&Me(e);else if(!K(t)&&(Le(e,t,n),ne.current.has(e))){const r=le(e)||e;C(g.current,e,t),$.current[r]({[r]:P(g.current,r)}),(Oe.current.isDirty||Oe.current.dirtyFields)&&n.shouldDirty&&(C(_e.current.dirtyFields,e,Q(t,P(R.current,e,[]),P(_e.current.dirtyFields,e,[]))),Ce({isDirty:!G(Object.assign(Object.assign({},Ve()),{[e]:t}),R.current)}))}!h&&C(Y.current,e,t)}),[De,Pe,Le]),Re=e=>F.current||b.current.has(e)||b.current.has((e.match(/\w+/)||[])[0]),qe=e=>{let t=!0;if(!U(O.current))for(const n in O.current)e&&O.current[n].size&&!O.current[n].has(e)&&!O.current[n].has(le(e))||(E.current[n](),t=!1);return t};function Fe(e){if(!h){let t=pe(e);for(const e of ne.current)x(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function Ve(e){if(Z(e))return V(y,e,Y);if(Array.isArray(e)){const t={};for(const n of e)C(t,n,V(y,n,Y));return t}return Fe(X(y,pe(Y.current),h))}H.current=H.current?H.current:async({type:e,target:t})=>{let n=t.name;const r=y.current[n];let i,a;if(r){const s=e===o,u=ue(Object.assign({isBlurEvent:s,isReValidateOnChange:Ee,isReValidateOnBlur:ke,isTouched:!!P(_e.current.touched,n),isSubmitted:_e.current.isSubmitted},re.current));let l=De(n,!1),c=!U(l)||!s&&Re(n);if(s&&!P(_e.current.touched,n)&&Oe.current.touched&&(C(_e.current.touched,n,!0),l=Object.assign(Object.assign({},l),{touched:_e.current.touched})),!h&&L(t)&&C(Y.current,n,V(y,n)),u)return!s&&qe(n),(!U(l)||c&&U(l))&&Ce(l);if(Se(),ee.current){const{errors:e}=await ee.current(Ve(),J.current,ve),r=_e.current.isValid;if(i=P(e,n),L(t)&&!i&&ee.current){const t=le(n),r=P(e,t,{});r.type&&r.message&&(i=r),t&&(r||P(_e.current.errors,t))&&(n=t)}a=U(e),r!==a&&(c=!0)}else i=(await ie(y,ve,r,Y))[n];!s&&qe(n),je(n,i,c,l,a)}};const Be=(0,e.useCallback)((async(e={})=>{const t=U(y.current)?R.current:{},{errors:n}=await ee.current(Object.assign(Object.assign(Object.assign({},t),Ve()),e),J.current,ve)||{},r=U(n);_e.current.isValid!==r&&Ce({isValid:r})}),[ve]),Ue=(0,e.useCallback)(((e,t)=>{!function(e,t,n,r,o,i){const{ref:a,ref:{name:s}}=n,u=e.current[s];if(!o){const t=V(e,s,r);!j(t)&&C(r.current,s,t)}a.type&&u?N(a)||L(a)?Array.isArray(u.options)&&u.options.length?(k(u.options).forEach(((e={},n)=>{(B(e.ref)&&W(e,e.ref)||i)&&(A(e.ref,t),z(u.options,`[${n}]`))})),u.options&&!k(u.options).length&&delete e.current[s]):delete e.current[s]:(B(a)&&W(u,a)||i)&&(A(a,t),delete e.current[s]):delete e.current[s]}(y,H.current,e,Y,h,t),h&&(z(T.current,e.ref.name),z(D.current,e.ref.name))}),[h]),He=(0,e.useCallback)((e=>{if(F.current)Ce();else{for(const t of b.current)if(t.startsWith(e)){Ce();break}qe(e)}}),[]),ze=(0,e.useCallback)(((e,t)=>{e&&(Ue(e,t),h&&!k(e.options||[]).length&&(z(_e.current.errors,e.ref.name),C(_e.current.dirtyFields,e.ref.name,!0),Ce({isDirty:Ae()}),Oe.current.isValid&&ee.current&&Be(),He(e.ref.name)))}),[Be,Ue]);const We=(0,e.useCallback)(((e,t,n)=>{const r=n?O.current[n]:b.current;let o=X(y,pe(Y.current),h,!1,e);if(Z(e)){const n=le(e)||e;return ne.current.has(n)&&(o=Object.assign(Object.assign({},v.current),o)),se(o,e,r,j(P(R.current,e))?t:P(R.current,e),!0)}const i=j(t)?R.current:t;return Array.isArray(e)?e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:se(o,t,r,i)})),{}):(F.current=j(n),S(!U(o)&&o||i))}),[]);function Ke(e,t={}){const{name:n,type:s,value:u}=e,l=Object.assign({ref:e},t),c=y.current,f=me(e),d=fe(ne.current,n),p=t=>de&&(!r(e)||t===e);let m,g=c[n],v=!0;if(g&&(f?Array.isArray(g.options)&&k(g.options).find((e=>u===e.ref.value&&p(e.ref))):p(g.ref)))return void(c[n]=Object.assign(Object.assign({},g),t));g=s?f?Object.assign({options:[...k(g&&g.options||[]),{ref:e}],ref:{type:s,name:n}},t):Object.assign({},l):l,c[n]=g;const b=j(P(Y.current,n));U(R.current)&&b||(m=P(b?R.current:Y.current,n),v=j(m),v||d||Pe(n,m)),U(t)||(C(D.current,n,!0),!oe&&Oe.current.isValid&&ie(y,ve,g,Y).then((e=>{const t=_e.current.isValid;U(e)?C(T.current,n,!0):z(T.current,n),t!==U(e)&&Ce()}))),!h||d&&v||!d&&z(_e.current.dirtyFields,n),s&&function({ref:e},t,n){r(e)&&n&&(e.addEventListener(t?i:a,n),e.addEventListener(o,n))}(f&&g.options?g.options[g.options.length-1]:g,f||"select-one"===e.type,H.current)}const Ye=(0,e.useCallback)(((e,t)=>async n=>{n&&n.preventDefault&&(n.preventDefault(),n.persist());let r={},o=Fe(X(y,pe(Y.current),h,!0));Oe.current.isSubmitting&&Ce({isSubmitting:!0});try{if(ee.current){const{errors:e,values:t}=await ee.current(o,J.current,ve);_e.current.errors=r=e,o=t}else for(const e of Object.values(y.current))if(e){const{name:t}=e.ref,n=await ie(y,ve,e,Y);n[t]?(C(r,t,n[t]),z(T.current,t)):P(D.current,t)&&(z(_e.current.errors,t),C(T.current,t,!0))}U(r)&&Object.keys(_e.current.errors).every((e=>e in y.current))?(Ce({errors:{},isSubmitting:!0}),await e(o,n)):(_e.current.errors=Object.assign(Object.assign({},_e.current.errors),r),t&&await t(_e.current.errors,n),p&&((e,t)=>{for(const n in e)if(P(t,n)){const t=e[n];if(t){if(t.ref.focus&&j(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(y.current,_e.current.errors))}finally{_e.current.isSubmitting=!1,Ce({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:U(_e.current.errors),submitCount:_e.current.submitCount+1})}}),[p,ve]);(0,e.useEffect)((()=>{s&&Oe.current.isValid&&Be(),xe.current=xe.current||!de?xe.current:function(e,t){const n=new MutationObserver((()=>{for(const n of Object.values(e.current))if(n&&n.options)for(const e of n.options)e&&e.ref&&B(e.ref)&&t(n);else n&&B(n.ref)&&t(n)}));return n.observe(window.document,{childList:!0,subtree:!0}),n}(y,ze)}),[ze,R.current]),(0,e.useEffect)((()=>()=>{xe.current&&xe.current.disconnect(),q.current=!0,Object.values(y.current).forEach((e=>ze(e,!0)))}),[]),!s&&Oe.current.isValid&&(be.isValid=G(T.current,D.current)&&U(_e.current.errors));const Ge={trigger:Me,setValue:(0,e.useCallback)((function(e,t,n){Ie(e,t,n||{}),Re(e)&&Ce(),qe(e)}),[Ie,Me]),getValues:(0,e.useCallback)(Ve,[]),register:(0,e.useCallback)((function(e,t){if(!ye)if(Z(e))Ke({name:e},t);else{if(!_(e)||!("name"in e))return t=>t&&Ke(t,e);Ke(e,t)}}),[R.current]),unregister:(0,e.useCallback)((function(e){for(const t of Array.isArray(e)?e:[e])ze(y.current[t],!0)}),[]),formState:ge?new Proxy(be,{get:(e,t)=>t in e?(Oe.current[t]=!0,e[t]):undefined}):be},$e=(0,e.useMemo)((()=>Object.assign({isFormDirty:Ae,updateWatchedValue:He,shouldUnregister:h,updateFormState:Ce,removeFieldEventListener:Ue,watchInternal:We,mode:re.current,reValidateMode:{isReValidateOnBlur:ke,isReValidateOnChange:Ee},validateResolver:s?Be:undefined,fieldsRef:y,resetFieldArrayFunctionRef:$,useWatchFieldsRef:O,useWatchRenderFunctionsRef:E,fieldArrayDefaultValuesRef:g,validFieldsRef:T,fieldsWithValidationRef:D,fieldArrayNamesRef:ne,readFormStateRef:Oe,formStateRef:_e,defaultValuesRef:R,shallowFieldsStateRef:Y,fieldArrayValuesRef:v},Ge)),[R.current,He,h,Ue,We]);return Object.assign({watch:function(e,t){return We(e,t)},control:$e,handleSubmit:Ye,reset:(0,e.useCallback)(((e,t={})=>{if(de)for(const e of Object.values(y.current))if(e){const{ref:t,options:o}=e,i=me(t)&&Array.isArray(o)?o[0].ref:t;if(r(i))try{i.closest("form").reset();break}catch(n){}}y.current={},R.current=Object.assign({},e||R.current),e&&qe(""),Object.values($.current).forEach((e=>te(e)&&e())),Y.current=h?{}:pe(e||R.current),(({errors:e,isDirty:t,isSubmitted:n,touched:r,isValid:o,submitCount:i,dirtyFields:a})=>{o||(T.current={},D.current={}),g.current={},b.current=new Set,F.current=!1,Ce({submitCount:i?_e.current.submitCount:0,isDirty:!!t&&_e.current.isDirty,isSubmitted:!!n&&_e.current.isSubmitted,isValid:!!o&&_e.current.isValid,dirtyFields:a?_e.current.dirtyFields:{},touched:r?_e.current.touched:{},errors:e?_e.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)}),[]),clearErrors:(0,e.useCallback)((function(e){e&&(Array.isArray(e)?e:[e]).forEach((e=>y.current[e]&&x(e)?delete _e.current.errors[e]:z(_e.current.errors,e))),Ce({errors:e?_e.current.errors:{}})}),[]),setError:(0,e.useCallback)((function(e,t){const n=(y.current[e]||{}).ref;C(_e.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),Ce({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()}),[]),errors:be.errors},Ge)}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */const be=(0,e.createContext)(null);be.displayName="RHFContext";const we=()=>(0,e.useContext)(be);var Oe=function(t){var n=t.as,r=t.errors,o=t.name,i=t.message,a=t.render,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["as","errors","name","message","render"]),u=we(),l=P(r||u.errors,o);if(!l)return null;var c=l.message,f=l.types,d=Object.assign({},s,{children:c||i});return(0,e.isValidElement)(n)?(0,e.cloneElement)(n,d):a?a({message:c||i,messages:f}):(0,e.createElement)(n||e.Fragment,d)},_e=n(7048),xe=n.n(_e),ke=n(8322);function Ee(){return(Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;tp)&&(F=(U=U.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(y,"$1"+e.trim());case 58:return e.trim()+t.replace(y,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},qe={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Fe=/[A-Z]|^ms/g,Ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Be=function(e){return 45===e.charCodeAt(1)},Ue=function(e){return null!=e&&"boolean"!=typeof e},He=function(e){var t={};return function(n){return t[n]===undefined&&(t[n]=e(n)),t[n]}}((function(e){return Be(e)?e:e.replace(Fe,"-$&").toLowerCase()})),ze=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ve,(function(e,t,n){return Ke={name:t,styles:n,next:Ke},t}))}return 1===qe[e]||Be(e)||"number"!=typeof t||0===t?t:t+"px"};function We(e,t,n,r){if(null==n)return"";if(n.__emotion_styles!==undefined)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ke={name:n.name,styles:n.styles,next:Ke},n.name;if(n.styles!==undefined){var o=n.next;if(o!==undefined)for(;o!==undefined;)Ke={name:o.name,styles:o.styles,next:Ke},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=0)return 1;return 0}();var mt=pt&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),ht))}};function yt(e){return e&&"[object Function]"==={}.toString.call(e)}function gt(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function vt(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function bt(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=gt(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:bt(vt(e))}function wt(e){return e&&e.referenceNode?e.referenceNode:e}var Ot=pt&&!(!window.MSInputMethodContext||!document.documentMode),_t=pt&&/MSIE 10/.test(navigator.userAgent);function xt(e){return 11===e?Ot:10===e?_t:Ot||_t}function kt(e){if(!e)return document.documentElement;for(var t=xt(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===gt(n,"position")?kt(n):n:e?e.ownerDocument.documentElement:document.documentElement}function Et(e){return null!==e.parentNode?Et(e.parentNode):e}function Ct(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,u=i.commonAncestorContainer;if(e!==u&&t!==u||r.contains(o))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&kt(a.firstElementChild)!==a?kt(u):u;var l=Et(e);return l.host?Ct(l.host,t):Ct(e,Et(t).host)}function St(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function jt(e,t){var n=arguments.length>2&&arguments[2]!==undefined&&arguments[2],r=St(t,"top"),o=St(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function Pt(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function At(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],xt(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Dt(e){var t=e.body,n=e.documentElement,r=xt(10)&&getComputedStyle(n);return{height:At("Height",t,n,r),width:At("Width",t,n,r)}}var Tt=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Nt=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==undefined&&arguments[2],r=xt(10),o="HTML"===t.nodeName,i=Rt(e),a=Rt(t),s=bt(e),u=gt(t),l=parseFloat(u.borderTopWidth),c=parseFloat(u.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=It({top:i.top-a.top-l,left:i.left-a.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!r&&o){var d=parseFloat(u.marginTop),p=parseFloat(u.marginLeft);f.top-=l-d,f.bottom-=l-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(f=jt(f,t)),f}function Ft(e){var t=arguments.length>1&&arguments[1]!==undefined&&arguments[1],n=e.ownerDocument.documentElement,r=qt(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:St(n),s=t?0:St(n,"left"),u={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return It(u)}function Vt(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===gt(e,"position"))return!0;var n=vt(e);return!!n&&Vt(n)}function Bt(e){if(!e||!e.parentElement||xt())return document.documentElement;for(var t=e.parentElement;t&&"none"===gt(t,"transform");)t=t.parentElement;return t||document.documentElement}function Ut(e,t,n,r){var o=arguments.length>4&&arguments[4]!==undefined&&arguments[4],i={top:0,left:0},a=o?Bt(e):Ct(e,wt(t));if("viewport"===r)i=Ft(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=bt(vt(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var u=qt(s,a,o);if("HTML"!==s.nodeName||Vt(a))i=u;else{var l=Dt(e.ownerDocument),c=l.height,f=l.width;i.top+=u.top-u.marginTop,i.bottom=c+u.top,i.left+=u.left-u.marginLeft,i.right=f+u.left}}var d="number"==typeof(n=n||0);return i.left+=d?n:n.left||0,i.top+=d?n:n.top||0,i.right-=d?n:n.right||0,i.bottom-=d?n:n.bottom||0,i}function Ht(e){return e.width*e.height}function zt(e,t,n,r,o){var i=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Ut(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},u=Object.keys(s).map((function(e){return Lt({key:e},s[e],{area:Ht(s[e])})})).sort((function(e,t){return t.area-e.area})),l=u.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Wt(e,t,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null,o=r?Bt(t):Ct(t,wt(n));return qt(n,o,r)}function Kt(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Yt(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function Gt(e,t,n){n=n.split("-")[0];var r=Kt(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",u=i?"height":"width",l=i?"width":"height";return o[a]=t[a]+t[u]/2-r[u]/2,o[s]=n===s?t[s]-r[l]:t[Yt(s)],o}function $t(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Qt(e,t,n){return(n===undefined?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=$t(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e["function"]||e.fn;e.enabled&&yt(n)&&(t.offsets.popper=It(t.offsets.popper),t.offsets.reference=It(t.offsets.reference),t=n(t,e))})),t}function Zt(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Wt(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=zt(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Gt(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Qt(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Xt(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function Jt(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&arguments[1]!==undefined&&arguments[1],n=dn.indexOf(e),r=dn.slice(n+1).concat(dn.slice(0,n));return t?r.reverse():r}var hn="flip",mn="clockwise",yn="counterclockwise";function gn(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf($t(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return It(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){sn(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var vn={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",l=s?"width":"height",c={start:Mt({},u,i[u]),end:Mt({},u,i[u]+i[l]-a[l])};e.offsets.popper=Lt({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],u=void 0;return u=sn(+n)?[+n,0]:gn(n,i,a,s),"left"===s?(i.top+=u[0],i.left-=u[1]):"right"===s?(i.top+=u[0],i.left+=u[1]):"top"===s?(i.left+=u[0],i.top-=u[1]):"bottom"===s&&(i.left+=u[0],i.top+=u[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||kt(e.instance.popper);e.instance.reference===n&&(n=kt(n));var r=Jt("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var u=Ut(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=u;var l=t.priority,c=e.offsets.popper,f={primary:function(e){var n=c[e];return c[e]u[e]&&!t.escapeWithReference&&(r=Math.min(c[n],u[e]-("right"===e?c.width:c.height))),Mt({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=Lt({},c,f[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",u=a?"left":"top",l=a?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[u]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!cn(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,u=-1!==["left","right"].indexOf(o),l=u?"height":"width",c=u?"Top":"Left",f=c.toLowerCase(),d=u?"left":"top",p=u?"bottom":"right",h=Kt(r)[l];s[p]-ha[p]&&(e.offsets.popper[f]+=s[f]+h-a[p]),e.offsets.popper=It(e.offsets.popper);var m=s[f]+s[l]/2-h/2,y=gt(e.instance.popper),g=parseFloat(y["margin"+c]),v=parseFloat(y["border"+c+"Width"]),b=m-e.offsets.popper[f]-g-v;return b=Math.max(Math.min(a[l]-h,b),0),e.arrowElement=r,e.offsets.arrow=(Mt(n={},f,Math.round(b)),Mt(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Xt(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Ut(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=Yt(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case hn:a=[r,o];break;case mn:a=pn(r);break;case yn:a=pn(r,!0);break;default:a=t.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return e;r=e.placement.split("-")[0],o=Yt(r);var l=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d="left"===r&&f(l.right)>f(c.left)||"right"===r&&f(l.left)f(c.top)||"bottom"===r&&f(l.top)f(n.right),m=f(l.top)f(n.bottom),g="left"===r&&p||"right"===r&&h||"top"===r&&m||"bottom"===r&&y,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===i&&p||v&&"end"===i&&h||!v&&"start"===i&&m||!v&&"end"===i&&y),w=!!t.flipVariationsByContent&&(v&&"start"===i&&h||v&&"end"===i&&p||!v&&"start"===i&&y||!v&&"end"===i&&m),O=b||w;(d||g||O)&&(e.flipped=!0,(d||g)&&(r=a[u+1]),O&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=Lt({},e.offsets.popper,Gt(e.instance.popper,e.offsets.reference,e.placement)),e=Qt(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=Yt(t),e.offsets.popper=It(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!cn(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=$t(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&arguments[2]!==undefined?arguments[2]:{};Tt(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=mt(this.update.bind(this)),this.options=Lt({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Lt({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=Lt({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Lt({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&yt(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Nt(e,[{key:"update",value:function(){return Zt.call(this)}},{key:"destroy",value:function(){return en.call(this)}},{key:"enableEventListeners",value:function(){return on.call(this)}},{key:"disableEventListeners",value:function(){return an.call(this)}}]),e}();bn.Utils=("undefined"!=typeof window?window:n.g).PopperUtils,bn.placements=fn,bn.Defaults=vn;var wn=bn,On=(n(2216),function(e){do{e+=~~(1e6*Math.random())}while("undefined"!=typeof document&&document.getElementById(e));return e}),_n=("undefined"!=typeof window&&"undefined"!=typeof window.document&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,{name:"kpm0v2",styles:"position:absolute;display:block;width:16px;height:8px;margin:0 5px;&:before,&:after{position:absolute;display:block;content:'';border-color:transparent;border-style:solid;}"}),xn=function(t){t.placement;var n=Ce(t,["placement"]);return it(e.Fragment,null,it(at,{styles:kn}),it("div",Ee({},n,{"data-arrow":"true",css:_n})))},kn={name:"rvo98s",styles:"[x-placement^='top']{margin-bottom:8px;[data-arrow]{bottom:-9px;}[data-arrow]:before{bottom:0;border-width:8px 8px 0;border-top-color:rgba(0,0,0,0.25);}[data-arrow]:after{bottom:1px;border-width:8px 8px 0;border-top-color:#fff;}}[x-placement^='right']{margin-left:8px;[data-arrow]{left:-9px;width:8px;height:16px;margin:5px 0;}[data-arrow]:before{left:0;border-width:8px 8px 8px 0;border-right-color:rgba(0,0,0,0.25);}[data-arrow]:after{left:1px;border-width:8px 8px 8px 0;border-right-color:#fff;}}[x-placement^='bottom']{margin-top:8px;[data-arrow]{top:-9px;}[data-arrow]:before{top:0;border-width:0 8px 8px 8px;border-bottom-color:rgba(0,0,0,0.25);}[data-arrow]:after{top:1px;border-width:0 8px 8px 8px;border-bottom-color:#fff;}}[x-placement^='left']{margin-right:8px;[data-arrow]{right:-9px;width:8px;height:16px;margin:5px 0;}[data-arrow]:before{right:0;border-width:8px 0 8px 8px;border-left-color:rgba(0,0,0,0.25);}[data-arrow]:after{right:1px;border-width:8px 0 8px 8px;border-left-color:#fff;}}"},En=function(n){var r,o,i,a=n.header,s=n.body,u=n.children,l=n.placement,c=n.trigger,f=n.styles,d=Ce(n,["header","body","children","placement","trigger","styles"]),p=t().Children.only(u),h=(0,e.useRef)(null),m=(0,e.useState)(!1),y=m[0],g=m[1],v=(0,e.useState)(!1),b=v[0],w=v[1],O=(0,e.useState)({popoverId:null,referenceId:null,arrowId:null}),_=O[0],x=O[1],k=_.popoverId,E=_.referenceId,C=_.arrowId;r=h,o=function(e){e.target.id===E||document.getElementById(E).contains(e.target)||g(!1)},i=(0,e.useRef)(),(0,e.useEffect)((function(){i.current=o}),[o]),(0,e.useEffect)((function(){var e=function(e){r.current&&!r.current.contains(e.target)&&i.current(event)};return dt.forEach((function(t){document.addEventListener(t,e,{passive:!0})})),function(){dt.forEach((function(t){document.removeEventListener(t,e,{passive:!0})}))}}),[r,o]),(0,e.useEffect)((function(){if(!k)return x({popoverId:On("popover"),referenceId:On("reference"),arrowId:On("arrow")});var e=document.getElementById(k),t=document.getElementById(E),n=document.getElementById(C);e&&t&&n&&(new wn(t,e,{placement:l,modifiers:{arrow:{element:n}}}),w(y))}),[y]);var S={content:[Cn.content,f.content],header:[Cn.header,f.header],body:[Cn.body,f.body]};return it(e.Fragment,null,k?it("div",Ee({},d,{id:k,ref:h,css:S.content,style:b?{display:"block"}:{}}),it(xn,{id:C}),a?it("div",{css:S.header},a):null,it("div",{css:S.body},s)):null,t().cloneElement(p,Ee({},p.props,{id:E,onClick:function(){"click"===c&&g(!y)}})))};En.defaultProps={placement:"right",trigger:"click",styles:{}};var Cn={content:{name:"106ha8s",styles:"display:none;max-width:300px;background-color:#fff;border-radius:4px;border:1px solid rgba(0,0,0,0.2);z-index:1060;"},header:{name:"12koz1z",styles:"padding:8px 12px;background-color:#f7f7f7;font-size:16px;font-weight:bold;border-top-left-radius:4px;border-top-right-radius:4px;"},body:{name:"k7kym8",styles:"padding:8px 12px;font-size:14px;border-bottom-left-radius:4px;border-bottom-right-radius:4px;"}},Sn=En;function jn(e){var t=e.touches;if(t&&t.length){var n=t[0];return{x:n.clientX,y:n.clientY}}return{x:e.clientX,y:e.clientY}}var Pn={position:"relative",display:"inline-block",backgroundColor:"#ddd",borderRadius:5,userSelect:"none",boxSizing:"border-box"},An={position:"absolute",backgroundColor:"#5e72e4",borderRadius:5,userSelect:"none",boxSizing:"border-box"},Dn={position:"relative",display:"block",content:'""',width:18,height:18,backgroundColor:"#fff",borderRadius:"50%",boxShadow:"0 1px 1px rgba(0,0,0,.5)",userSelect:"none",cursor:"pointer",boxSizing:"border-box"},Tn={x:{track:Ee({},Pn,{width:200,height:10}),active:Ee({},An,{top:0,height:"100%"}),thumb:Ee({},Dn)},y:{track:Ee({},Pn,{width:10,height:200}),active:Ee({},An,{left:0,width:"100%"}),thumb:Ee({},Dn)},xy:{track:{position:"relative",overflow:"hidden",width:200,height:200,backgroundColor:"#5e72e4",borderRadius:0},active:{},thumb:Ee({},Dn)},disabled:{opacity:.5}},Nn=function(t){var n=t.disabled,r=t.axis,o=t.x,i=t.y,a=t.xmin,s=t.xmax,u=t.ymin,l=t.ymax,c=t.xstep,f=t.ystep,d=t.onChange,p=t.onDragStart,h=t.onDragEnd,m=t.onClick,y=t.xreverse,g=t.yreverse,v=t.styles,b=Ce(t,["disabled","axis","x","y","xmin","xmax","ymin","ymax","xstep","ystep","onChange","onDragStart","onDragEnd","onClick","xreverse","yreverse","styles"]),w=(0,e.useRef)(null),O=(0,e.useRef)(null),_=(0,e.useRef)({}),x=(0,e.useRef)({});function k(e){var t=e.top,n=e.left;if(d){var o=w.current.getBoundingClientRect(),i=o.width,p=o.height,h=0,m=0;n<0&&(n=0),n>i&&(n=i),t<0&&(t=0),t>p&&(t=p),"x"!==r&&"xy"!==r||(h=n/i*(s-a)),"y"!==r&&"xy"!==r||(m=t/p*(l-u));var v=(0!==h?parseInt(h/c,10)*c:0)+a,b=(0!==m?parseInt(m/f,10)*f:0)+u;d({x:y?s-v+a:v,y:g?l-b+u:b})}}function E(e){if(!n){e.preventDefault();var t=O.current,r=jn(e);_.current={x:t.offsetLeft,y:t.offsetTop},x.current={x:r.x,y:r.y},document.addEventListener("mousemove",C),document.addEventListener("mouseup",S),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",S),document.addEventListener("touchcancel",S),p&&p(e)}}function C(e){n||(e.preventDefault(),k(function(e){var t=jn(e);return{left:t.x+_.current.x-x.current.x,top:t.y+_.current.y-x.current.y}}(e)))}function S(e){n||(e.preventDefault(),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",C,{passive:!1}),document.removeEventListener("touchend",S),document.removeEventListener("touchcancel",S),h&&h(e))}var j,P,A=((j=(i-u)/(l-u)*100)>100&&(j=100),j<0&&(j=0),"x"===r&&(j=0),(P=(o-a)/(s-a)*100)>100&&(P=100),P<0&&(P=0),"y"===r&&(P=0),{top:j,left:P}),D={};"x"===r&&(D.width=A.left+"%"),"y"===r&&(D.height=A.top+"%"),y&&(D.left=100-A.left+"%"),g&&(D.top=100-A.top+"%");var T={position:"absolute",transform:"translate(-50%, -50%)",left:y?100-A.left+"%":A.left+"%",top:g?100-A.top+"%":A.top+"%"};"x"===r?T.top="50%":"y"===r&&(T.left="50%");var N={track:Ee({},Tn[r].track,{},v.track),active:Ee({},Tn[r].active,{},v.active),thumb:Ee({},Tn[r].thumb,{},v.thumb),disabled:Ee({},Tn.disabled,{},v.disabled)};return it("div",Ee({},b,{ref:w,css:ot([N.track,n&&N.disabled],";label:Slider;"),onClick:function(e){if(!n){var t=jn(e),r=w.current.getBoundingClientRect();k({left:t.x-r.left,top:t.y-r.top}),m&&m(e)}}}),it("div",{css:N.active,style:D}),it("div",{ref:O,style:T,onTouchStart:E,onMouseDown:E,onClick:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},it("div",{css:N.thumb})))};Nn.defaultProps={disabled:!1,axis:"x",x:50,xmin:0,xmax:100,y:50,ymin:0,ymax:100,xstep:1,ystep:1,xreverse:!1,yreverse:!1,styles:{}};var Mn=Nn,Ln=n(1741),In=n.n(Ln),Rn=n(8023),qn=n.n(Rn),Fn=n(5015),Vn=n.n(Fn),Bn="undefined"!=typeof navigator&&navigator.userAgent.match(/iPhone|iPad|iPod/i),Un=function(t){var n=t.step,r=t.min,o=t.max,i=t.value,a=t.onChange,s=t.onKeyDown,u=t.enableMobileNumericKeyboard,l=t.component,c=Ce(t,["step","min","max","value","onChange","onKeyDown","enableMobileNumericKeyboard","component"]),f=(0,e.useState)(i),d=f[0],p=f[1];(0,e.useEffect)((function(){p(i)}),[i]);var h={value:d,onChange:function(e){var t=function(e){if(qn()(e))return e;if(Vn()(e)){if(!(e=e.trim()))return"";var t=parseFloat(e);if(!In()(t))return t}return""}(e);p(e),a&&a(t)},onKeyDown:function(e){38===e.keyCode?a&&a(zn("+",i,o,r,n)):40===e.keyCode&&a&&a(zn("-",i,o,r,n)),s&&s(e)},onWheel:function(e){e.target.blur()}};return it(l,Ee({},c,h,u?{css:Hn,type:"number",inputMode:"numeric",pattern:Bn?"[0-9]*":"",step:n,min:r,max:o}:{css:Hn,type:"text"}))};Un.defaultProps={autoComplete:"off",enableMobileNumericKeyboard:!1,value:"",component:function(e){var t=e.onChange,n=Ce(e,["onChange"]);return it("input",Ee({},n,{onChange:function(e){t&&t(e.target.value)}}))},step:1};var Hn={MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0}};function zn(e,t,n,r,o){if(""===t)return qn()(r)?r:"";if(t="+"===e?t+o:t-o,qn()(n)&&t>n)return n;if(qn()(r)&&t=0&&i<1?[o,a,0]:i>=1&&i<2?[a,o,0]:i>=2&&i<3?[0,o,a]:e>=3&&i<4?[0,a,o]:e>=4&&i<5?[a,0,o]:e>=5&&i<=6?[o,0,a]:[0,0,0],{r:Math.round(255*(r[0]+s)),g:Math.round(255*(r[1]+s)),b:Math.round(255*(r[2]+s))}}function Gn(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function $n(e,t,n){return"#"+[Gn(e),Gn(t),Gn(n)].join("")}function Qn(e,t,n){var r,o=Math.max(e,t,n),i=o-Math.min(e,t,n);return r=0===i?0:e===o?(t-n)/i%6:t===o?(n-e)/i+2:(e-t)/i+4,(r=Math.round(60*r))<0&&(r+=360),{h:r,s:Math.round(100*(0===o?0:i/o)),v:Math.round(o/255*100)}}function Zn(e,t,n,r){return"rgba("+[e,t,n,r/100].join(",")+")"}var Xn={name:"bzk4lp",styles:"width:100%;margin-top:10px;margin-bottom:10px;display:flex;"},Jn={name:"lwa3hx",styles:"flex:1;margin-right:10px;"},er=function(e){var t=e.color,n=e.onChange,r=t.r,o=t.g,i=t.b,a=t.a,s=t.h,u=t.s,l=t.v;function c(e){n&&n(Ee({},e,{rgba:Zn(e.r,e.g,e.b,e.a)}))}function f(e,n,r){var o=Yn(e,n,r),i=o.r,a=o.g,s=o.b,u=$n(i,a,s);c(Ee({},t,{h:e,s:n,v:r,r:i,g:a,b:s,hex:u}))}function d(e,n,r){var o=$n(e,n,r),i=Qn(e,n,r),a=i.h,s=i.s,u=i.v;c(Ee({},t,{r:e,g:n,b:r,h:a,s:s,v:u,hex:o}))}function p(e){c(Ee({},t,{a:e}))}var h=Zn(r,o,i,a),m="linear-gradient(to right, "+Zn(r,o,i,0)+", "+Zn(r,o,i,100)+")",y=function(e,t,n){var r=Yn(e,t,n);return $n(r.r,r.g,r.b)}(s,100,100);return it("div",{css:tr.picker,onClick:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},it("div",{css:tr.selector,style:{backgroundColor:y}},it("div",{css:tr.gradientWhite}),it("div",{css:tr.gradientDark}),it(Mn,{axis:"xy",x:u,xmax:100,y:100-l,ymax:100,onChange:function(e){var t=e.x,n=e.y;return f(s,t,100-n)},styles:{track:{width:"100%",height:"100%",background:"none"},thumb:{width:12,height:12,backgroundColor:"rgba(0,0,0,0)",border:"2px solid #fff",borderRadius:"50%"}}})),it("div",{css:Xn},it("div",{css:Jn},it(Mn,{axis:"x",x:s,xmax:359,onChange:function(e){return f(e.x,u,l)},styles:{track:{width:"100%",height:12,borderRadius:0,background:"linear-gradient(to left, #FF0000 0%, #FF0099 10%, #CD00FF 20%, #3200FF 30%, #0066FF 40%, #00FFFD 50%, #00FF66 60%, #35FF00 70%, #CDFF00 80%, #FF9900 90%, #FF0000 100%)"},active:{background:"none"},thumb:{width:5,height:14,borderRadius:0,backgroundColor:"#eee"}}}),it(Mn,{axis:"x",x:a,xmax:100,styles:{track:{width:"100%",height:12,borderRadius:0,background:m},active:{background:"none"},thumb:{width:5,height:14,borderRadius:0,backgroundColor:"#eee"}},onChange:function(e){return p(e.x)}})),it("div",{style:{backgroundColor:h,width:30,height:30}})),it("div",{css:tr.inputs},it("div",{css:tr.input},it("input",{style:{width:70,textAlign:"left"},type:"text",value:t.hex,onChange:function(e){return function(e){var n=Kn(e),r=n.r,o=n.g,i=n.b,a=Qn(r,o,i),s=a.h,u=a.s,l=a.v;c(Ee({},t,{r:r,g:o,b:i,h:s,s:u,v:l,hex:e}))}(e.target.value)},onKeyUp:function(e){if(13===e.keyCode){var n=e.target.value.trim(),r=Kn(n),o=r.r,i=r.g,s=r.b;c(Ee({},t,{r:o,g:i,b:s,a:a,hex:n}))}}}),it("div",null,"Hex")),it("div",{css:tr.input},it(Wn,{min:0,max:255,value:r,onChange:function(e){return d(e,o,i)}}),it("div",null,"R")),it("div",{css:tr.input},it(Wn,{min:0,max:255,value:o,onChange:function(e){return d(r,e,i)}}),it("div",null,"G")),it("div",{css:tr.input},it(Wn,{min:0,max:255,value:i,onChange:function(e){return d(r,o,e)}}),it("div",null,"B")),it("div",{css:tr.input},it(Wn,{min:0,max:100,value:a,onChange:function(e){return p(e)}}),it("div",null,"A"))))};er.defaultProps={initialValue:"#5e72e4"};var tr={picker:{fontFamily:"'Helvetica Neue',Helvetica,Arial,sans-serif",width:230,"*":{userSelect:"none"}},selector:{position:"relative",width:230,height:230},gradientWhite:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%)"},gradientDark:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to bottom, transparent 0%, #000000 100%)"},inputs:{display:"flex",justifyContent:"space-between",width:"100%"},input:{textAlign:"center",fontSize:13,fontWeight:"normal",color:"#000",input:{width:30,textAlign:"center"},div:{marginTop:4}}};function nr(e){var t,n=(e=e.toLowerCase()).substr(0,7),r=Kn(n),o=r.r,i=r.g,a=r.b,s=Qn(o,i,a),u=e.length>7?(t=e.substr(7),Math.round(parseInt("0x"+t,16)/255*100)):100;return Ee({},s,{r:o,g:i,b:a,a:u,hex:n,rgba:Zn(o,i,a,u)})}var rr={name:"j4ndc3",styles:"position:relative;display:inline-block;box-sizing:border-box;width:49px;height:24px;padding:4px;background-color:#ffffff;border:1px solid #bebebe;border-radius:3px;user-select:none;"},or={name:"trkpwz",styles:"display:block;width:100%;height:100%;cursor:pointer;"},ir=function(t){var n=t.initialValue,r=t.onChange,o=t.placement,i=Ce(t,["initialValue","onChange","placement"]),a=(0,e.useState)(nr(n)),s=a[0],u=a[1];function l(e){r&&(u(e),r(e))}return(0,e.useEffect)((function(){l(nr(n))}),[n]),it(Sn,{placement:o,body:it(er,{color:s,onChange:l})},it("span",Ee({},i,{css:rr}),it("span",{css:or,style:{backgroundColor:s.rgba}})))};ir.defaultProps={placement:"bottom"};var ar=ir,sr=n(9457),ur=n.n(sr),lr=n(1372),cr=n.n(lr),fr=n(5206);function dr(e,t){if(null==e)return{};var n,r,o=Ce(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);n-1}function Ir(e){return Lr(e)?window.pageYOffset:e.scrollTop}function Rr(e,t){Lr(e)?window.scrollTo(0,t):e.scrollTop=t}function qr(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Fr(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:200,r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:Dr,o=Ir(e),i=t-o,a=10,s=0;function u(){var t=qr(s+=a,o,i,n);Rr(e,t),s=p)return{placement:"bottom",maxHeight:t};if(x>=p&&!a)return i&&Fr(u,k,C),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&O>=r)return i&&Fr(u,k,C),{placement:"bottom",maxHeight:a?O-v:x-v};if("auto"===o||a){var S=t,j=a?w:_;return j>=r&&(S=Math.min(j-v-s.controlHeight,t)),{placement:"top",maxHeight:S}}if("bottom"===o)return Rr(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(w>=p)return{placement:"top",maxHeight:t};if(_>=p&&!a)return i&&Fr(u,E,C),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&w>=r){var P=t;return(!a&&_>=r||a&&w>=r)&&(P=a?w-b:_-b),i&&Fr(u,E,C),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var Wr=function(e){return"auto"===e?"bottom":e},Kr=(0,e.createContext)({getPortalPlacement:null}),Yr=function(e){kr(n,e);var t=Hr(n);function n(){var e;wr(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0,h=c-f-l,m=!1;h>n&&e.isBottom&&(i&&i(t),e.isBottom=!1),p&&e.isTop&&(s&&s(t),e.isTop=!1),p&&n>h?(o&&!e.isBottom&&o(t),d.scrollTop=c,m=!0,e.isBottom=!0):!p&&-n>l&&(a&&!e.isTop&&a(t),d.scrollTop=0,m=!0,e.isTop=!0),m&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return _r(r,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return t().createElement(Ko,{innerRef:this.getScrollTarget},this.props.children)}}]),r}(e.Component);function ui(e){var n=e.isEnabled,r=void 0===n||n,o=dr(e,["isEnabled"]);return r?t().createElement(si,o):o.children}var li=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled,a=t.tabSelectsValue;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},ci=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},fi=function(e){return!!e.isDisabled};var di={clearIndicator:po,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:fo,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Qr,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return br(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),br(t,"backgroundColor",a.neutral0),br(t,"borderRadius",o),br(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),br(t,"marginBottom",i.menuGutter),br(t,"marginTop",i.menuGutter),br(t,"position","absolute"),br(t,"width","100%"),br(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:$r,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var pi={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function hi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mi(e){for(var t=1;t-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:fi,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},bi=1,wi=function(e){kr(r,e);var n=yi(r);function r(e){var t;wr(this,r),(t=n.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},t.blockOptionHover=!1,t.isComposing=!1,t.clearFocusValueOnUpdate=!1,t.commonProps=void 0,t.components=void 0,t.hasGroups=!1,t.initialTouchX=0,t.initialTouchY=0,t.inputIsHiddenAfterUpdate=void 0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.cacheComponents=function(e){t.components=Do({components:e})},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;o(e,mi(mi({},n),{},{name:i}))},t.setValue=function(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:undefined,o=t.props,i=o.closeMenuOnSelect,a=o.isMulti;t.onInputChange("",{action:"set-value"}),i&&(t.inputIsHiddenAfterUpdate=!a,t.onMenuClose()),t.clearFocusValueOnUpdate=!0,t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=t.state.selectValue;if(o)if(t.isOptionSelected(e,i)){var a=t.getOptionValue(e);t.setValue(i.filter((function(e){return t.getOptionValue(e)!==a})),"deselect-option",e),t.announceAriaLiveSelection({event:"deselect-option",context:{value:t.getOptionLabel(e)}})}else t.isOptionDisabled(e,i)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue([].concat(yr(i),[e]),"select-option",e),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));else t.isOptionDisabled(e,i)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e),isDisabled:!0}}):(t.setValue(e,"select-option"),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(e)}}));r&&t.blurInput()},t.removeValue=function(e){var n=t.state.selectValue,r=t.getOptionValue(e),o=n.filter((function(e){return t.getOptionValue(e)!==r}));t.onChange(o.length?o:null,{action:"remove-value",removedValue:e}),t.announceAriaLiveSelection({event:"remove-value",context:{value:e?t.getOptionLabel(e):""}}),t.focusInput()},t.clearValue=function(){t.onChange(null,{action:"clear"})},t.popValue=function(){var e=t.state.selectValue,n=e[e.length-1],r=e.slice(0,e.length-1);t.announceAriaLiveSelection({event:"pop-value",context:{value:n?t.getOptionLabel(n):""}}),t.onChange(r.length?r:null,{action:"pop-value",removedValue:n})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=e.currentTarget.value;t.inputIsHiddenAfterUpdate=!1,t.onInputChange(n,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){var n=t.props,r=n.isSearchable,o=n.isMulti;t.props.onFocus&&t.props.onFocus(e),t.inputIsHiddenAfterUpdate=!1,t.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),t.setState({isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){var e=t.props,n=e.hideSelectedOptions,r=e.isMulti;return n===undefined?r:n},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,u=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,f=n.tabSelectsValue,d=n.openMenuOnFocus,p=t.state,h=p.focusedOption,m=p.focusedValue,y=p.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!l||!f||!h||d&&t.isOptionSelected(h,y))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":l?(t.inputIsHiddenAfterUpdate=!1,t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!l){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":l?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":l?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!l)return;t.focusOption("pageup");break;case"PageDown":if(!l)return;t.focusOption("pagedown");break;case"Home":if(!l)return;t.focusOption("first");break;case"End":if(!l)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.buildMenuOptions=function(e,n){var r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=t.isOptionDisabled(e,n),a=t.isOptionSelected(e,n),s=t.getOptionLabel(e),u=t.getOptionValue(e);if(!(t.shouldHideSelectedOptions()&&a||!t.filterOption({label:s,value:u,data:e},o))){var l=i?undefined:function(){return t.onOptionHover(e)},c=i?undefined:function(){return t.selectOption(e)},f="".concat(t.getElementId("option"),"-").concat(r);return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:f,label:s,type:"option",value:u}}};return i.reduce((function(e,n,r){if(n.options){t.hasGroups||(t.hasGroups=!0);var o=n.options.map((function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o})).filter(Boolean);if(o.length){var i="".concat(t.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:i,data:n,options:o})}}else{var s=a(n,"".concat(r));s&&(e.render.push(s),e.focusable.push(n))}return e}),{render:[],focusable:[]})};var o=e.value;t.cacheComponents=Pr(t.cacheComponents,oo).bind(xr(t)),t.cacheComponents(e.components),t.instancePrefix="react-select-"+(t.props.instanceId||++bi);var i=Mr(o);t.buildMenuOptions=Pr(t.buildMenuOptions,(function(e,t){var n=mr(e,2),r=n[0],o=n[1],i=mr(t,2),a=i[0];return o===i[1]&&r.inputValue===a.inputValue&&r.options===a.options})).bind(xr(t));var a=e.menuIsOpen?t.buildMenuOptions(e,i):{render:[],focusable:[]};return t.state.menuOptions=a,t.state.selectValue=i,t}return _r(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.menuIsOpen,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==o||e.inputValue!==i){var a=Mr(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},u=this.getNextFocusedValue(a),l=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:l,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,i,a=this.props,s=a.isDisabled,u=a.menuIsOpen,l=this.state.isFocused;(l&&!s&&e.isDisabled||l&&u&&!e.menuIsOpen)&&this.focusInput(),l&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=n.offsetHeight/3,o.bottom+i>r.bottom?Rr(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+i,t.scrollHeight)):o.top-i-1&&(l=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:i,focusedValue:null,focusedOption:i.focusable[l]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:u}})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s0&&arguments[0]!==undefined?arguments[0]:"first",t=this.props,n=t.pageSize,r=t.tabSelectsValue,o=this.state,i=o.focusedOption,a=o.menuOptions,s=a.focusable;if(s.length){var u=0,l=s.indexOf(i);i||(l=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:r}})),"up"===e?u=l>0?l-1:s.length-1:"down"===e?u=(l+1)%s.length:"pageup"===e?(u=l-n)<0&&(u=0):"pagedown"===e?(u=l+n)>s.length-1&&(u=s.length-1):"last"===e&&(u=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[u],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:fi(s[u]),tabSelectsValue:r}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(pi):mi(mi({},pi),this.props.theme):pi}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,o=this.setValue,i=this.selectOption,a=this.props,s=a.isMulti,u=a.isRtl,l=a.options;return{cx:t,clearValue:e,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:i,setValue:o,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return t===undefined?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,l=i.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",f=o&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",d=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(f," ").concat(d," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,n=e.isDisabled,r=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,u=this.components.Input,l=this.state.inputIsHidden,c=o||this.getElementId("input"),f={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!r)return t().createElement(zo,Ee({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Dr,onFocus:this.onInputFocus,readOnly:!0,disabled:n,tabIndex:a,form:s,value:""},f));var d=this.commonProps,p=d.cx,h=d.theme,m=d.selectProps;return t().createElement(u,Ee({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:n,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:m,spellCheck:"false",tabIndex:a,form:s,theme:h,type:"text",value:i},f))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,n=this.components,r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,u=n.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,h=c.inputValue,m=c.placeholder,y=this.state,g=y.selectValue,v=y.focusedValue,b=y.isFocused;if(!this.hasValue()||!f)return h?null:t().createElement(u,Ee({},l,{key:"placeholder",isDisabled:d,isFocused:b}),m);if(p)return g.map((function(n,s){var u=n===v;return t().createElement(r,Ee({},l,{components:{Container:o,Label:i,Remove:a},isFocused:u,isDisabled:d,key:"".concat(e.getOptionValue(n)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(n)},onTouchEnd:function(){return e.removeValue(n)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:n}),e.formatOptionLabel(n,"value"))}));if(h)return null;var w=g[0];return t().createElement(s,Ee({},l,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return t().createElement(e,Ee({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!e||!i)return null;return t().createElement(e,Ee({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,n=e.DropdownIndicator,r=e.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return t().createElement(r,Ee({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return t().createElement(e,Ee({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,n=this.components,r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,u=n.LoadingMessage,l=n.NoOptionsMessage,c=n.Option,f=this.commonProps,d=this.state,p=d.focusedOption,h=d.menuOptions,m=this.props,y=m.captureMenuScroll,g=m.inputValue,v=m.isLoading,b=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,x=m.menuPlacement,k=m.menuPosition,E=m.menuPortalTarget,C=m.menuShouldBlockScroll,S=m.menuShouldScrollIntoView,j=m.noOptionsMessage,P=m.onMenuScrollToTop,A=m.onMenuScrollToBottom;if(!_)return null;var D,T=function(n){var r=p===n.data;return n.innerRef=r?e.getFocusedOptionRef:undefined,t().createElement(c,Ee({},f,n,{isFocused:r}),e.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())D=h.render.map((function(n){if("group"===n.type){n.type;var i=dr(n,["type"]),a="".concat(n.key,"-heading");return t().createElement(r,Ee({},f,i,{Heading:o,headingProps:{id:a,data:n.data},label:e.formatGroupLabel(n.data)}),n.options.map((function(e){return T(e)})))}if("option"===n.type)return T(n)}));else if(v){var N=b({inputValue:g});if(null===N)return null;D=t().createElement(u,f,N)}else{var M=j({inputValue:g});if(null===M)return null;D=t().createElement(l,f,M)}var L={minMenuHeight:w,maxMenuHeight:O,menuPlacement:x,menuPosition:k,menuShouldScrollIntoView:S},I=t().createElement(Yr,Ee({},f,L),(function(n){var r=n.ref,o=n.placerProps,s=o.placement,u=o.maxHeight;return t().createElement(i,Ee({},f,L,{innerRef:r,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:s}),t().createElement(ui,{isEnabled:y,onTopArrive:P,onBottomArrive:A},t().createElement(ii,{isEnabled:C},t().createElement(a,Ee({},f,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),D))))}));return E||"fixed"===k?t().createElement(s,Ee({},f,{appendTo:E,controlElement:this.controlRef,menuPlacement:x,menuPosition:k}),I):I}},{key:"renderFormField",value:function(){var e=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=this.state.selectValue;if(a&&!o){if(i){if(r){var u=s.map((function(t){return e.getOptionValue(t)})).join(r);return t().createElement("input",{name:a,type:"hidden",value:u})}var l=s.length>0?s.map((function(n,r){return t().createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:e.getOptionValue(n)})})):t().createElement("input",{name:a,type:"hidden"});return t().createElement("div",null,l)}var c=s[0]?this.getOptionValue(s[0]):"";return t().createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?t().createElement(Ho,{"aria-live":"polite"},t().createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),t().createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,n=e.Control,r=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,u=a.id,l=a.isDisabled,c=a.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return t().createElement(o,Ee({},d,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),t().createElement(n,Ee({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),t().createElement(i,Ee({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),t().createElement(r,Ee({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),r}(e.Component);function Oi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var o=Cr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Er(this,n)}}wi.defaultProps=vi;var _i={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null};var xi,ki,Ei,Ci=(xi=wi,Ei=ki=function(e){kr(r,e);var n=Oi(r);function r(){var e;wr(this,r);for(var t=arguments.length,o=new Array(t),i=0;i1?n-1:0),o=1;o0?" mf-error-res":""),"data-show":l},React.createElement("div",{className:"mf-response-msg"},s.length?m():y()))}}catch(g){console.error("Error selecting element:",g)}};function Ri(e){return(Ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var qi=function(e,t,n){if("mf-captcha-challenge"!==e&&"g-recaptcha-response"!==e&&"right-answer"!==e&&"wrong-answer"!==e&&"quiz-marks"!==e&&"total-question"!==e){var r=n.getValue(e),o=n.formContainerRef.current;Array.isArray(r)&&(r=r.join(", ")),"object"===Ri(r)&&r.name&&(r=r.name);if(function(e){return"File"in window&&e instanceof File}(r[0])&&"object"===Ri(r)&&(r=Object.keys(r).map((function(e){return r[e].name})).join(", ")),"string"==typeof r&&r.includes("data:image")&&(r=React.createElement("img",{src:r,alt:e})),!r)return"";var i=null==o?void 0:o.querySelectorAll("input");null==i||i.forEach((function(t){t.name==e&&"password"===t.type&&(r="*".repeat(r.length))}));var a=function(e,t,n){var r,o=null==n||null===(r=n.formContainerRef)||void 0===r?void 0:r.current,i=null==o?void 0:o.querySelector('[name="'+e+'"]'),a=i?i.closest(".mf-input-wrapper").querySelector("label"):null,s=t.includes("-")?t.split("-")[1]:t,u=s.charAt(0).toUpperCase()+s.slice(1);return a?a.innerText.replace(/\*/g,"").trim():u}(e,e,n);return React.createElement("li",{key:t},React.createElement("strong",null," ",a," ")," ",React.createElement("span",null," ",r," "))}},Fi=function(){document.querySelectorAll(".mf-input-map-location").forEach((function(e){if("undefined"!=typeof google){var t=new google.maps.places.Autocomplete(e,{types:["geocode"]});google.maps.event.addListener(t,"place_changed",(function(){e.dispatchEvent(new Event("input",{bubbles:!0}))}))}}))};function Vi(e){return(Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window.mfMapLocation=Fi;var Bi,Ui=function(e){var t=function(){this.parser=new u},n=t.prototype;function r(e,t){for(var n=[],r=t,o=e.length;r=this.level&&"function"==typeof this.out){var n=r(arguments,2);n=[this.prefix+t].concat(n),this.out.apply(this,n)}},o),s=function(){var e=function(e){this.obj=e||{}},t=e.prototype;return t.get=function(e){var t=this.obj[e];return t===undefined&&this.parent&&(t=this.parent.get(e)),t},t.set=function(e,t){return this.obj[e]=t,this.get(e)},e}(),u=function(){var e=new a("PARSER",a.NONE),t=new a("EMIT",a.NONE),n=function(){};function o(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}function i(e,t,n){if(1===n.length&&"object"===Vi(n[0])){var r=n[0];t.forEach((function(t){e[t]=r[t]}))}else for(var o=0,i=t.length,a=n.length;o1){var c=v(n,1);l={pos:c.pos||0,text:"LParen"===c.id?"Open paren":"Invalid expression"};n.error=l,e.warn("%s at %d (eof)",l.text,l.pos)}return{root:n.stack.pop(),vars:Object.keys(n.scope),error:n.error}}(r.tokens);t.debug("AST: %o",a);var s,l,c=(s=u(a.root),function(e){try{return s.apply(null,arguments)}catch(t){e.set("runtimeError",{text:""+t})}});return l={},{error:r.error||a.error,args:o(a.vars),eval:function(){return c(i(l,a.vars,arguments))},set scope(e){l=e||{}},get scope(){return l}}};var f={};function p(e,t,n){for(var r=0,o=t.length;r=a.DEBUG?t.map((function(e){return e.id})):""}function m(e,t){return y(e,0,t)}function y(e,t,n){var r=e.stack.slice(0,e.stack.length-t),o=e.pos;return n&&(r.push(n),n.pos!==undefined&&(o=n.pos)),{tokens:e.tokens,pos:o,stack:r,scope:e.scope,error:e.error}}function g(t,n){switch(v(t,0).id){case"Tuple":return function(e){var t=v(e,0);return y(e,1,{id:"Expr",expr:t})}(t);case"OpenTuple":case"Comma":return b(t,n);case"Assign":case"Sums":return function(e,t){var n=v(e,1),r=v(e,0);if(r!==undefined&&"Sums"===r.id)return w(e,["Eq"],"Assign");if(n!==undefined&&"Eq"===n.id)return w(e,["Eq"],"Assign");return b(e,t)}(t,n);case"Prod":return function(e){return w(e,["Plus","Minus"],"Sums")}(t);case"Power":case"Unary":return function(e){var t=v(e,1),n=v(e,0);if(n!==undefined&&"Unary"===n.id){var r=_(e,!1);return r||y(e,1,{id:"Power",expr:n})}if(n!==undefined&&"Power"===n.id&&t!==undefined&&"Pow"===t.id)return w(e,["Pow"],"Power");return function(e){return w(e,["Mul","Div","Mod"],"Prod")}(e)}(t);case"Call":case"Parens":return _(t);case"Value":case"RParen":return function(t){var n=v(t,3),r=v(t,2),o=v(t,1),i=v(t,0),a={id:"Parens"};if("RParen"===i.id){if(o!==undefined&&"LParen"===o.id)return r!==undefined&&"Var"===r.id?y(t,3,a={id:"Call",token:r}):y(t,2,a={id:"OpenTuple"});if(r===undefined||"LParen"!==r.id){var s={pos:i.pos,text:"Unmatched paren"};return t.error=s,e.warn("%s at %d",s.text,s.pos),y(t,1)}return n!==undefined&&"Var"===n.id?y(t,4,a={id:"Call",token:n,args:o}):(a.expr=o,y(t,3,a))}return a.expr=i,y(t,1,a)}(t);case"Number":case"Var":return function(e){var t=v(e,0);e=y(e,1,{id:"Value",token:t}),"Var"===t.id&&(e.scope[t.value]=t);return e}(t)}return t}function v(e,t){return t===undefined&&(t=0),e.stack[e.stack.length-(t+1)]}function b(e,t){var n=v(e,2),r=v(e,1),o=v(e,0),i={id:"OpenTuple"};return"Comma"===o.id?y(e,2,r):r!==undefined&&"Comma"===r.id?(i.op=r,i.left=n,i.right=o,y(e,3,i)):t!==undefined&&"Comma"===t.id?(i.expr=o,y(e,1,i)):y(e,1,i={id:"Tuple",expr:o})}function w(e,t,n){var r=v(e,2),o=v(e,1),i=v(e,0),a={id:n};return o!==undefined&&-1!==t.indexOf(o.id)?(a.op=o,a.left=r,a.right=i,y(e,3,a)):(a.expr=i,y(e,1,a))}p(1,["(empty)","Plus","Minus","Mul","Div","Mod","Pow","LParen","Eq","Comma"],["Plus","Minus","LParen","Number","Var"]),p(1,["Var"],["LParen","Eq"]),p(1,["Sums"],["Plus","Minus"]),p(1,["Prod"],["Mul","Div","Mod"]),p(1,["Unary"],["Pow"]),p(1,["OpenTuple","Tuple"],["Comma"]),p(1,["LParen","Expr"],["RParen"]),p(2,["Number","Var","Value","RParen","Parens","Call","Unary","Power","Prod","Sums","Assign"],["Comma"]),p(2,["Number","Var","Value","RParen","Parens","Call","Unary","Power","Prod"],["Plus","Minus"]),p(2,["Number","Var","Value","RParen","Parens","Call","Unary","Power"],["Mul","Div","Mod"]),p(2,["Number","Var","Value","RParen","Parens","Call"],["Pow"]),p(2,["Number","Var","Value","RParen","Parens","Call","Unary","Power","Prod","Sums","Assign","Comma","OpenTuple","Tuple"],["RParen","(eof)"]),p(0,["(empty)","Expr"],["(eof)"]);var O=["Pow","Mul","Div","Mod","Plus","Minus","Eq","Comma","LParen"];function _(e,t){var n=v(e,2),r=v(e,1),o=v(e,0),i={id:"Unary"};return r===undefined||"Minus"!==r.id&&"Plus"!==r.id||n!==undefined&&-1===O.indexOf(n.id)?!1!==t?(i.expr=o,y(e,1,i)):void 0:(i.op=r,i.right=o,y(e,2,i))}var x=/^(?:(\s+)|((?:\d+e[-+]?\d+|\d+(?:\.\d*)?|\d*\.\d+))|(\+)|(\-)|(\*)|(\/)|(%)|(\^)|(\()|(\))|(=)|(,)|([a-zA-Z]\w*))/i,k=["Space","Number","Plus","Minus","Mul","Div","Mod","Pow","LParen","RParen","Eq","Comma","Var"];function E(t,n){var r=t.slice(n);if(0!==r.length){var o=x.exec(r);if(null===o){var i=function(e,t){for(var n=e.length;t0?".e-container--column":n.find(".e-con").length>0?".e-con":".elementor-top-section";if(".e-con"==r&&setTimeout((function(){n.find('div[data-elementor-type="wp-post"]').find(".e-con.active").each((function(){Bi(this).parent().hasClass('div[data-elementor-type="wp-post"]')||Bi(this).hasClass("e-con")&&Bi(this).not('div[data-elementor-type="wp-post"] > .e-con.active').removeClass("active")}))}),1),n.length){var o=[],i="";".e-con"==r?(i=n.find('div[data-elementor-type="wp-post"] '.concat(r,":first-child")).parent()[0],i=jQuery(i)):".elementor-top-section"==r&&(i=n.find('div[data-elementor-type="wp-post"] '.concat(r,":first-child")).parent()),i.find("> ".concat(r)).each((function(e){var t=this.getElSettings("metform_multistep_settings_title")||"Step-"+Bi(this).data("id"),r=this.getElSettings("metform_multistep_settings_icon"),i="",a="";r&&(i="svg"===r.library?'':r.value.length?'':""),0===e?(a="active",n.hasClass("mf_slide_direction_vertical")&&Bi(this).parents(".elementor-section-wrap").css("height",Bi(this).height())):1===e&&(a="next"),t&&o.push(""+i+''+t+"")})),o&&(n.find(".metform-form-content .metform-form-main-wrapper > .elementor").before(""),n.find("".concat(r,":first-of-type")).addClass("active"),n.find(".mf-progress-step-bar span").attr("data-portion",100/o.length).css("width",100/o.length+"%"))}n.find("".concat(r," .metform-btn")).attr("type","button"),n.find(".mf-input").on("keypress",(function(e){13!==e.which||Bi(this).hasClass("mf-textarea")||n.find(".metform-step-item.next").trigger("click")})),n.find(r).on("keydown",(function(e){var t=Bi(this),n=Bi(":focus");if(9==e.which)if(t.hasClass("active")){var r=t.find(":focusable"),o=r.index(n),i=r.eq(o),a=r.eq(r.length-1);i.is(a)&&(i.focus(),e.preventDefault())}else n.focus(),e.preventDefault()})),n.find(".metform-steps").on("click",".metform-step-item",(function(){var e,o=this,i=Bi(this).parents(".mf-form-wrapper").eq(0),a=i.find("".concat(r,".active .mf-input")),s=(Bi("body").hasClass("rtl")?100:-100)*Bi(this).index()+"%",u=(i.find(".mf-progress-step-bar").attr("data-total"),Bi(this.nextElementSibling).hasClass("active")),l=[];Bi(this).hasClass("prev","progress")&&Bi(this).removeClass("progress"),a.each((function(){var e=Bi(this),t=this.name;(e.hasClass("mf-input-select")||e.hasClass("mf-input-multiselect"))&&(t=e.find('input[type="hidden"]')[0].name),e.parents(".mf-input-repeater").length&&(t=""),t&&l.push(t)})),e=function(e){e&&(i.find("".concat(r,".active .metform-btn")).attr("type","button"),(Bi(o).hasClass("prev")||Bi(o).hasClass("next"))&&(Bi(o).addClass("active").removeClass("next prev").prev().addClass("prev").siblings().removeClass("prev").end().end().next().addClass("next").siblings().removeClass("next").end().end().siblings().removeClass("active"),i.find("".concat(r,'[data-id="')+Bi(o).data("value")+'"]').addClass("active").siblings().removeClass("active"),n.hasClass("mf_slide_direction_vertical")?(i.find(".elementor-section-wrap ".concat(r)).css({transform:"translateY("+s+")"}),i.find(".elementor-section-wrap").css("height","calc("+i.find("".concat(r,'[data-id="')+Bi(o).data("value")+'"]').height()+"px)")):i.find(".elementor-section-wrap").css({transform:"translateX("+s+")"})),i.find(".mf-progress-step-bar span").css("width",(Bi(o).index()+1)*i.find(".mf-progress-step-bar span").attr("data-portion")+"%"),i.find("".concat(r,".active")).find(".metform-submit-btn").length&&setTimeout((function(){i.find("".concat(r,".active")).find(".metform-submit-btn").attr("type","submit")}),0))},u?e(!0):(t.doValidate(l).then(e),"yes"===Bi(this).closest("div[data-previous-steps-style]").attr("data-previous-steps-style")&&setTimeout((function(){Bi(o).hasClass("active")&&Bi(o).prevAll().addClass("progress")}),0))}))};function zi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||Yi(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Yi(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(s)throw i}}}}function Ki(e){return function(e){if(Array.isArray(e))return Gi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yi(e,t){if(e){if("string"==typeof e)return Gi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&p.append("hidden-fields",JSON.stringify(b)),n="mf_success_duration"in r.props.widgetSettings?r.props.widgetSettings.mf_success_duration:5,n*=1e3,fetch(u,{method:"POST",headers:{"X-WP-Nonce":l},body:p}).then((function(e){return e.json()})).then((function(e){if(r.formSubmitResponse=e,e.status){var o,i,a=new CustomEvent("mf_submit_success",{form_data:h,bubbles:!0,cancelable:!0,composed:!1});document.dispatchEvent(a),r.setState({success:"true"===r.props.quizSummery&&Object.keys(r.state.answers).length&&e.data.message?"".concat(e.data.message," You have got ").concat(r.state.formData["quiz-marks"]," Marks. Right Answer ").concat(null===(o=r.state.formData)||void 0===o?void 0:o["right-answer"].length,".\n\t\t\t\t\tWrong Answer ").concat(null===(i=r.state.formData)||void 0===i?void 0:i["wrong-answer"].length,"."):e.data.message?e.data.message:"",form_res:1},(function(){r.resetReCAPTCHA(),c.clearErrors("g-recaptcha-response")})),e.status&&e.data.hide_form&&(r.formRef.current.setAttribute("class","mf-close-this-form"),setTimeout((function(){r.formRef.current.innerHTML=""}),600)),r.setState({formData:{}}),jQuery(t.target).trigger("reset"),jQuery(t.target).find(".m-signature-pad .btn.clear").trigger("click"),jQuery(t.target).find(".mf-repeater-select-field").val(null).trigger("change"),0!=jQuery(t.target).find(".mf-repater-range-input").length&&jQuery(t.target).find(".mf-repater-range-input").asRange("set","0"),0!=jQuery(t.target).find(".g-recaptcha-response-v3").length&&grecaptcha.ready((function(){grecaptcha.execute(jQuery(t.target).find("#recaptcha_site_key_v3")[0].dataset.sitekey,{action:"submit"}).then((function(e){jQuery(t.target).find(".g-recaptcha-response-v3").val(e)}))})),r.setState((function(e){return{resetKey:e.resetKey+1,mobileWidget:{}}})),r.setState(na(na({},r.state),{},{defaultData:{form_nonce:r.state.defaultData.form_nonce}})),d(),setTimeout((function(){r.setState({errors:[],form_res:0})}),n)}else r.setState({errors:Ki(e.error),form_res:1},(function(){r.resetReCAPTCHA(),r.setValue("mf-captcha-challenge","",!0),c.clearErrors("g-recaptcha-response")}));if(e.data.store&&"stripe"===e.data.store["mf-payment-method"]&&r.stripePayment(e),jQuery(r.mfRefs.mainForm.parentElement).trigger("metform/after_submit",{data:h,response:e}),(e.data.store&&"stripe"!==e.data.store["mf-payment-method"]||0==e.store_entries&&e.status&&""!==e.data.redirect_to.trim())&&e.status&&e.data.redirect_to.trim()){e.data.entry_id;var s=e.data.redirect_to;setTimeout((function(){window.location.href=s}),1500)}setTimeout((function(){e.data.hide_form||e.data.store&&"stripe"!==e.data.store["mf-payment-method"]&&r.setState({success:"",errors:[],form_res:0})}),n)}))["catch"]((function(e){r.setState({errors:["Something went wrong"],form_res:1},(function(){r.resetReCAPTCHA(),r.setValue("mf-captcha-challenge","",!0),c.clearErrors("g-recaptcha-response")})),console.error(e.message),setTimeout((function(){r.setState({errors:[],form_res:0})}),n)}))["finally"]((function(){if(r.state.submitted=!0,jQuery(r.mfRefs.mainForm).find(".metform-submit-btn").attr("disabled",!1),!r.props.stopVerticalEffect){var e=r.mfRefs.mainForm.querySelector(".mf-main-response-wrap");ia.move(e)}setTimeout((function(){localStorage.removeItem("metform-".concat(r.props.formId)),jQuery(r.mfRefs.mainForm).find(".mf-toggle-select-input").each((function(){jQuery(this).removeAttr("checked")})),r.state.hasOwnProperty(["QuizInfo"])&&(r.state.formData["total-question"]=r.state.QuizInfo.totalQuestion,r.state.formData["right-answer"]=r.state.QuizInfo.rightAnswer,r.state.formData["wrong-answer"]=r.state.QuizInfo.wrongAnswer,r.state.formData["quiz-marks"]=r.state.QuizInfo.marks)}),350)}))})),ra(r,"handleCalculations",(function(e,t){var n=e.target.calc_behavior,o=ReactDOM.findDOMNode(r),i=o.length?o.querySelectorAll(".mf-input-calculation"):[];for(var a in t)if(Array.isArray(t[a])){var s=t[a].map((function(e){return isNaN(e)?e:Number(e)}));t[a]=s}for(var u in i.forEach((function(e){var o=String(e.dataset.comma),i=parseInt(e.dataset.fraction),a=parseInt(e.dataset.fractionMin);i=i<0||i>99?2:i;var s=r.MfMathCalc.parse(e.dataset.equation,t,n)||0;if("NaN"!==s)if("yes"===o){var u=s.toLocaleString("en-US",{minimumFractionDigits:a,maximumFractionDigits:i});t[e.name]=u}else{var l=s.toString().split(".");(a>0||i>0)&&(1===l.length?a>0&&l.push("0".repeat(a)):(l[1]=l[1].slice(0,i),l[1]=l[1].padEnd(a,"0"))),t[e.name]=l.join(".")}})),t)if(Array.isArray(t[u]))for(var l=0;l":return e>t;case">=":return e>=t;case"==":return e==t;case"!=":return e!=t;case"not-empty":return void 0!==e&&String(e).length>0;case"empty":return void 0!==e&&0==String(e).length;default:return!1}}(t.value,t.match,t.operator));var i=t.mf_conditional_logic_form_if;if(i){var s=jQuery("input[name = ".concat(i,"]")).closest(".elementor-element[mf-condition-hidden]").attr("mf-condition-hidden");e.parentCondition=s}})),e.isValidated=e.validatedValues.some((function(e){return!0===e})),"and"===e.operator&&(e.isValidated=e.validatedValues.every((function(e){return!0===e})));var t=e.settings.mf_input_name;if(e.isValidated&&"show"===e.action){var i;e.el.setAttribute("mf-condition-hidden",!1),e.el.classList.remove("mf-condition--hidden"),null===(i=e.el.closest(".e-container, .e-con, .elementor-top-section"))||void 0===i||i.classList.remove("mf-condition--hidden"),e.parentCondition!==undefined&&e.el.setAttribute("mf-condition-hidden",e.parentCondition),"noval"===l(t)&&c(t,undefined)}else{var s,u;if(e.el.setAttribute("mf-condition-hidden",!0),!e.el.closest(".elementor-inner-section")&&!e.el.closest(".e-container")&&!e.el.closest(".e-con"))Array.isArray(null===(s=Object.values(e.el.closest(".elementor-widget-wrap"))[1])||void 0===s?void 0:s.children)||e.el.closest(".elementor-top-section").classList.add("mf-condition--hidden");if(e.el.closest(".e-container"))(null===(u=Object.values(e.el.closest(".e-container"))[1])||void 0===u||null===(u=u.children)||void 0===u?void 0:u.length)<=2&&e.el.closest(".e-container").classList.add("mf-condition--hidden");e.el.classList.add("mf-condition--hidden"),Object.values(e.el.classList).indexOf("elementor-widget-mf-select")>-1&&c(t,"noval")}}))})),ra(r,"getValue",(function(e){return e in r.state.formData?r.state.formData[e]:""})),ra(r,"getFileLabel",(function(e,t){var n=r.state.formData[e],o="";if(n&&(null==n?void 0:n.length)>1){for(var i=0;i<(null==n?void 0:n.length);i++)o+=n[i].name+",";o=o.slice(0,-1)}else 1==(null==n?void 0:n.length)&&(o=n?n[0].name:"");return n?o:r.decodeEntities(t)})),ra(r,"getInputLabel",(function(e,t){var n=ReactDOM.findDOMNode(r).querySelector('[name="'+e+'"]'),o=n?n.closest(".mf-input-wrapper").querySelector("label"):null;return o?o.innerText.replace(/\*/g,"").trim():t})),ra(r,"decodeEntities",(function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value})),ra(r,"setDefault",(function(e){if(null!==e){var t=e.name,n=e.value,o=r.state.defaultData;o[t]=n,r.setState({defaultData:o})}})),ra(r,"isNumeric",(function(e){return!isNaN(parseFloat(e))&&isFinite(e)})),ra(r,"setStateValue",(function(e,t){r.setState({name:e,value:t})})),ra(r,"handleCardNumber",(function(e){var t=e.target,n=t.name,o=t.value,i=r.state.formData,a=i[n+"--type"],s=o.replace(/\s+/g,"").replace(/[^0-9]/gi,""),u=i[n],l="amex"===a?5:4,c="amex"===a?15:16;if(new RegExp("^[0-9]*$").test(s)&&s.length<=c){for(var f=s.match(/\d{4,16}/g),d=f&&f[0]||"",p=[],h=0,m=d.length;h12?12:i,!0),r.handleChange(e)})),ra(r,"handleSubVal",(function(e,t){var n=e.target,o=n.name,i=n.value,a=parseInt(i.replace(/-/g,"").substring(0,t))||"";r.setValue(o,a,!0),e.target.value=a,r.handleChange(e)})),ra(r,"handleSaveProgress",(function(e,t){if(!elementorFrontend.isEditMode()&&"true"===r.props.saveProgress&&!(document.getElementsByName(e)[0].className.includes("mf-captcha-input")||document.getElementsByName(e)[0].className.includes("g-recaptcha-response")||document.getElementsByName(e)[0].className.includes("g-recaptcha-response-v3")||"password"==document.getElementsByName(e)[0].type||document.getElementsByName(e)[0].closest(".mf-credit-card-wrapper")||"file"===document.getElementsByName(e)[0].type)){var n=new Date;n.setMinutes(n.getMinutes()+120),null===localStorage.getItem("metform-".concat(r.props.formId))&&localStorage.setItem("metform-".concat(r.props.formId),JSON.stringify({expireTime:n.getTime()})),setTimeout((function(){var n,o,i=null===(n=document.getElementsByClassName("mf-input-calculation")[0])||void 0===n?void 0:n.value,a=null===(o=document.getElementsByClassName("mf-input-calculation")[0])||void 0===o?void 0:o.name,s=JSON.parse(localStorage.getItem("metform-".concat(r.props.formId)));for(var u in i&&(s[a]=i),s[e]=t,s)""===s[u]&&delete s[u];localStorage.setItem("metform-".concat(r.props.formId),JSON.stringify(s))}),0)}})),ra(r,"compareArrays",(function(e,t){if(!e||!t)return!1;if(e.length!==t.length)return!1;var n=e.sort(),r=t.sort();return n.map((function(e,t){return r[t]===e})).every((function(e){return e}))})),ra(r,"handleIncorrectAnswer",(function(e,t,n,r,o,i){var a,s,u;null!==(a=e.formData["wrong-answer"])&&void 0!==a&&a.includes(n)||(t["wrong-answer"]=t["wrong-answer"]?[].concat(Ki(t["wrong-answer"]),[n]):[n],t["quiz-marks"]=(t["quiz-marks"]?t["quiz-marks"]:0)-(!(null!==(u=t["right-answer"])&&void 0!==u&&u.includes(n))&&(i||0)));if(null!==(s=t["right-answer"])&&void 0!==s&&s.includes(n)){var l=t["right-answer"].indexOf(n);t["quiz-marks"]=t["quiz-marks"]-o,t["quiz-marks"]=t["quiz-marks"]-(i||0),t["right-answer"].splice(l,1)}return t})),ra(r,"handleCorrectAnswer",(function(e,t,n,o){var i,a;e["quiz-marks"]=(e["quiz-marks"]?e["quiz-marks"]:0)+n,e["quiz-marks"]=(e["quiz-marks"]?e["quiz-marks"]:0)+(o||0),e["right-answer"]=e["right-answer"]?[].concat(Ki(e["right-answer"]),[t]):[t];var s=null===(i=e["wrong-answer"])||void 0===i?void 0:i.indexOf(t);null===(a=e["wrong-answer"])||void 0===a||a.splice(s,1),r.setState({formData:e})})),ra(r,"handleChange",(function(e){var t=e.target,n=t.name,o=t.value,i=t.type,a=r.state.formData;a[n]="number"===i&&"mobile"!==i?""==o?"":Number(o):o,r.handleCalculations(e,a),r.setState({formData:a});var s=e.target,u=!0;if(s.className!==undefined&&-1!==s.className.indexOf("mf-repeater-type-simple")&&(u=!1,e.target.from_repeter===undefined&&r.handleCheckboxForRepeter(e,"onClickForRepeter")),e.target.from_repeter!==undefined&&"from_repeter"==e.target.from_repeter&&(u=!1),u&&r.trigger(n),r.handleSaveProgress(n,o),"quiz-form"===r.props.formType&&Object.keys(r.state.answers).includes(n)){var l=parseFloat(r.state.answers[n].correctPoint),c=parseFloat(r.state.answers[n].incorrectPoint);if("multiselect"===i||"checkbox"===i){var f=r.handleIncorrectAnswer(r.state,a,n,o,l,c);r.compareArrays(o,r.state.answers[n].answer)&&r.handleCorrectAnswer(f,n,l,c)}else if("text"===i||"radio"===i){var d=r.handleIncorrectAnswer(r.state,a,n,o,l,c);(null==o?void 0:o.toLowerCase())===r.state.answers[n].answer.toLowerCase()&&r.handleCorrectAnswer(d,n,l,c)}else if("select"===i){var p=r.handleIncorrectAnswer(r.state,a,n,o,l,c);o===r.state.answers[n].answer&&r.handleCorrectAnswer(p,n,l,c)}}})),ra(r,"handleDateTime",(function(e){var t=e.target,n=t.name,o=t.value;r.setValue(n,o,!0),r.handleChange(e)})),ra(r,"handleSelect",(function(e,t){var n=e.value;e.target={name:t,value:n,type:"select"},r.setValue(t,n,!0),r.handleChange(e)})),ra(r,"handleRadioDefault",(function(e){var t=r.state.formData;if(e&&e.dataset.checked){var n=e.name;e.setAttribute("checked",!0),n in t||r.handleChange({target:{name:n,value:e.value}})}})),ra(r,"handleCheckbox",(function(e,t){if(!e)return!1;var n=r.state.formData,o=!1;if("onLoad"===t){var i=e.querySelectorAll(".mf-checkbox-input"),a=[];i.forEach((function(e){o||(o=e.name),e.checked&&a.push(e.value)})),!n[o]&&a.length&&r.handleChange({target:{name:o,value:a}})}if("onClick"===t){o||(o=e.name),n[o]||(n[o]=[]);var s=Ki(n[o]);if(e.checked&&s.push(e.value),!e.checked){var u=s.indexOf(e.value);u>-1&&s.splice(u,1)}r.handleChange({target:{name:o,value:s,type:"checkbox"}})}})),ra(r,"handleCheckboxForRepeter",(function(e,t){if(!e)return!1;var n=r.state.formData,o=!1;if("onClickForRepeter"===t){var i=e.target,a=i.name;if(i.className!==undefined&&-1!==i.className.indexOf("mf-repeater-checkbox")){var s=[];document.querySelectorAll('input[name="'+a+'"]').forEach((function(e){o||(o=e.name),e.checked&&s.push(e.value)})),n[o]&&s.length&&(e.target={name:o,value:s,type:"checkbox",from_repeter:"from_repeter"},r.handleChange(e))}}})),ra(r,"handleSwitch",(function(e){e.target.value=e.target.nextElementSibling.getAttribute("data-disable"),e.target.checked&&(e.target.value=e.target.nextElementSibling.getAttribute("data-enable")),r.handleChange(e)})),ra(r,"handleOptin",(function(e){e.target.checked||(e.target.value="Declined"),e.target.checked&&(e.target.value="Accepted"),r.handleChange(e)})),ra(r,"handleFileUpload",(function(e){r.handleChange({target:{name:e.target.name,value:e.target.files}})})),ra(r,"handleMultiStepBtns",(function(e){var t=jQuery(e.currentTarget).parents(".elementor-top-section.active").length>0?".elementor-top-section":jQuery(e.currentTarget).parents(".e-container--column.active").length>0?".e-container--column":".e-con",n=jQuery(e.currentTarget).parents("".concat(t,".active")),o=e.currentTarget.dataset.direction,i=n.prev()[0]?n.prev()[0].dataset:"",a=n.next()[0]?n.next()[0].dataset:"",s=("next"===o?a:i).id;if(!s)return!1;var u=jQuery(e.currentTarget).parents(".metform-form-content").find('.metform-step-item[data-value="'+s+'"]'),l=[];n.find(".mf-input").each((function(){var e=jQuery(this),t=this.name;(e.hasClass("mf-input-select")||e.hasClass("mf-input-multiselect"))&&(t=e.find('input[type="hidden"]')[0].name),e.parents(".mf-input-repeater").length&&(t=""),t&&l.push(t)})),jQuery(e.currentTarget).parents(".mf-scroll-top-yes").length&&ia.move(r.mfRefs.mainForm),"next"===o?r.trigger(l).then((function(e){e&&u.trigger("click")})):u.trigger("click")})),ra(r,"handleImagePreview",(function(e){var t=e.target,n=e.clientX,r=e.clientY,o=e.type,i=t.nextElementSibling,a=t.closest(".mf-image-select"),s=a.getBoundingClientRect(),u=r-s.top,l=n-s.left;if(i){if(t.closest(".mf-multistep-container")&&(r=u+50,n=l+30),"mouseleave"===o)return i.style.opacity="",void(i.style.visibility="hidden");i.style.opacity||(i.style.opacity="1",i.style.visibility="visible"),i.offsetHeight+r>window.innerHeight||r+2*a.clientHeight>window.innerHeight?(i.className="mf-select-hover-image mf-preview-top",r-=55):i.className="mf-select-hover-image",i.style.top=r+30+"px",i.style.left=n-28+"px"}})),ra(r,"handleSignature",(function(e){e.target={name:e.props.name,value:e.toDataURL()},r.handleChange(e),r.setValue(e.target.name,e.target.value,!0)})),ra(r,"handleEditorState",(function(e){var t=e.name,n=e.value;r.handleChange({target:{name:t,value:n}}),r.setValue(t,n,!0)})),ra(r,"refreshCaptcha",(function(e){r.setState({captcha_img:r.state.captcha_path+Date.now()})})),ra(r,"resetReCAPTCHA",(function(){r.getValue("mf-captcha-challenge")&&r.refreshCaptcha(),r.getValue("g-recaptcha-response")&&r.handleReCAPTCHA("reset")})),ra(r,"handleReCAPTCHA",(function(e){"reset"===e&&(e="",grecaptcha.reset());var t={target:{name:"g-recaptcha-response",value:(e=e||"")||""}};r.handleChange(t)})),ra(r,"handleRating",(function(e){var t=e.target,n=t.name,o=t.value,i={target:{name:n,value:o}};o===r.getValue(n)?r.handleChange(na(na({},i),{},{target:na(na({},i.target),{},{value:""})})):r.handleChange(i)})),ra(r,"activateValidation",(function(e,t,n){var o,i,a=r.state.formData,s=r.props.validation.register,u=e.type,l=e.required,c=e.message,f=e.minLength,d=e.maxLength,p=e.expression,h={};if(t&&l&&t.closest(".elementor-element")&&"true"===t.closest(".elementor-element").getAttribute("mf-condition-hidden"))h.required=!1;else{if((u&&"none"!==u||l)&&(h.required=!!l&&c),t&&t.classList&&t.classList.contains("mf-credit-card-number")&&(a[t.name]&&"amex"===a[t.name+"--type"]?h.minLength=h.maxLength={value:17,message:c}:h.minLength=h.maxLength={value:19,message:c}),e.inputType&&"credit_card_date"===e.inputType&&(f&&(h.min={value:f,message:c}),d&&(h.max={value:d,message:c})),t&&"file"===t.type&&t.files.length>0){var m=e.file_types,y=e.size_limit,g=t.files[0].name.substr(t.files[0].name.lastIndexOf(".")+1);h.validate={fileType:function(){return g=g.toLowerCase(),!(m!==[]&&!m.includes("."+g))||e.type_message},fileSize:function(){return!(-1!==y&&t.files[0].size>1024*parseInt(y))||e.limit_message}}}if(t&&"email"===t.type?h.pattern={value:/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,message:e.emailMessage}:t&&"url"===t.type&&(h.pattern={value:/^(http[s]?:\/\/(www\.)?|ftp:\/\/(www\.)?|www\.){1}([0-9A-Za-z-\.@:%_\+~#=]+)+((\.[a-zA-Z]{2,3})+)(\/(.)*)?(\?(.)*)?/g,message:e.urlMessage}),"by_character_length"===u){if(Object.keys(mf).length>0)var v=mf,b=v.maxMsg1,w=v.minMsg1,O=v.Msg2;o=t&&"number"===t.type?"min":"minLength",i=t&&"number"===t.type?"max":"maxLength",f&&(h[o]={value:f,message:"".concat(w+f+O)}),d&&(h[i]={value:d,message:"".concat(b+d+O)})}else if("by_range"===u){if(Object.keys(mf).length>0)var _=mf,x=_.minNum,k=_.maxNum;o=t&&"number"===t.type?"min":"minLength",i=t&&"number"===t.type?"max":"maxLength",f&&(h[o]={value:f,message:"".concat(x+f)}),d&&(h[i]={value:d,message:"".concat(k+d)})}else"by_word_length"===u?h.validate={wordLength:function(e){return r.handleWordValidate(e,f,d,c)}}:"by_expresssion_based"===u&&(h.validate={expression:function(e){return r.handleExpressionValidate(e,p,c)}})}return"function"==typeof n&&n(),t?s(t,h):h})),ra(r,"handleWordValidate",(function(e,t,n,r){var o=e.trim().split(/\s+/).length;if(0!==e.trim().length)return!!(n?o>=t&&o<=n:o>=t)||r})),ra(r,"handleExpressionValidate",(function(e,t,n){if(t&&0!==e.trim().length)return!!new RegExp(t).test(e)||n})),ra(r,"colorChange",(function(e,t){r.handleChange({target:{name:t,value:e.hex}})})),ra(r,"colorChangeInput",(function(e){r.handleChange({target:{name:e.target.name,value:e.target.value}})})),ra(r,"multiSelectChange",(function(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch(o){return}var n=[];if(null!==e)try{e.filter((function(e){return n.push(e.value?e.value:e.mf_input_option_value)}))}catch(i){return}r.handleChange({target:{name:t,value:n,type:"multiselect"}})})),ra(r,"handleRangeChange",(function(e,t){r.handleChange({target:{name:t,value:Number(e.toFixed(2)),type:"range"}}),r.props.validation.setValue(t,Number(e.toFixed(2)))})),ra(r,"handleMultipileRangeChange",(function(e,t){r.handleChange({target:{name:t,value:[e.min,e.max],calc_behavior:"decrease_first_value"}})})),ra(r,"handleOnChangePhoneInput",(function(e,t,n){var o="";n&&e!==n.dialCode&&(o=e),e&&(e=e.replace(/[^\d]/g,"")),r.setState({mobileWidget:na(na({},r.state.mobileWidget),{},ra({},t,e))}),r.handleChange({target:{name:t,value:o,type:"tel"}})})),ra(r,"setFormData",(function(e,t){r.state.formData[e]=t})),ra(r,"getParams",(function(){for(var e,t=window.location.search,n={},r=/[?&]?([^=]+)=([^&]*)/g;e=r.exec(t);)n[decodeURIComponent(e[1])]=decodeURIComponent(e[2]);return n})),ra(r,"setParamValueState",(function(){var e=r.state.formData,t=r.getParams(),n=r.props.widgets,o=function(o){var i=t[o].split(","),a=function(){var t=n[s].el,a=jQuery(t),u=a.data().settings,l=u.mf_input_list,c=[];function f(e){return a.find(e).length>0}function d(){var t=i.filter((function(e){return e.length>0&&c.length>0&&c.includes(e)})),n=Ki(new Set(t));n.length>0&&(e[o]=n)}function p(t){e[o]=t}if(u.mf_input_name===o&&"yes"===u.mf_input_get_params_enable){if(l&&l.length>0){for(var h=0;h0&&c.length>0&&c.includes(e)}))[0];t&&(e[o]=t)}(),f("input.mf-toggle-select-input:radio"))){var m=i.filter((function(e){return e.length>0&&c.length>0&&c.includes(e)}))[0];m&&a.find("input.mf-toggle-select-input:radio").each((function(){jQuery(this).prop("checked",!1),m.includes(jQuery(this).val())&&jQuery(this).prop("checked",!0)}))}if(f("input.mf-checkbox-input:checkbox")||f("input.mf-image-select-input:checkbox")||f("input.mf-toggle-select-input:checkbox"))d(),i.filter((function(e){return e.length>0&&c.length>0&&c.includes(e)})).length>0&&(a.find("input.mf-checkbox-input:checkbox").each((function(){jQuery(this).prop("checked",!1),i.includes(jQuery(this).val())&&jQuery(this).prop("checked",!0)})),a.find("input.mf-toggle-select-input:checkbox").each((function(){jQuery(this).prop("checked",!1),i.includes(jQuery(this).val())&&jQuery(this).prop("checked",!0)})));f(".mf-input-multiselect")&&d()}else{var y=i[0];if(f("input[type=email]")&&(p(y),a.find("input[type=email]").val(y)),f("input[type=checkbox]")&&"on"===y&&(p(y),a.find("input[type=checkbox]")[0].checked=!0),f("input[type=number]")){p(Number(y)),a.find("input[type=number]").val(Number(y));var g=a.find("input[type=number]")[0];g&&(g.addEventListener("click",(function(t){r.handleCalculations(t,e)})),g.click())}if(f(".range-slider")){var v=u.mf_input_min_length_range;u.mf_input_max_length_range>=Number(y)&&v<=Number(y)&&p(Number(y))}if(f(".mf-ratings"))u.mf_input_rating_number>=Number(y)&&0<=Number(y)&&p(Number(y));if(f("input.mf-input-switch-box:checkbox")){var b=u.mf_swtich_enable_text;b===y&&(p(b),a.find("input.mf-input-switch-box:checkbox")[0].checked=!0)}if(f("input.mf-payment-method-input:radio")){var w=["paypal","stripe"],O=i.filter((function(e){return e.length>0&&w.includes(e)}))[0];O&&p(O),O&&a.find("input.mf-payment-method-input:radio").each((function(){jQuery(this).prop("checked",!1),i.includes(jQuery(this).val())&&jQuery(this).prop("checked",!0)}))}if(f("input[type=text]")||f("input[type=password]")||f("input[type=tel")||f("textarea.mf-input")||f("input[type=url]")){var _=r.getParams()[o];if(f("input.flatpickr-input")){(y.match(/^[0-3]?[0-9].[0-3]?[0-9].(?:[0-9]{2})?[0-9]{2}$/)||y.match(/^(?:[0-9]{2})?[0-9]{2}.[0-3]?[0-9].[0-3]?[0-9]$/))&&p(_)}else p(_),a.find("input[type=text").val(_),a.find("input[type=password").val(_),a.find("input[type=tel").val(_),a.find("textarea.mf-input").val(_),a.find("input[type=url]").val(_)}f("input.mf-date-range")&&(p(y),a.find("input.mf-date-range").val(y))}r.setState({formData:e})}};for(var s in n)a()};for(var i in t)o(i)})),r.storageData=JSON.parse(localStorage.getItem("metform-".concat(e.formId)))||{},(null===(n=r.storageData)||void 0===n?void 0:n.expireTime)0&&(this.interval=setInterval((function(){a.forEach((function(e){n.ready((function(){n.execute(a[0].dataset.sitekey,{action:""}).then((function(t){e.querySelector(".g-recaptcha-response-v3").value=t}))}))}))}),108e3));var s=r.getElementsByTagName("input");for(var u in s)"email"===s[u].type&&""!==s[u].value&&this.setDefault(s[u]);if(o.forEach((function(e){var n=e.getAttribute("data-element_type"),r=e.getAttribute("data-widget_type"),o=null===r?n:r;e.dataset&&e.dataset.settings&&(e.dataset.settings=e.dataset.settings.replace(/"/g,'"'));var i=window.elementorFrontend.hooks;if(i?i.doAction("frontend/element_ready/"+o,jQuery(e)):jQuery(window).on("elementor/frontend/init",(function(){(i=window.elementorFrontend.hooks).doAction("frontend/element_ready/"+o,jQuery(e))})),e.className.search("elementor-widget-mf-")>0&&e.dataset.settings){var a=JSON.parse(e.dataset.settings),s=a.mf_input_name+"-"+e.getAttribute("data-id");t.props.widgets[s]={el:e,settings:a},a.mf_conditional_logic_form_enable&&t.props.conditionalRefs.push(s)}})),Object.keys(this.state.answers).length&&"quiz-form"===this.props.formType){var l=this.state.answers,c=this.state;i["right-answer"]=[],i["wrong-answer"]=[],i["quiz-marks"]=0,c.QuizInfo={totalQuestion:0,rightAnswer:[],wrongAnswer:[],marks:0},Object.keys(l).forEach((function(e){"string"==typeof l[e].answer&&""===l[e].answer||"object"===$i(l[e].answer)&&0===l[e].answer.length?(i["right-answer"]=[].concat(Ki(t.state.formData["right-answer"]),[e]),i["quiz-marks"]=i["quiz-marks"]+parseFloat(l[e].correctPoint)):(i["wrong-answer"]=[].concat(Ki(t.state.formData["wrong-answer"]),[e]),i["quiz-marks"]=i["quiz-marks"]-parseFloat(l[e].incorrectPoint))})),i["total-question"]=Object.keys(l).length,c.QuizInfo.rightAnswer=i["right-answer"],c.QuizInfo.wrongAnswer=i["wrong-answer"],c.QuizInfo.marks=i["quiz-marks"],c.QuizInfo.totalQuestion=Object.keys(l).length}for(var f in window.onload=function(e){t.renderReCaptcha(r,e)},this.handleConditionals(),this.props.formId&&fetch(mf.restURI+this.props.formId,{method:"POST",headers:{"X-WP-Nonce":this.props.wpNonce}}),Fi(),Hi(jQuery(r).parents(".mf-multistep-container").parent(),{doValidate:this.trigger}),jQuery(r).on("change asRange::change",".mf-repeater-field, .mf-repater-range-input, .mf-repeater-checkbox",this.handleChange),jQuery(r).trigger("metform/after_form_load",i),i)this.setValue(f,i[f]);this.setParamValueState()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){var e=this,t=e.props,n=e.state,r=t.validation,o=r.register,i=r.setValue,a=htm.bind(React.createElement);return React.createElement(React.Fragment,null,this.jsx(e,t,n,r,o,i,a))}}])&&Qi(n.prototype,r),o&&Qi(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(),sa=function(e){var t=zi(e.find(".mf-form-wrapper"),1)[0];if(t){var n=t.dataset,r=n.action,o=n.wpNonce,i=n.formNonce,a=n.formId,s=n.stopVerticalEffect,u=n.saveProgress,l=n.formType,c=n.quizSummery,f=zi(e.find(".mf-template"),1)[0];f&&ReactDOM.render(React.createElement(function(e){return function(t){var n=na(na({},ve()),{},{ErrorMessage:Oe});return React.createElement(e,na({validation:n},t))}}(aa),{formId:a,templateEl:f,action:r,wpNonce:o,formNonce:i,saveProgress:u,formType:l,quizSummery:c,widgets:{},conditionalRefs:[],stopVerticalEffect:s,widgetSettings:e.data("settings")||{},Select:Ci,InputColor:ar,Flatpickr:ke.A,InputRange:ur(),ReactPhoneInput:cr(),SignaturePad:ji(),moveTo:ia,ResponseDummyMarkup:Li,SubmitResponseMarkup:Ii,SummaryWidget:qi,DateWidget:Mi,TextEditor:Ni}),t)}};jQuery(window).on("elementor/frontend/init",(function(){var e=["metform","shortcode","text-editor"];"metform-form"!==mf.postType||elementorFrontend.isEditMode()?("metform-form"===mf.postType&&elementorFrontend.isEditMode()&&(e=["mf-date","mf-time","mf-select","mf-multi-select","mf-range","mf-file-upload","mf-mobile","mf-image-select","mf-map-location","mf-color-picker","mf-signature","mf-text-editor"]),e.forEach((function(e){elementorFrontend.hooks.addAction("frontend/element_ready/"+e+".default",sa)}))):sa(elementorFrontend.elements.$body)})).on("load",(function(){document.querySelectorAll(".mf-form-shortcode").forEach((function(e){sa(jQuery(e))}))}))}()}();