verifalia-widget
Advanced tools
Comparing version 1.1.0 to 1.2.0
// (c) Verifalia - email verification service - https://verifalia.com | ||
var VerifaliaWidget=function(){"use strict";var e,t="verifalia-cached-configuration";function n(e,t){var i=function(e){return e&&"object"==typeof e};return i(e)&&i(t)?(Object.keys(t).forEach((function(r){var a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)?e[r]=a.concat(o):i(a)&&i(o)?e[r]=n(Object.assign({},a),o):e[r]=o})),e):t}!function(e){e.throttled="throttled",e.invalid="invalid",e.exception="exception"}(e||(e={}));var i,r=function(){function e(e){this._globalConfiguration=e}return e.prototype.getConfiguration=function(e){return e?(e[t]||(e[t]=this.readConfiguration(e)),e[t]):this.readConfiguration()},e.prototype.shouldPreventFormSubmissionOn=function(e,t){if(e.inputBindings){var n=e.inputBindings.preventSubmission||"",i=void 0;return i=Array.isArray(n)?n.map((function(e){return e.trim().toUpperCase()})):n.split(",").map((function(e){return e.trim().toUpperCase()})),e.inputBindings.preventSubmission,i.indexOf(t.toUpperCase())>0}return!1},e.prototype.readConfiguration=function(e){var t=this,i=n(n({},{inputBindings:{autoWireup:!0,preventSubmission:"invalid, throttled",appendHiddenFields:!0,events:"change",debounceTime:500,classNames:{base:"verifalia-field",processing:"verifalia-field-processing",valid:"verifalia-field-valid",invalid:"verifalia-field-invalid",throttled:"verifalia-field-throttled",exception:"verifalia-field-exception"}},emailValidations:{allow:"deliverable, risky, unknown",block:"@disposable",messages:{processing:"Please hold on for a second, until we verify this email address...",invalid:"Please enter a valid email address.",throttled:"Too many attempts, please try again later.",exception:"An error has occurred while verifying this email address. Please try again later."}}}),this._globalConfiguration||{});return this._globalConfiguration,e&&(this.applyConfigurationItem(e,"appKey",(function(e){return i.appKey=e})),this.applyConfigurationItem(e,"inputBindings-autoWireup",(function(e){return i.inputBindings.autoWireup=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-appendHiddenFields",(function(e){return i.inputBindings.appendHiddenFields=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-debounceTime",(function(e){return i.inputBindings.debounceTime=parseInt(e)}))),i},e.prototype.toBoolean=function(e){return"true"===e},e.prototype.applyConfigurationItem=function(e,t,n){var i=this.readConfigurationItemRecursive(e,t);void 0!==i&&n(i)},e.prototype.readConfigurationItemRecursive=function(e,t){var n="data-verifalia-"+t,i=e.getAttribute(n);if(i)return i;var r=e.parentElement;return r?this.readConfigurationItemRecursive(r,t):void 0},e}();!function(e){e.Initializing="verifalia-widget:initializing",e.Initialized="verifalia-widget:initialized",e.FieldValidationStarted="verifalia-widget:field-validation-started",e.FieldValidationCompleted="verifalia-widget:field-validation-completed"}(i||(i={}));var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function u(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(o,s)}u((i=i.apply(e,t||[])).next())}))}function l(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){a.push([e,t,n,i])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof c?Promise.resolve(n.value.v).then(u,l):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var f=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}},p=Object.prototype.toString;function h(e){return"[object Array]"===p.call(e)}function A(e){return null!==e&&"object"==typeof e}function m(e){return"[object Function]"===p.call(e)}function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),h(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var g={isArray:h,isArrayBuffer:function(e){return"[object ArrayBuffer]"===p.call(e)},isBuffer:function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:A,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===p.call(e)},isFile:function(e){return"[object File]"===p.call(e)},isBlob:function(e){return"[object Blob]"===p.call(e)},isFunction:m,isStream:function(e){return A(e)&&m(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:v,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)v(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)v(arguments[i],n);return t},extend:function(e,t,n){return v(t,(function(t,i){e[i]=n&&"function"==typeof t?f(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function y(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var w=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(g.isURLSearchParams(t))i=t.toString();else{var r=[];g.forEach(t,(function(e,t){null!=e&&(g.isArray(e)?t+="[]":e=[e],g.forEach(e,(function(e){g.isDate(e)?e=e.toISOString():g.isObject(e)&&(e=JSON.stringify(e)),r.push(y(t)+"="+y(e))})))})),i=r.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function E(){this.handlers=[]}E.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},E.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},E.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var b=E,C=function(e,t,n){return g.forEach(n,(function(n){e=n(e,t)})),e},S=function(e){return!(!e||!e.__CANCEL__)},B=function(e,t){g.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))},x=function(e,t,n,i,r){return function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,i,r)},F=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],I=g.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=g.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},T=g.isStandardBrowserEnv()?{write:function(e,t,n,i,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),g.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),g.isString(i)&&o.push("path="+i),g.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},_=function(e){return new Promise((function(t,n){var i=e.data,r=e.headers;g.isFormData(i)&&delete r["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",s=e.auth.password||"";r.Authorization="Basic "+btoa(o+":"+s)}if(a.open(e.method.toUpperCase(),w(e.url,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var i,r,o,s,u,l="getAllResponseHeaders"in a?(i=a.getAllResponseHeaders(),u={},i?(g.forEach(i.split("\n"),(function(e){if(s=e.indexOf(":"),r=g.trim(e.substr(0,s)).toLowerCase(),o=g.trim(e.substr(s+1)),r){if(u[r]&&F.indexOf(r)>=0)return;u[r]="set-cookie"===r?(u[r]?u[r]:[]).concat([o]):u[r]?u[r]+", "+o:o}})),u):u):null,c={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:l,config:e,request:a};!function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(x("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,c),a=null}},a.onabort=function(){a&&(n(x("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(x("Network Error",e,null,a)),a=null},a.ontimeout=function(){n(x("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",a)),a=null},g.isStandardBrowserEnv()){var u=T,l=(e.withCredentials||I(e.url))&&e.xsrfCookieName?u.read(e.xsrfCookieName):void 0;l&&(r[e.xsrfHeaderName]=l)}if("setRequestHeader"in a&&g.forEach(r,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete r[t]:a.setRequestHeader(t,e)})),e.withCredentials&&(a.withCredentials=!0),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){a&&(a.abort(),n(e),a=null)})),void 0===i&&(i=null),a.send(i)}))},R={"Content-Type":"application/x-www-form-urlencoded"};function V(e,t){!g.isUndefined(e)&&g.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var U,k={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?U=_:"undefined"!=typeof XMLHttpRequest&&(U=_),U),transformRequest:[function(e,t){return B(t,"Accept"),B(t,"Content-Type"),g.isFormData(e)||g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e)?e:g.isArrayBufferView(e)?e.buffer:g.isURLSearchParams(e)?(V(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):g.isObject(e)?(V(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};g.forEach(["delete","get","head"],(function(e){k.headers[e]={}})),g.forEach(["post","put","patch"],(function(e){k.headers[e]=g.merge(R)}));var P=k;function D(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var O=function(e){var t,n,i;return D(e),e.baseURL&&(i=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(i))&&(e.url=(t=e.baseURL,(n=e.url)?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=C(e.data,e.headers,e.transformRequest),e.headers=g.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),g.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||P.adapter)(e).then((function(t){return D(e),t.data=C(t.data,t.headers,e.transformResponse),t}),(function(t){return S(t)||(D(e),t&&t.response&&(t.response.data=C(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Q=function(e,t){t=t||{};var n={};return g.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(n[e]=t[e])})),g.forEach(["headers","auth","proxy"],(function(i){g.isObject(t[i])?n[i]=g.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:g.isObject(e[i])?n[i]=g.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),g.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n};function N(e){this.defaults=e,this.interceptors={request:new b,response:new b}}N.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Q(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[O,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},N.prototype.getUri=function(e){return e=Q(this.defaults,e),w(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},g.forEach(["delete","get","head","options"],(function(e){N.prototype[e]=function(t,n){return this.request(g.merge(n||{},{method:e,url:t}))}})),g.forEach(["post","put","patch"],(function(e){N.prototype[e]=function(t,n,i){return this.request(g.merge(i||{},{method:e,url:t,data:n}))}}));var L=N;function M(e){this.message=e}M.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},M.prototype.__CANCEL__=!0;var j=M;function q(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new j(e),t(n.reason))}))}q.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},q.source=function(){var e;return{token:new q((function(t){e=t})),cancel:e}};var H=q;function K(e){var t=new L(e),n=f(L.prototype.request,t);return g.extend(n,L.prototype,t),g.extend(n,t),n}var z=K(P);z.Axios=L,z.create=function(e){return K(Q(z.defaults,e))},z.Cancel=j,z.CancelToken=H,z.isCancel=S,z.all=function(e){return Promise.all(e)},z.spread=function(e){return function(t){return e.apply(null,t)}};var Y=z,G=z;Y.default=G;var J,W,X=Y,Z=function(){function e(){}return e.prototype.build=function(e){return{log:function(){}}},e}(),ee=function(){function e(e,t){if(!e&&0===e.length)throw Error("username is null or empty: please visit https://verifalia.com/client-area to set up a new user, if you don't have one.");this._username=e,this._password=t}return e.prototype.addAuthentication=function(e){return s({},e,{auth:{username:this._username,password:this._password}})},e}(),te=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),ie=(new Z).build("verifalia"),re=function(){function e(e,t){void 0===t&&(t=null),this.isCancellationRequested=!1,this.waitForCompletion=e,this.progress=t}return e.prototype.waitForNextPoll=function(e){return u(this,void 0,void 0,(function(){var t,n,i,r,a;return l(this,(function(o){if(this.isCancellationRequested)throw new ne;return t=Math.max(.5,Math.min(30,Math.pow(2,Math.log10(e.noOfEntries)-1))),e.progress&&e.progress.estimatedTimeRemaining&&(n=e.progress.estimatedTimeRemaining.match(/^(?:(\d*?)\.)?(\d{2})\:(\d{2})\:(\d{2})(?:\.(\d*?))?$/))&&(i=parseInt(n[2]),r=parseInt(n[3]),a=parseInt(n[4]),t=a,t+=60*r,t+=3600*i,t=Math.max(.5,Math.min(30,t))),ie.log("waitForNextPoll delay (seconds)",t),[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},e.prototype.cancel=function(){this.isCancellationRequested=!0},e}();!function(e){e[e.Unknown=0]="Unknown",e.InProgress="InProgress",e.Completed="Completed",e.Deleted="Deleted",e.Expired="Expired"}(J||(J={})),function(e){e[e.Forward=0]="Forward",e[e.Backward=1]="Backward"}(W||(W={}));var ae,oe,se,ue,le,ce=function(){function e(e){this._restClientFactory=e}return e.prototype.submit=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(n=this._restClientFactory.build(),"string"==typeof e)i={entries:[{inputData:e}]};else if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))r=e.map((function(e){return{inputData:e}})),i={entries:r};else if(e.inputData)i={entries:[e]};else if(Array.isArray(e)&&e.every((function(e){return e.inputData})))i={entries:e};else{if(!e.entries)throw new Error("data type is unsupportd.");i=e}return"boolean"==typeof t&&(t=new re(t)),[4,n.invoke("POST","/email-validations",void 0,i)];case 1:if(200===(a=s.sent()).status||202===a.status)return o=a.data,t&&t.waitForCompletion&&o.overview.status!=J.Completed?[2,this.waitValidationForCompletion(o.overview,t)]:[2,this.retrieveValidationFromPartialValidation(o)];if(404===a.status||410===a.status)return[2,null];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.get=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/email-validations/"+e)];case 1:if(200===(n=r.sent()).status||202===n.status)return i=n.data,"boolean"==typeof t&&(t=new re(t)),t&&t.waitForCompletion&&i.overview.status!=J.Completed?[2,this.waitValidationForCompletion(i.overview,t)]:[2,this.retrieveValidationFromPartialValidation(i)];if(404===n.status||410===n.status)return[2,null];throw new te("Unexpected HTTP response: "+n.status+" "+n.statusText)}}))}))},e.prototype.delete=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return[4,this._restClientFactory.build().invoke("DELETE","/email-validations/"+e)];case 1:if(200===(t=n.sent()).status||410===t.status)return[2];throw new te("Unexpected HTTP response: "+t.status+" "+t.statusText)}}))}))},e.prototype.retrieveValidationFromPartialValidation=function(e){return u(this,void 0,void 0,(function(){var t,n;return l(this,(function(i){switch(i.label){case 0:t=[],n=e.entries,i.label=1;case 1:return n&&n.data?(t.push.apply(t,n.data),n.meta.isTruncated?[4,this.listEntriesSegmentedAsync(e.overview.id,{cursor:n.meta.cursor})]:[3,3]):[3,3];case 2:return n=i.sent(),[3,1];case 3:return[2,{overview:e.overview,entries:t}]}}))}))},e.prototype.listEntriesSegmentedAsync=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(!e)throw new Error("validationId is null");if(!t)throw new Error("cursor is null");return n=this._restClientFactory.build(),i=t.direction===W.Backward?"cursor:prev":"cursor",(o={})[i]=t.cursor,r=o,t.limit>0&&(r.limit=t.limit.toString()),[4,n.invoke("GET","/email-validations/"+e+"/entries",r)];case 1:if(200===(a=s.sent()).status)return[2,a.data];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.waitValidationForCompletion=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("validationOverview is null");if(!t)throw new Error("waitingStrategy is null");n=e,r.label=1;case 1:return t.progress&&t.progress(n),[4,t.waitForNextPoll(n)];case 2:return r.sent(),[4,this.get(e.id)];case 3:if(!(i=r.sent()))return[2,null];if((n=i.overview).status===J.Completed)return[2,i];r.label=4;case 4:return[3,1];case 5:return[2]}}))}))},e}(),de=function(e){function t(t){var n=e.call(this,"All the base URIs are unreachable: "+t.map((function(e){return e})).join(", "))||this;return n.innerErrors=t,n}return o(t,e),t}(te),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),he=function(){function e(){}return e.applicationJson="application/json",e}(),Ae=function(e){function t(){return e.call(this,"The current request has been throttled; please try again later.")||this}return o(t,e),t}(te),me=(new Z).build("verifalia"),ve=function(){function e(e,t,n){if(void 0===n&&(n=void 0),!e)throw new Error("authenticator is null");if(!t||!t.length)throw new Error("baseUris is null or empty");this._authenticator=e,this._userAgent=n,this._baseUris=t}return e.prototype.invoke=function(e,t,n,i,r){return u(this,void 0,void 0,(function(){var a,o,u,c,d,f,p;return l(this,(function(l){switch(l.label){case 0:a=[],o=0,l.label=1;case 1:if(!(o<this._baseUris.length))return[3,7];u=this._baseUris[o],c={method:e,url:""+u+t,params:n,data:i,validateStatus:function(){return!0},maxRedirects:0,headers:{Accept:he.applicationJson}},this._userAgent&&(c.headers["User-Agent"]=this._userAgent),"POST"!==e&&"PUT"!==e||(c=s({},c,{headers:s({},c.headers,{"Content-Type":he.applicationJson})})),c=s({},c,r),d=this._authenticator.addAuthentication(c),me.log("Axios config",d),f=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),[4,X.request(d)];case 3:return f=l.sent(),[3,5];case 4:return p=l.sent(),a.push(p),[3,6];case 5:if(f.status>=500&&f.status<=599)return a.push(new fe("Endpoint "+u+" returned an HTTP "+f.status+" status code.")),[3,6];if(401===f.status||403===f.status)throw new pe(f.statusText);if(429===f.status)throw new Ae;return[2,f];case 6:return o++,[3,1];case 7:throw new de(a)}}))}))},e}(),ge=function(){function e(e){this._restClientFactory=e}return e.prototype.getBalance=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/credits/balance")];case 1:return[2,e.sent().data]}}))}))},e.prototype.listDailyUsages=function(e){return d(this,arguments,(function(){var t,n,i,r,a,o,s,u,d,f;return l(this,(function(l){switch(l.label){case 0:t=this._restClientFactory.build(),n=null,l.label=1;case 1:if(i={},n&&n.meta&&n.meta.cursor)r=e.direction===W.Backward?"cursor:prev":"cursor",i[r]=n.meta.cursor;else if(e.dateFilter)for(a=0,o=e.dateFilter.serialize("date");a<o.length;a++)s=o[a],i[s.key]=s.value;return[4,c(t.invoke("GET","/credits/daily-usage",i))];case 2:u=l.sent(),n=u.data,d=0,f=n.data,l.label=3;case 3:return d<f.length?[4,c(f[d])]:[3,7];case 4:return[4,l.sent()];case 5:l.sent(),l.label=6;case 6:return d++,[3,3];case 7:if((n.meta||{}).isTruncated)return[3,1];l.label=8;case 8:return[2]}}))}))},e}(),ye=function(){function e(e){if(this.apiVersion="v2.0",this.credits=new ge(this),this.emailValidations=new ce(this),this._baseUris=["https://api-1.verifalia.com","https://api-2.verifalia.com","https://api-3.verifalia.com"],!e)throw new Error("config is null");if(!e.username)throw new Error("username is null");this._authenticator=new ee(e.username,e.password)}return e.prototype.build=function(){var e,t=this;if(!this._cachedRestClient){for(var n=this._baseUris.slice(),i=n.length-1;i>0;i--){var r=Math.floor(Math.random()*(i+1));e=[n[r],n[i]],n[i]=e[0],n[r]=e[1]}this._cachedRestClient=new ve(this._authenticator,n.map((function(e){return e+"/"+t.apiVersion})),this.getUserAgent())}return this._cachedRestClient},e.prototype.getUserAgent=function(){if("undefined"!=typeof process&&process.versions&&process.versions.node)return"verifalia-rest-client/js/2.3.0/node/"+process.platform+"/"+process.version},e}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}((function(){}));function Ee(e){var t=""+(e.getMonth()+1),n=""+e.getDate();return[e.getFullYear(),t.length<2?"0"+t:t,n.length<2?"0"+n:n].join("-")}(function(e){function t(t){var n=e.call(this)||this;return n.date=t,n}o(t,e),t.prototype.serialize=function(e){return[{key:e,value:""+Ee(this.date)}]}})(we),function(e){function t(t,n){var i=e.call(this)||this;return i.since=t,i.until=n,i}o(t,e),t.prototype.serialize=function(e){var t=[];return this.since&&t.push({key:e+":since",value:Ee(this.since)}),this.until&&t.push({key:e+":until",value:Ee(this.until)}),t}}(we),function(e){e.Off="Off",e.Safe="Safe"}(ae||(ae={})),function(e){e.Standard="Standard",e.High="High",e.Extreme="Extreme"}(oe||(oe={})),function(e){e[e.Lowest=0]="Lowest",e[e.Normal=127]="Normal",e[e.Highest=255]="Highest"}(se||(se={})),function(e){e.Deliverable="Deliverable",e.Risky="Risky",e.Undeliverable="Undeliverable",e.Unknown="Unknown"}(ue||(ue={})),function(e){e.Success="Success",e.UnmatchedQuotedPair="UnmatchedQuotedPair",e.UnexpectedQuotedPairSequence="UnexpectedQuotedPairSequence",e.InvalidWordBoundaryStart="InvalidWordBoundaryStart",e.InvalidCharacterInSequence="InvalidCharacterInSequence",e.UnbalancedCommentParenthesis="UnbalancedCommentParenthesis",e.DoubleDotSequence="DoubleDotSequence",e.InvalidLocalPartLength="InvalidLocalPartLength",e.InvalidFoldingWhiteSpaceSequence="InvalidFoldingWhiteSpaceSequence",e.AtSignNotFound="AtSignNotFound",e.InvalidEmptyQuotedWord="InvalidEmptyQuotedWord",e.InvalidAddressLength="InvalidAddressLength",e.DomainPartCompliancyFailure="DomainPartCompliancyFailure",e.IspSpecificSyntaxFailure="IspSpecificSyntaxFailure",e.LocalPartIsWellKnownRoleAccount="LocalPartIsWellKnownRoleAccount,",e.DnsQueryTimeout="DnsQueryTimeout",e.DnsConnectionFailure="DnsConnectionFailure",e.DomainDoesNotExist="DomainDoesNotExist",e.DomainIsMisconfigured="DomainIsMisconfigured",e.DomainIsWellKnownDea="DomainIsWellKnownDea",e.MailExchangerIsWellKnownDea="MailExchangerIsWellKnownDea",e.MailboxIsDea="MailboxIsDea",e.SmtpConnectionTimeout="SmtpConnectionTimeout",e.SmtpConnectionFailure="SmtpConnectionFailure",e.MailboxDoesNotExist="MailboxDoesNotExist",e.MailboxConnectionFailure="MailboxConnectionFailure",e.LocalSenderAddressRejected="LocalSenderAddressRejected",e.MailboxValidationTimeout="MailboxValidationTimeout",e.MailboxTemporarilyUnavailable="MailboxTemporarilyUnavailable",e.ServerDoesNotSupportInternationalMailboxes="ServerDoesNotSupportInternationalMailboxes",e.CatchAllValidationTimeout="CatchAllValidationTimeout",e.ServerIsCatchAll="ServerIsCatchAll",e.CatchAllConnectionFailure="CatchAllConnectionFailure",e.ServerTemporaryUnavailable="ServerTemporaryUnavailable",e.SmtpDialogError="SmtpDialogError",e.LocalEndPointRejected="LocalEndPointRejected",e.UnhandledException="UnhandledException",e.MailExchangerIsHoneypot="MailExchangerIsHoneypot",e.UnacceptableDomainLiteral="UnacceptableDomainLiteral",e.Duplicate="Duplicate"}(le||(le={}));var be,Ce=(new Z).build("verifalia");X.interceptors.request.use((function(e){return Ce.log("invoking URL",e.url),Ce.log("params",e.params),Ce.log("data",e.data),Ce.log("headers",e.headers),e}),(function(e){return Promise.reject(e)})),function(e){e[e.allowed=0]="allowed",e[e.notAllowed=1]="notAllowed",e[e.throttled=2]="throttled",e[e.exception=3]="exception",e[e.cancelled=4]="cancelled"}(be||(be={}));var Se,Be=function(){function e(){this._strategyElementKey="Verifalia-Strategy",this._resultElementKey="Verifalia-Result"}return e.prototype.getElementCacheItem=function(e,t){return e[t]},e.prototype.setElementCacheItem=function(e,t,n){n?e[t]=n:delete e[t]},e.prototype.getValidationResult=function(e){return this.getElementCacheItem(e,this._resultElementKey)},e.prototype.clearValidationResult=function(e){this.setElementCacheItem(e,this._resultElementKey,void 0)},e.prototype.isValidationPending=function(e){return!!this.getElementCacheItem(e,this._strategyElementKey)},e.prototype.cancelPendingValidation=function(e){var t=this.getElementCacheItem(e,this._strategyElementKey);return!!t&&(t.cancel(),this.setElementCacheItem(e,this._strategyElementKey,void 0),!0)},e.prototype.validate=function(e,t){return u(this,void 0,void 0,(function(){var n,r,a,o,s,u;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,3,4]),this.cancelPendingValidation(e),this.setElementCacheItem(e,this._resultElementKey,void 0),n=new ye({username:t.appKey,password:""}),r=e.value,e.dispatchEvent(new CustomEvent(i.FieldValidationStarted)),a=new re(!0,null),this.setElementCacheItem(e,this._strategyElementKey,a),[4,n.emailValidations.submit(r,a)];case 1:return o=l.sent(),u={validation:o,status:this.isValidationResultAllowed(o.entries[0],t)?be.allowed:be.notAllowed},e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted,{detail:u})),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 2:return s=l.sent(),u={},s instanceof Ae?u.status=be.throttled:s instanceof ne?u.status=be.cancelled:(s instanceof pe&&console.error("The configured Verifalia appkey appears to be invalid: please check your configuration.",s),u.status=be.exception),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 3:return this.setElementCacheItem(e,this._strategyElementKey,void 0),e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted)),[7];case 4:return[2]}}))}))},e.prototype.isValidationResultAllowed=function(e,t){var n,i=t.emailValidations.allow||"";n=Array.isArray(i)?i:i.split(",").map((function(e){return e.trim().toUpperCase()}));var r,a=t.emailValidations.block||"";r=Array.isArray(a)?a:a.split(",").map((function(e){return e.trim().toUpperCase()}));var o=!1;return n.indexOf(e.classification.toUpperCase())>-1&&(o=o||!0),n.indexOf(("status:"+e.status).toUpperCase())>-1&&(o=o||!0),e.isFreeEmailAddress&&n.indexOf("@FREE")>-1&&(o=o||!0),e.isDisposableEmailAddress&&n.indexOf("@DISPOSABLE")>-1&&(o=o||!0),e.isRoleAccount&&n.indexOf("@ROLE")>-1&&(o=o||!0),!(!o||r.indexOf(e.classification.toUpperCase())>-1||r.indexOf(("status:"+e.status).toUpperCase())>-1||e.isFreeEmailAddress&&r.indexOf("@FREE")>-1||e.isDisposableEmailAddress&&r.indexOf("@DISPOSABLE")>-1||e.isRoleAccount&&r.indexOf("@ROLE")>-1)},e}();!function(e){e[e.NotSet=0]="NotSet",e[e.Validating=1]="Validating",e[e.ResultValid=2]="ResultValid",e[e.ResultInvalid=3]="ResultInvalid",e[e.ResultThrottled=4]="ResultThrottled",e[e.ResultException=5]="ResultException"}(Se||(Se={}));var xe=function(){function t(e,t,n,i){this._status=Se.NotSet,this._form=e,this._element=t,this._configurationManager=n,this._configuration=n.getConfiguration(t),this._validator=i}return t.prototype.getStatus=function(){return this._status},t.prototype.setStatus=function(e){this.applyTransition(this._status,e),this._status=e},t.prototype.wireup=function(){var e=this;this._element;var t=0;this._configuration.inputBindings&&this._configuration.inputBindings.debounceTime&&(t=this._configuration.inputBindings.debounceTime);var n,i,r,a=(n=function(){e._element,e.onElementOrFormEvent(e._element)},void 0===(i=t)&&(i=0),function(){clearTimeout(r),r=setTimeout((function(){return n()}),i)});if(this._element.addEventListener("input",(function(t){e._element,e.resetValidationResult(e._element),e.setValidityPending(e._element,!1),a()})),this._configuration.inputBindings&&this._configuration.inputBindings.preventSubmission){var o=this._element.closest("FORM");o&&o.addEventListener("submit",(function(t){return e.onElementOrFormEvent(e._element,o,t)}))}this.setStatus(Se.NotSet),this._configuration.inputBindings&&this._configuration.inputBindings.classNames&&this._configuration.inputBindings.classNames.base&&this._element.classList.add(this._configuration.inputBindings.classNames.base)},t.prototype.resetValidationResult=function(e){this._validator.clearValidationResult(e),e.name&&(this.removeElementById(e.name+"-verifalia-id"),this.removeElementById(e.name+"-verifalia-classification"),this.removeElementById(e.name+"-verifalia-status"))},t.prototype.removeElementById=function(e){var t=document.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype.onElementOrFormEvent=function(t,n,r){return u(this,void 0,void 0,(function(){var a,o,s,u=this;return l(this,(function(l){switch(l.label){case 0:return this._resetTransientValidityTimeout&&clearTimeout(this._resetTransientValidityTimeout),(a=this._validator.getValidationResult(t))?a.status===be.allowed||a.status===be.throttled&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)||a.status===be.exception&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(""),[2]):[3,4]:[3,1];case 1:return n&&r&&(this.setValidityPending(t,!0),n.reportValidity(),r.preventDefault()),t.addEventListener(i.FieldValidationCompleted,(function(e){return u.onFieldValidationCompleted(e)})),this.setStatus(Se.Validating),this._validator.isValidationPending(t)?[3,3]:[4,this._validator.validate(t,this._configuration)];case 2:switch((o=l.sent()).status){case be.throttled:this.setStatus(Se.ResultThrottled),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)?(t.setCustomValidity(this._configuration.emailValidations.messages.throttled),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),1e4)):t.setCustomValidity("");break;case be.cancelled:this.setStatus(Se.NotSet);break;case be.exception:this.setStatus(Se.ResultException),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(this._configuration.emailValidations.messages.exception),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),5e3)):t.setCustomValidity("");break;case be.allowed:case be.notAllowed:this._configuration.inputBindings&&this._configuration.inputBindings.appendHiddenFields&&t.name&&(this.appendOrReplaceHiddenField(t.name+"-verifalia-id",o.validation.overview.id,t),s=o.validation.entries[0],this.appendOrReplaceHiddenField(t.name+"-verifalia-classification",""+s.classification,t),this.appendOrReplaceHiddenField(t.name+"-verifalia-status",""+s.status,t)),o.status===be.allowed?(t.setCustomValidity(""),this.setStatus(Se.ResultValid)):(t.setCustomValidity(this._configuration.emailValidations.messages.invalid),this.setStatus(Se.ResultInvalid))}return[3,4];case 3:l.label=4;case 4:return n&&r&&(n.reportValidity(),r.preventDefault()),t.focus(),[2]}}))}))},t.prototype.setValidityPending=function(e,t){e.setCustomValidity(this._configuration.emailValidations.messages.processing),t&&this._form.reportValidity(),e.focus()},t.prototype.onFieldValidationCompleted=function(e){var t=this,n=e.target;e.detail,n.removeEventListener(i.FieldValidationCompleted,(function(e){return t.onFieldValidationCompleted(e)})),this._form.reportValidity()},t.prototype.appendOrReplaceHiddenField=function(e,t,n){var i=document.getElementById(e);i||((i=document.createElement("input")).type="hidden",i.id=e,i.name=e,n.insertAdjacentElement("afterend",i)),i.value=t},t.prototype.applyTransition=function(e,t){if(this._configuration.inputBindings&&this._configuration.inputBindings.classNames){var n=this._element.classList;switch(n.remove(this._configuration.inputBindings.classNames.processing,this._configuration.inputBindings.classNames.valid,this._configuration.inputBindings.classNames.invalid,this._configuration.inputBindings.classNames.exception,this._configuration.inputBindings.classNames.throttled),t){case Se.Validating:n.add(this._configuration.inputBindings.classNames.processing);break;case Se.ResultValid:n.add(this._configuration.inputBindings.classNames.valid);break;case Se.ResultInvalid:n.add(this._configuration.inputBindings.classNames.invalid);break;case Se.ResultException:n.add(this._configuration.inputBindings.classNames.exception);break;case Se.ResultThrottled:n.add(this._configuration.inputBindings.classNames.throttled)}}},t}(),Fe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element},t}(xe);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var Ie=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},Te=function(){function e(e,t){this.configurationManager=e,this.validator=t,this.fields=[]}return e.prototype.wireupFields=function(){for(var e=document.evaluate('//*/input[@type="email"] | //*/input[contains(@name, "email")] | //*/input[@*[starts-with(name(), "data-verifalia")]]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),t=0;t<e.snapshotLength;t++){var n=e.snapshotItem(t);this.wireupField(n)}},e.prototype.wireupField=function(e){if("INPUT"!==e.tagName.toUpperCase()&&"TEXTAREA"!==e.tagName.toUpperCase())throw new Ie("unsupported element "+e.tagName);var t=this.configurationManager.getConfiguration(e);if(t.appKey){t.appKey;var n=e.closest("FORM");if(!n)return;var i=this.buildField(n,e,this.configurationManager);i.wireup(),this.fields.push(i)}else console.error("An appkey couldn't be found while loading Verifalia: please check your configuration.")},e.prototype.buildField=function(e,t,n){return new xe(e,t,n,this.validator)},e}(),_e=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $&&$.validator&&$.validator.methods&&$.validator.methods.email){var a=r.validator,o=r.configurationManager;$.validator.methods.email=function(t,n,i,r){var s=this;if(this.optional(n))return"dependency-mismatch";var u,l=this.previousValue(n,"email");if(this.settings.messages[n.name]||(this.settings.messages[n.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[n.name].email,this.settings.messages[n.name].email=l.message,i="string"==typeof i&&{url:i}||i,u=$.param($.extend({data:t},i.data)),l.old===u)return l.valid;l.old=u,this.startRequest(n),{}[n.name]=t;var c=o.getConfiguration(n);return a.validate(n,c).then((function(i){s.settings.messages[n.name].email=l.originalMessage;var r=i&&i.status===be.allowed;if(r=(r=r||i.status===be.throttled&&!o.shouldPreventFormSubmissionOn(c,e.throttled))||i.status===be.exception&&!o.shouldPreventFormSubmissionOn(c,e.exception)){var a=s.formSubmitted;s.resetInternals(),s.toHide=s.errorsFor(n),s.formSubmitted=a,s.successList.push(n),s.invalid[n.name]=!1,s.showErrors(),l.valid=!0,s.stopRequest(n,!0)}else{var u={},d=void 0;switch(i.status){case be.throttled:d=c.emailValidations.messages.throttled;break;case be.exception:d=c.emailValidations.messages.exception;break;default:d=s.defaultMessage(n,{method:"email",parameters:t})}u[n.name]=l.message=d,s.invalid[n.name]=!0,s.showErrors(u),l.valid=!1,s.stopRequest(n,!1),i.status!==be.throttled&&i.status!==be.exception||setTimeout((function(){l.old=void 0}),5e3)}})),"pending"}}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Fe(e,t,n,this.validator)},n}(Te),Re="verifalia-email",Ve=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element,$(this._element).parsley().addConstraint(Re)},t}(xe),Ue=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $){var a=window.Parsley;$.Deferred&&a&&a.addValidator&&a.addValidator(Re,{validateString:function(t,r,a){var o=a.element,s=n.getConfiguration(o),u=new $.Deferred;return i.validate(o,s).then((function(t){switch(t.status){case be.exception:n.shouldPreventFormSubmissionOn(s,e.exception)?u.reject(s.emailValidations.messages.exception):u.resolve();break;case be.cancelled:u.reject();break;case be.allowed:u.resolve();break;case be.notAllowed:u.reject(s.emailValidations.messages.invalid);break;case be.throttled:n.shouldPreventFormSubmissionOn(s,e.throttled)?u.reject(s.emailValidations.messages.throttled):u.resolve()}})),u.promise()}})}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Ve(e,t,n,this.validator)},n}(Te),ke=function(){function e(){}return e.prototype.buildHost=function(e,t){if("undefined"!=typeof $){if($,window.Parsley)return window.Parsley,new Ue(e,t);if($.validator&&$.validator.methods&&$.validator.methods.email)return $.validator,new _e(e,t)}return new Te(e,t)},e}();return function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".verifalia-field::-ms-clear{display:none}.verifalia-field.verifalia-field-processing{background-image:url(\"data:image/gif;base64,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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-valid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\")}.verifalia-field.verifalia-field-invalid,.verifalia-field.verifalia-field-valid{background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-invalid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E\")}"),new function(){this.version="1.1.0";var e=new Be,t=window.VerifaliaWidgetConfig,n=new r(t);if(document.dispatchEvent(new CustomEvent(i.Initializing,{cancelable:!0}))){var a=(new ke).buildHost(n,e),o=n.getConfiguration(document.body);o.inputBindings&&o.inputBindings.autoWireup&&a.wireupFields(),document.dispatchEvent(new CustomEvent(i.Initialized))}}}(); | ||
var VerifaliaWidget=function(){"use strict";var e,t="verifalia-cached-configuration";function n(e,t){var i=function(e){return e&&"object"==typeof e};return i(e)&&i(t)?(Object.keys(t).forEach((function(r){var a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)?e[r]=a.concat(o):i(a)&&i(o)?e[r]=n(Object.assign({},a),o):e[r]=o})),e):t}!function(e){e.throttled="throttled",e.invalid="invalid",e.exception="exception"}(e||(e={}));var i,r=function(){function e(e){this._globalConfiguration=e}return e.prototype.getConfiguration=function(e){return e?(e[t]||(e[t]=this.readConfiguration(e)),e[t]):this.readConfiguration()},e.prototype.shouldPreventFormSubmissionOn=function(e,t){if(e.inputBindings){var n=e.inputBindings.preventSubmission||"",i=void 0;return i=Array.isArray(n)?n.map((function(e){return e.trim().toUpperCase()})):n.split(",").map((function(e){return e.trim().toUpperCase()})),e.inputBindings.preventSubmission,i.indexOf(t.toUpperCase())>0}return!1},e.prototype.readConfiguration=function(e){var t=this,i=n(n({},{inputBindings:{autoWireup:!0,preventSubmission:"invalid, throttled",appendHiddenFields:!0,events:"change",debounceTime:500,classNames:{base:"verifalia-field",processing:"verifalia-field-processing",valid:"verifalia-field-valid",invalid:"verifalia-field-invalid",throttled:"verifalia-field-throttled",exception:"verifalia-field-exception"}},emailValidations:{allow:"deliverable, risky, unknown",block:"@disposable",messages:{processing:"Please hold on for a second, until we verify this email address...",invalid:"Please enter a valid email address.",throttled:"Too many attempts, please try again later.",exception:"An error has occurred while verifying this email address. Please try again later."}}}),this._globalConfiguration||{});return this._globalConfiguration,e&&(this.applyConfigurationItem(e,"appKey",(function(e){return i.appKey=e})),this.applyConfigurationItem(e,"inputBindings-autoWireup",(function(e){return i.inputBindings.autoWireup=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-appendHiddenFields",(function(e){return i.inputBindings.appendHiddenFields=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-debounceTime",(function(e){return i.inputBindings.debounceTime=parseInt(e)}))),i},e.prototype.toBoolean=function(e){return"true"===e},e.prototype.applyConfigurationItem=function(e,t,n){var i=this.readConfigurationItemRecursive(e,t);void 0!==i&&n(i)},e.prototype.readConfigurationItemRecursive=function(e,t){var n="data-verifalia-"+t,i=e.getAttribute(n);if(i)return i;var r=e.parentElement;return r?this.readConfigurationItemRecursive(r,t):void 0},e}();!function(e){e.Initializing="verifalia-widget:initializing",e.Initialized="verifalia-widget:initialized",e.FieldValidationStarted="verifalia-widget:field-validation-started",e.FieldValidationCompleted="verifalia-widget:field-validation-completed"}(i||(i={})); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function u(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(o,s)}u((i=i.apply(e,t||[])).next())}))}function l(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){a.push([e,t,n,i])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof c?Promise.resolve(n.value.v).then(u,l):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var f=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}},p=Object.prototype.toString;function h(e){return"[object Array]"===p.call(e)}function A(e){return void 0===e}function m(e){return null!==e&&"object"==typeof e}function v(e){return"[object Function]"===p.call(e)}function g(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),h(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var y={isArray:h,isArrayBuffer:function(e){return"[object ArrayBuffer]"===p.call(e)},isBuffer:function(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:m,isUndefined:A,isDate:function(e){return"[object Date]"===p.call(e)},isFile:function(e){return"[object File]"===p.call(e)},isBlob:function(e){return"[object Blob]"===p.call(e)},isFunction:v,isStream:function(e){return m(e)&&v(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:g,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},extend:function(e,t,n){return g(t,(function(t,i){e[i]=n&&"function"==typeof t?f(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function w(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var E=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(y.isURLSearchParams(t))i=t.toString();else{var r=[];y.forEach(t,(function(e,t){null!=e&&(y.isArray(e)?t+="[]":e=[e],y.forEach(e,(function(e){y.isDate(e)?e=e.toISOString():y.isObject(e)&&(e=JSON.stringify(e)),r.push(w(t)+"="+w(e))})))})),i=r.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function b(){this.handlers=[]}b.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},b.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},b.prototype.forEach=function(e){y.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var C=b,S=function(e,t,n){return y.forEach(n,(function(n){e=n(e,t)})),e},B=function(e){return!(!e||!e.__CANCEL__)},x=function(e,t){y.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))},F=function(e,t,n,i,r){return function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,i,r)},I=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],T=y.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=y.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},_=y.isStandardBrowserEnv()?{write:function(e,t,n,i,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(i)&&o.push("path="+i),y.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},R={"Content-Type":"application/x-www-form-urlencoded"};function V(e,t){!y.isUndefined(e)&&y.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var U,k={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(U=function(e){return new Promise((function(t,n){var i=e.data,r=e.headers;y.isFormData(i)&&delete r["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",s=e.auth.password||"";r.Authorization="Basic "+btoa(o+":"+s)}var u,l,c=(u=e.baseURL,l=e.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(l)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(u,l):l);if(a.open(e.method.toUpperCase(),E(c,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var i,r,o,s,u,l="getAllResponseHeaders"in a?(i=a.getAllResponseHeaders(),u={},i?(y.forEach(i.split("\n"),(function(e){if(s=e.indexOf(":"),r=y.trim(e.substr(0,s)).toLowerCase(),o=y.trim(e.substr(s+1)),r){if(u[r]&&I.indexOf(r)>=0)return;u[r]="set-cookie"===r?(u[r]?u[r]:[]).concat([o]):u[r]?u[r]+", "+o:o}})),u):u):null,c={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:l,config:e,request:a};!function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(F("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,c),a=null}},a.onabort=function(){a&&(n(F("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(F("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(F(t,e,"ECONNABORTED",a)),a=null},y.isStandardBrowserEnv()){var d=_,f=(e.withCredentials||T(c))&&e.xsrfCookieName?d.read(e.xsrfCookieName):void 0;f&&(r[e.xsrfHeaderName]=f)}if("setRequestHeader"in a&&y.forEach(r,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete r[t]:a.setRequestHeader(t,e)})),y.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){a&&(a.abort(),n(e),a=null)})),void 0===i&&(i=null),a.send(i)}))}),U),transformRequest:[function(e,t){return x(t,"Accept"),x(t,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)?e:y.isArrayBufferView(e)?e.buffer:y.isURLSearchParams(e)?(V(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)?(V(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],(function(e){k.headers[e]={}})),y.forEach(["post","put","patch"],(function(e){k.headers[e]=y.merge(R)}));var P=k;function D(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var O=function(e){return D(e),e.headers=e.headers||{},e.data=S(e.data,e.headers,e.transformRequest),e.headers=y.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),y.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||P.adapter)(e).then((function(t){return D(e),t.data=S(t.data,t.headers,e.transformResponse),t}),(function(t){return B(t)||(D(e),t&&t.response&&(t.response.data=S(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Q=function(e,t){t=t||{};var n={},i=["url","method","params","data"],r=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];y.forEach(i,(function(e){void 0!==t[e]&&(n[e]=t[e])})),y.forEach(r,(function(i){y.isObject(t[i])?n[i]=y.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:y.isObject(e[i])?n[i]=y.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),y.forEach(a,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var o=i.concat(r).concat(a),s=Object.keys(t).filter((function(e){return-1===o.indexOf(e)}));return y.forEach(s,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n};function N(e){this.defaults=e,this.interceptors={request:new C,response:new C}}N.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Q(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[O,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},N.prototype.getUri=function(e){return e=Q(this.defaults,e),E(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},y.forEach(["delete","get","head","options"],(function(e){N.prototype[e]=function(t,n){return this.request(y.merge(n||{},{method:e,url:t}))}})),y.forEach(["post","put","patch"],(function(e){N.prototype[e]=function(t,n,i){return this.request(y.merge(i||{},{method:e,url:t,data:n}))}}));var L=N;function M(e){this.message=e}M.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},M.prototype.__CANCEL__=!0;var j=M;function q(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new j(e),t(n.reason))}))}q.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},q.source=function(){var e;return{token:new q((function(t){e=t})),cancel:e}};var H=q;function K(e){var t=new L(e),n=f(L.prototype.request,t);return y.extend(n,L.prototype,t),y.extend(n,t),n}var z=K(P);z.Axios=L,z.create=function(e){return K(Q(z.defaults,e))},z.Cancel=j,z.CancelToken=H,z.isCancel=B,z.all=function(e){return Promise.all(e)},z.spread=function(e){return function(t){return e.apply(null,t)}};var Y=z,G=z;Y.default=G;var J,W,X=Y,Z=function(){function e(){}return e.prototype.build=function(e){return{log:function(){}}},e}(),ee=function(){function e(e,t){if(!e&&0===e.length)throw Error("username is null or empty: please visit https://verifalia.com/client-area to set up a new user, if you don't have one.");this._username=e,this._password=t}return e.prototype.addAuthentication=function(e){return s(s({},e),{auth:{username:this._username,password:this._password}})},e}(),te=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),ie=(new Z).build("verifalia"),re=function(){function e(e,t){void 0===t&&(t=null),this.isCancellationRequested=!1,this.waitForCompletion=e,this.progress=t}return e.prototype.waitForNextPoll=function(e){return u(this,void 0,void 0,(function(){var t,n,i,r,a;return l(this,(function(o){if(this.isCancellationRequested)throw new ne;return t=Math.max(.5,Math.min(30,Math.pow(2,Math.log10(e.noOfEntries)-1))),e.progress&&e.progress.estimatedTimeRemaining&&(n=e.progress.estimatedTimeRemaining.match(/^(?:(\d*?)\.)?(\d{2})\:(\d{2})\:(\d{2})(?:\.(\d*?))?$/))&&(i=parseInt(n[2]),r=parseInt(n[3]),a=parseInt(n[4]),t=a,t+=60*r,t+=3600*i,t=Math.max(.5,Math.min(30,t))),ie.log("waitForNextPoll delay (seconds)",t),[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},e.prototype.cancel=function(){this.isCancellationRequested=!0},e}();!function(e){e[e.Unknown=0]="Unknown",e.InProgress="InProgress",e.Completed="Completed",e.Deleted="Deleted",e.Expired="Expired"}(J||(J={})),function(e){e[e.Forward=0]="Forward",e[e.Backward=1]="Backward"}(W||(W={}));var ae,oe,se,ue,le,ce=function(){function e(e){this._restClientFactory=e}return e.prototype.submit=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(n=this._restClientFactory.build(),"string"==typeof e)i={entries:[{inputData:e}]};else if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))r=e.map((function(e){return{inputData:e}})),i={entries:r};else if(e.inputData)i={entries:[e]};else if(Array.isArray(e)&&e.every((function(e){return e.inputData})))i={entries:e};else{if(!e.entries)throw new Error("data type is unsupportd.");i=e}return"boolean"==typeof t&&(t=new re(t)),[4,n.invoke("POST","/email-validations",void 0,i)];case 1:if(200===(a=s.sent()).status||202===a.status)return o=a.data,t&&t.waitForCompletion&&o.overview.status!=J.Completed?[2,this.waitValidationForCompletion(o.overview,t)]:[2,this.retrieveValidationFromPartialValidation(o)];if(404===a.status||410===a.status)return[2,null];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.get=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/email-validations/"+e)];case 1:if(200===(n=r.sent()).status||202===n.status)return i=n.data,"boolean"==typeof t&&(t=new re(t)),t&&t.waitForCompletion&&i.overview.status!=J.Completed?[2,this.waitValidationForCompletion(i.overview,t)]:[2,this.retrieveValidationFromPartialValidation(i)];if(404===n.status||410===n.status)return[2,null];throw new te("Unexpected HTTP response: "+n.status+" "+n.statusText)}}))}))},e.prototype.delete=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return[4,this._restClientFactory.build().invoke("DELETE","/email-validations/"+e)];case 1:if(200===(t=n.sent()).status||410===t.status)return[2];throw new te("Unexpected HTTP response: "+t.status+" "+t.statusText)}}))}))},e.prototype.retrieveValidationFromPartialValidation=function(e){return u(this,void 0,void 0,(function(){var t,n;return l(this,(function(i){switch(i.label){case 0:t=[],n=e.entries,i.label=1;case 1:return n&&n.data?(t.push.apply(t,n.data),n.meta.isTruncated?[4,this.listEntriesSegmentedAsync(e.overview.id,{cursor:n.meta.cursor})]:[3,3]):[3,3];case 2:return n=i.sent(),[3,1];case 3:return[2,{overview:e.overview,entries:t}]}}))}))},e.prototype.listEntriesSegmentedAsync=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(!e)throw new Error("validationId is null");if(!t)throw new Error("cursor is null");return n=this._restClientFactory.build(),i=t.direction===W.Backward?"cursor:prev":"cursor",(o={})[i]=t.cursor,r=o,t.limit>0&&(r.limit=t.limit.toString()),[4,n.invoke("GET","/email-validations/"+e+"/entries",r)];case 1:if(200===(a=s.sent()).status)return[2,a.data];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.waitValidationForCompletion=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("validationOverview is null");if(!t)throw new Error("waitingStrategy is null");n=e,r.label=1;case 1:return t.progress&&t.progress(n),[4,t.waitForNextPoll(n)];case 2:return r.sent(),[4,this.get(e.id)];case 3:if(!(i=r.sent()))return[2,null];if((n=i.overview).status===J.Completed)return[2,i];r.label=4;case 4:return[3,1];case 5:return[2]}}))}))},e}(),de=function(e){function t(t){var n=e.call(this,"All the base URIs are unreachable: "+t.map((function(e){return e})).join(", "))||this;return n.innerErrors=t,n}return o(t,e),t}(te),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),he=function(){function e(){}return e.applicationJson="application/json",e}(),Ae=function(e){function t(){return e.call(this,"The current request has been throttled; please try again later.")||this}return o(t,e),t}(te),me=(new Z).build("verifalia"),ve=function(){function e(e,t,n){if(void 0===n&&(n=void 0),!e)throw new Error("authenticator is null");if(!t||!t.length)throw new Error("baseUris is null or empty");this._authenticator=e,this._userAgent=n,this._baseUris=t}return e.prototype.invoke=function(e,t,n,i,r){return u(this,void 0,void 0,(function(){var a,o,u,c,d,f,p;return l(this,(function(l){switch(l.label){case 0:a=[],o=0,l.label=1;case 1:if(!(o<this._baseUris.length))return[3,7];u=this._baseUris[o],c={method:e,url:""+u+t,params:n,data:i,validateStatus:function(){return!0},maxRedirects:0,headers:{Accept:he.applicationJson}},this._userAgent&&(c.headers["User-Agent"]=this._userAgent),"POST"!==e&&"PUT"!==e||(c=s(s({},c),{headers:s(s({},c.headers),{"Content-Type":he.applicationJson})})),c=s(s({},c),r),d=this._authenticator.addAuthentication(c),me.log("Axios config",d),f=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),[4,X.request(d)];case 3:return f=l.sent(),[3,5];case 4:return p=l.sent(),a.push(p),[3,6];case 5:if(f.status>=500&&f.status<=599)return a.push(new fe("Endpoint "+u+" returned an HTTP "+f.status+" status code.")),[3,6];if(401===f.status||403===f.status)throw new pe(f.statusText);if(429===f.status)throw new Ae;return[2,f];case 6:return o++,[3,1];case 7:throw new de(a)}}))}))},e}(),ge=function(){function e(e){this._restClientFactory=e}return e.prototype.getBalance=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/credits/balance")];case 1:return[2,e.sent().data]}}))}))},e.prototype.listDailyUsages=function(e){return d(this,arguments,(function(){var t,n,i,r,a,o,s,u,d,f;return l(this,(function(l){switch(l.label){case 0:t=this._restClientFactory.build(),n=null,l.label=1;case 1:if(i={},n&&n.meta&&n.meta.cursor)r=e.direction===W.Backward?"cursor:prev":"cursor",i[r]=n.meta.cursor;else if(e.dateFilter)for(a=0,o=e.dateFilter.serialize("date");a<o.length;a++)s=o[a],i[s.key]=s.value;return[4,c(t.invoke("GET","/credits/daily-usage",i))];case 2:u=l.sent(),n=u.data,d=0,f=n.data,l.label=3;case 3:return d<f.length?[4,c(f[d])]:[3,7];case 4:return[4,l.sent()];case 5:l.sent(),l.label=6;case 6:return d++,[3,3];case 7:if((n.meta||{}).isTruncated)return[3,1];l.label=8;case 8:return[2]}}))}))},e}(),ye=function(){function e(e){if(this.apiVersion="v2.1",this.credits=new ge(this),this.emailValidations=new ce(this),this._baseUris=["https://api-1.verifalia.com","https://api-2.verifalia.com","https://api-3.verifalia.com"],!e)throw new Error("config is null");if(!e.username)throw new Error("username is null");this._authenticator=new ee(e.username,e.password)}return e.prototype.build=function(){var e,t=this;if(!this._cachedRestClient){for(var n=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}(this._baseUris),i=n.length-1;i>0;i--){var r=Math.floor(Math.random()*(i+1));e=[n[r],n[i]],n[i]=e[0],n[r]=e[1]}this._cachedRestClient=new ve(this._authenticator,n.map((function(e){return e+"/"+t.apiVersion})),this.getUserAgent())}return this._cachedRestClient},e.prototype.getUserAgent=function(){if("undefined"!=typeof process&&process.versions&&process.versions.node)return"verifalia-rest-client/js/2.4.0/node/"+process.platform+"/"+process.version},e}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}((function(){}));function Ee(e){var t=""+(e.getMonth()+1),n=""+e.getDate();return[e.getFullYear(),t.length<2?"0"+t:t,n.length<2?"0"+n:n].join("-")}(function(e){function t(t){var n=e.call(this)||this;return n.date=t,n}o(t,e),t.prototype.serialize=function(e){return[{key:e,value:""+Ee(this.date)}]}})(we),function(e){function t(t,n){var i=e.call(this)||this;return i.since=t,i.until=n,i}o(t,e),t.prototype.serialize=function(e){var t=[];return this.since&&t.push({key:e+":since",value:Ee(this.since)}),this.until&&t.push({key:e+":until",value:Ee(this.until)}),t}}(we),function(e){e.Off="Off",e.Safe="Safe",e.Relaxed="Relaxed"}(ae||(ae={})),function(e){e.Standard="Standard",e.High="High",e.Extreme="Extreme"}(oe||(oe={})),function(e){e[e.Lowest=0]="Lowest",e[e.Normal=127]="Normal",e[e.Highest=255]="Highest"}(se||(se={})),function(e){e.Deliverable="Deliverable",e.Risky="Risky",e.Undeliverable="Undeliverable",e.Unknown="Unknown"}(ue||(ue={})),function(e){e.Success="Success",e.UnmatchedQuotedPair="UnmatchedQuotedPair",e.UnexpectedQuotedPairSequence="UnexpectedQuotedPairSequence",e.InvalidWordBoundaryStart="InvalidWordBoundaryStart",e.InvalidCharacterInSequence="InvalidCharacterInSequence",e.UnbalancedCommentParenthesis="UnbalancedCommentParenthesis",e.DoubleDotSequence="DoubleDotSequence",e.InvalidLocalPartLength="InvalidLocalPartLength",e.InvalidFoldingWhiteSpaceSequence="InvalidFoldingWhiteSpaceSequence",e.AtSignNotFound="AtSignNotFound",e.InvalidEmptyQuotedWord="InvalidEmptyQuotedWord",e.InvalidAddressLength="InvalidAddressLength",e.DomainPartCompliancyFailure="DomainPartCompliancyFailure",e.IspSpecificSyntaxFailure="IspSpecificSyntaxFailure",e.LocalPartIsWellKnownRoleAccount="LocalPartIsWellKnownRoleAccount,",e.DnsQueryTimeout="DnsQueryTimeout",e.DnsConnectionFailure="DnsConnectionFailure",e.DomainDoesNotExist="DomainDoesNotExist",e.DomainIsMisconfigured="DomainIsMisconfigured",e.DomainHasNullMx="DomainHasNullMx",e.DomainIsWellKnownDea="DomainIsWellKnownDea",e.MailExchangerIsWellKnownDea="MailExchangerIsWellKnownDea",e.MailboxIsDea="MailboxIsDea",e.SmtpConnectionTimeout="SmtpConnectionTimeout",e.SmtpConnectionFailure="SmtpConnectionFailure",e.MailboxDoesNotExist="MailboxDoesNotExist",e.MailboxConnectionFailure="MailboxConnectionFailure",e.LocalSenderAddressRejected="LocalSenderAddressRejected",e.MailboxValidationTimeout="MailboxValidationTimeout",e.MailboxTemporarilyUnavailable="MailboxTemporarilyUnavailable",e.ServerDoesNotSupportInternationalMailboxes="ServerDoesNotSupportInternationalMailboxes",e.CatchAllValidationTimeout="CatchAllValidationTimeout",e.ServerIsCatchAll="ServerIsCatchAll",e.CatchAllConnectionFailure="CatchAllConnectionFailure",e.ServerTemporaryUnavailable="ServerTemporaryUnavailable",e.SmtpDialogError="SmtpDialogError",e.LocalEndPointRejected="LocalEndPointRejected",e.UnhandledException="UnhandledException",e.MailExchangerIsHoneypot="MailExchangerIsHoneypot",e.UnacceptableDomainLiteral="UnacceptableDomainLiteral",e.Duplicate="Duplicate"}(le||(le={}));var be,Ce=(new Z).build("verifalia");X.interceptors.request.use((function(e){return Ce.log("invoking URL",e.url),Ce.log("params",e.params),Ce.log("data",e.data),Ce.log("headers",e.headers),e}),(function(e){return Promise.reject(e)})),function(e){e[e.allowed=0]="allowed",e[e.notAllowed=1]="notAllowed",e[e.throttled=2]="throttled",e[e.exception=3]="exception",e[e.cancelled=4]="cancelled"}(be||(be={}));var Se,Be=function(){function e(){this._strategyElementKey="Verifalia-Strategy",this._resultElementKey="Verifalia-Result"}return e.prototype.getElementCacheItem=function(e,t){return e[t]},e.prototype.setElementCacheItem=function(e,t,n){n?e[t]=n:delete e[t]},e.prototype.getValidationResult=function(e){return this.getElementCacheItem(e,this._resultElementKey)},e.prototype.clearValidationResult=function(e){this.setElementCacheItem(e,this._resultElementKey,void 0)},e.prototype.isValidationPending=function(e){return!!this.getElementCacheItem(e,this._strategyElementKey)},e.prototype.cancelPendingValidation=function(e){var t=this.getElementCacheItem(e,this._strategyElementKey);return!!t&&(t.cancel(),this.setElementCacheItem(e,this._strategyElementKey,void 0),!0)},e.prototype.validate=function(e,t){return u(this,void 0,void 0,(function(){var n,r,a,o,s,u;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,3,4]),this.cancelPendingValidation(e),this.setElementCacheItem(e,this._resultElementKey,void 0),n=new ye({username:t.appKey,password:""}),r=e.value,e.dispatchEvent(new CustomEvent(i.FieldValidationStarted)),a=new re(!0,null),this.setElementCacheItem(e,this._strategyElementKey,a),[4,n.emailValidations.submit(r,a)];case 1:return o=l.sent(),u={validation:o,status:this.isValidationResultAllowed(o.entries[0],t)?be.allowed:be.notAllowed},e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted,{detail:u})),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 2:return s=l.sent(),u={},s instanceof Ae?u.status=be.throttled:s instanceof ne?u.status=be.cancelled:(s instanceof pe&&console.error("The configured Verifalia appkey appears to be invalid: please check your configuration.",s),u.status=be.exception),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 3:return this.setElementCacheItem(e,this._strategyElementKey,void 0),e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted)),[7];case 4:return[2]}}))}))},e.prototype.isValidationResultAllowed=function(e,t){var n,i=t.emailValidations.allow||"";n=Array.isArray(i)?i:i.split(",").map((function(e){return e.trim().toUpperCase()}));var r,a=t.emailValidations.block||"";r=Array.isArray(a)?a:a.split(",").map((function(e){return e.trim().toUpperCase()}));var o=!1;return n.indexOf(e.classification.toUpperCase())>-1&&(o=o||!0),n.indexOf(("status:"+e.status).toUpperCase())>-1&&(o=o||!0),e.isFreeEmailAddress&&n.indexOf("@FREE")>-1&&(o=o||!0),e.isDisposableEmailAddress&&n.indexOf("@DISPOSABLE")>-1&&(o=o||!0),e.isRoleAccount&&n.indexOf("@ROLE")>-1&&(o=o||!0),!(!o||r.indexOf(e.classification.toUpperCase())>-1||r.indexOf(("status:"+e.status).toUpperCase())>-1||e.isFreeEmailAddress&&r.indexOf("@FREE")>-1||e.isDisposableEmailAddress&&r.indexOf("@DISPOSABLE")>-1||e.isRoleAccount&&r.indexOf("@ROLE")>-1)},e}();!function(e){e[e.NotSet=0]="NotSet",e[e.Validating=1]="Validating",e[e.ResultValid=2]="ResultValid",e[e.ResultInvalid=3]="ResultInvalid",e[e.ResultThrottled=4]="ResultThrottled",e[e.ResultException=5]="ResultException"}(Se||(Se={}));var xe=function(){function t(e,t,n,i){this._status=Se.NotSet,this._form=e,this._element=t,this._configurationManager=n,this._configuration=n.getConfiguration(t),this._validator=i}return t.prototype.getStatus=function(){return this._status},t.prototype.setStatus=function(e){this.applyTransition(this._status,e),this._status=e},t.prototype.wireup=function(){var e=this;this._element;var t=0;this._configuration.inputBindings&&this._configuration.inputBindings.debounceTime&&(t=this._configuration.inputBindings.debounceTime);var n,i,r,a=(n=function(){e._element,e.onElementOrFormEvent(e._element)},void 0===(i=t)&&(i=0),function(){clearTimeout(r),r=setTimeout((function(){return n()}),i)});if(this._element.addEventListener("input",(function(t){e._element,e.resetValidationResult(e._element),e.setValidityPending(e._element,!1),a()})),this._configuration.inputBindings&&this._configuration.inputBindings.preventSubmission){var o=this._element.closest("FORM");o&&o.addEventListener("submit",(function(t){return e.onElementOrFormEvent(e._element,o,t)}))}this.setStatus(Se.NotSet),this._configuration.inputBindings&&this._configuration.inputBindings.classNames&&this._configuration.inputBindings.classNames.base&&this._element.classList.add(this._configuration.inputBindings.classNames.base)},t.prototype.resetValidationResult=function(e){this._validator.clearValidationResult(e),e.name&&(this.removeElementById(e.name+"-verifalia-id"),this.removeElementById(e.name+"-verifalia-classification"),this.removeElementById(e.name+"-verifalia-status"))},t.prototype.removeElementById=function(e){var t=document.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype.onElementOrFormEvent=function(t,n,r){return u(this,void 0,void 0,(function(){var a,o,s,u=this;return l(this,(function(l){switch(l.label){case 0:return this._resetTransientValidityTimeout&&clearTimeout(this._resetTransientValidityTimeout),(a=this._validator.getValidationResult(t))?a.status===be.allowed||a.status===be.throttled&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)||a.status===be.exception&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(""),[2]):[3,4]:[3,1];case 1:return n&&r&&(this.setValidityPending(t,!0),n.reportValidity(),r.preventDefault()),t.addEventListener(i.FieldValidationCompleted,(function(e){return u.onFieldValidationCompleted(e)})),this.setStatus(Se.Validating),this._validator.isValidationPending(t)?[3,3]:[4,this._validator.validate(t,this._configuration)];case 2:switch((o=l.sent()).status){case be.throttled:this.setStatus(Se.ResultThrottled),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)?(t.setCustomValidity(this._configuration.emailValidations.messages.throttled),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),1e4)):t.setCustomValidity("");break;case be.cancelled:this.setStatus(Se.NotSet);break;case be.exception:this.setStatus(Se.ResultException),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(this._configuration.emailValidations.messages.exception),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),5e3)):t.setCustomValidity("");break;case be.allowed:case be.notAllowed:this._configuration.inputBindings&&this._configuration.inputBindings.appendHiddenFields&&t.name&&(this.appendOrReplaceHiddenField(t.name+"-verifalia-id",o.validation.overview.id,t),s=o.validation.entries[0],this.appendOrReplaceHiddenField(t.name+"-verifalia-classification",""+s.classification,t),this.appendOrReplaceHiddenField(t.name+"-verifalia-status",""+s.status,t)),o.status===be.allowed?(t.setCustomValidity(""),this.setStatus(Se.ResultValid)):(t.setCustomValidity(this._configuration.emailValidations.messages.invalid),this.setStatus(Se.ResultInvalid))}return[3,4];case 3:l.label=4;case 4:return n&&r&&(n.reportValidity(),r.preventDefault()),t.focus(),[2]}}))}))},t.prototype.setValidityPending=function(e,t){e.setCustomValidity(this._configuration.emailValidations.messages.processing),t&&this._form.reportValidity(),e.focus()},t.prototype.onFieldValidationCompleted=function(e){var t=this,n=e.target;e.detail,n.removeEventListener(i.FieldValidationCompleted,(function(e){return t.onFieldValidationCompleted(e)})),this._form.reportValidity()},t.prototype.appendOrReplaceHiddenField=function(e,t,n){var i=document.getElementById(e);i||((i=document.createElement("input")).type="hidden",i.id=e,i.name=e,n.insertAdjacentElement("afterend",i)),i.value=t},t.prototype.applyTransition=function(e,t){if(this._configuration.inputBindings&&this._configuration.inputBindings.classNames){var n=this._element.classList;switch(n.remove(this._configuration.inputBindings.classNames.processing,this._configuration.inputBindings.classNames.valid,this._configuration.inputBindings.classNames.invalid,this._configuration.inputBindings.classNames.exception,this._configuration.inputBindings.classNames.throttled),t){case Se.Validating:n.add(this._configuration.inputBindings.classNames.processing);break;case Se.ResultValid:n.add(this._configuration.inputBindings.classNames.valid);break;case Se.ResultInvalid:n.add(this._configuration.inputBindings.classNames.invalid);break;case Se.ResultException:n.add(this._configuration.inputBindings.classNames.exception);break;case Se.ResultThrottled:n.add(this._configuration.inputBindings.classNames.throttled)}}},t}(),Fe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element},t}(xe);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var Ie=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},Te=function(){function e(e,t){this.configurationManager=e,this.validator=t,this.fields=[]}return e.prototype.wireupFields=function(){for(var e=document.evaluate('//*/input[@type="email"] | //*/input[contains(@name, "email")] | //*/input[@*[starts-with(name(), "data-verifalia")]]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),t=0;t<e.snapshotLength;t++){var n=e.snapshotItem(t);this.wireupField(n)}},e.prototype.wireupField=function(e){if("INPUT"!==e.tagName.toUpperCase()&&"TEXTAREA"!==e.tagName.toUpperCase())throw new Ie("unsupported element "+e.tagName);var t=this.configurationManager.getConfiguration(e);if(t.appKey){t.appKey;var n=e.closest("FORM");if(!n)return;var i=this.buildField(n,e,this.configurationManager);i.wireup(),this.fields.push(i)}else console.error("An appkey couldn't be found while loading Verifalia: please check your configuration.")},e.prototype.buildField=function(e,t,n){return new xe(e,t,n,this.validator)},e}(),_e=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $&&$.validator&&$.validator.methods&&$.validator.methods.email){var a=r.validator,o=r.configurationManager;$.validator.methods.email=function(t,n,i,r){var s=this;if(this.optional(n))return"dependency-mismatch";var u,l=this.previousValue(n,"email");if(this.settings.messages[n.name]||(this.settings.messages[n.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[n.name].email,this.settings.messages[n.name].email=l.message,i="string"==typeof i&&{url:i}||i,u=$.param($.extend({data:t},i.data)),l.old===u)return l.valid;l.old=u,this.startRequest(n),{}[n.name]=t;var c=o.getConfiguration(n);return a.validate(n,c).then((function(i){s.settings.messages[n.name].email=l.originalMessage;var r=i&&i.status===be.allowed;if(r=(r=r||i.status===be.throttled&&!o.shouldPreventFormSubmissionOn(c,e.throttled))||i.status===be.exception&&!o.shouldPreventFormSubmissionOn(c,e.exception)){var a=s.formSubmitted;s.resetInternals(),s.toHide=s.errorsFor(n),s.formSubmitted=a,s.successList.push(n),s.invalid[n.name]=!1,s.showErrors(),l.valid=!0,s.stopRequest(n,!0)}else{var u={},d=void 0;switch(i.status){case be.throttled:d=c.emailValidations.messages.throttled;break;case be.exception:d=c.emailValidations.messages.exception;break;default:d=s.defaultMessage(n,{method:"email",parameters:t})}u[n.name]=l.message=d,s.invalid[n.name]=!0,s.showErrors(u),l.valid=!1,s.stopRequest(n,!1),i.status!==be.throttled&&i.status!==be.exception||setTimeout((function(){l.old=void 0}),5e3)}})),"pending"}}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Fe(e,t,n,this.validator)},n}(Te),Re=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element,$(this._element).parsley().addConstraint("verifalia-email")},t}(xe),Ve=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $){var a=window.Parsley;$.Deferred&&a&&a.addValidator&&a.addValidator("verifalia-email",{validateString:function(t,r,a){var o=a.element,s=n.getConfiguration(o),u=new $.Deferred;return i.validate(o,s).then((function(t){switch(t.status){case be.exception:n.shouldPreventFormSubmissionOn(s,e.exception)?u.reject(s.emailValidations.messages.exception):u.resolve();break;case be.cancelled:u.reject();break;case be.allowed:u.resolve();break;case be.notAllowed:u.reject(s.emailValidations.messages.invalid);break;case be.throttled:n.shouldPreventFormSubmissionOn(s,e.throttled)?u.reject(s.emailValidations.messages.throttled):u.resolve()}})),u.promise()}})}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Re(e,t,n,this.validator)},n}(Te),Ue=function(){function e(){}return e.prototype.buildHost=function(e,t){if("undefined"!=typeof $){if($,window.Parsley)return window.Parsley,new Ve(e,t);if($.validator&&$.validator.methods&&$.validator.methods.email)return $.validator,new _e(e,t)}return new Te(e,t)},e}();return function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".verifalia-field::-ms-clear{display:none}.verifalia-field.verifalia-field-processing{background-image:url(\"data:image/gif;base64,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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-valid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\")}.verifalia-field.verifalia-field-invalid,.verifalia-field.verifalia-field-valid{background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-invalid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E\")}"),new function(){this.version="1.2.0";var e=new Be,t=window.VerifaliaWidgetConfig,n=new r(t);if(document.dispatchEvent(new CustomEvent(i.Initializing,{cancelable:!0}))){var a=(new Ue).buildHost(n,e),o=n.getConfiguration(document.body);o.inputBindings&&o.inputBindings.autoWireup&&a.wireupFields(),document.dispatchEvent(new CustomEvent(i.Initialized))}}}(); |
{ | ||
"name": "verifalia-widget", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -35,13 +35,13 @@ "main": "dist/verifalia-widget.js", | ||
"@types/debug": "^4.1.5", | ||
"@types/jquery": "^3.3.31", | ||
"@types/node": "^12.6.9", | ||
"@types/jquery": "^3.3.33", | ||
"@types/node": "^12.12.28", | ||
"cross-env": "^5.2.0", | ||
"cssnano": "^4.1.10", | ||
"dts-bundle-generator": "^3.2.0", | ||
"dts-bundle-generator": "^3.3.1", | ||
"genversion": "^2.2.0", | ||
"mdn-polyfills": "^5.18.0", | ||
"node-sass": "^4.12.0", | ||
"mdn-polyfills": "^5.20.0", | ||
"node-sass": "^4.13.1", | ||
"postcss-cssnext": "^3.1.0", | ||
"replace-in-file": "^4.1.3", | ||
"rollup": "^1.19.4", | ||
"replace-in-file": "^4.3.1", | ||
"rollup": "^1.31.1", | ||
"rollup-plugin-banner": "^0.2.1", | ||
@@ -53,13 +53,13 @@ "rollup-plugin-commonjs": "^10.0.2", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-postcss": "^2.0.3", | ||
"rollup-plugin-postcss": "^2.1.1", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "^5.1.1", | ||
"rollup-plugin-typescript2": "^0.22.1", | ||
"rollup-plugin-uglify": "^6.0.2", | ||
"rollup-plugin-visualizer": "^2.6.0", | ||
"ssri": "^7.0.1", | ||
"ts-loader": "^6.0.4", | ||
"tslint": "^5.18.0", | ||
"typescript": "^3.5.3", | ||
"verifalia": "^2.3.0" | ||
"rollup-plugin-terser": "^5.2.0", | ||
"rollup-plugin-typescript2": "^0.26.0", | ||
"rollup-plugin-uglify": "^6.0.4", | ||
"rollup-plugin-visualizer": "^2.7.2", | ||
"ssri": "^7.1.0", | ||
"ts-loader": "^6.2.1", | ||
"tslint": "^5.20.1", | ||
"typescript": "^3.8.2", | ||
"verifalia": "^2.4.0" | ||
}, | ||
@@ -66,0 +66,0 @@ "files": [ |
@@ -23,4 +23,4 @@ Verifalia widget - Add real-time email verification to your page, with no coding required | ||
<script defer | ||
src="https://unpkg.com/verifalia-widget@1.1.0/dist/verifalia-widget.js" | ||
integrity="sha512-tLRsvkWercq0j+3SwNXHa5ebd3N+0tPsfXdQrozijS5BsTD3XGmsOXUqwMb5Lk+ME3jZImgpv5s/nxQmb9okkw==" | ||
src="https://unpkg.com/verifalia-widget@1.2.0/dist/verifalia-widget.js" | ||
integrity="sha512-KNWaWGZz1V4Hm+9e4pdMB0rJ/wOY3ifDIYdfnHyoRnAXtpTxvxU+beMZ6nO//qqPYWcm9uFlIA1eye6/BAnbjQ==" | ||
crossorigin="anonymous"></script> | ||
@@ -37,4 +37,4 @@ </body> | ||
<script defer | ||
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.1.0/dist/verifalia-widget.js" | ||
integrity="sha512-tLRsvkWercq0j+3SwNXHa5ebd3N+0tPsfXdQrozijS5BsTD3XGmsOXUqwMb5Lk+ME3jZImgpv5s/nxQmb9okkw==" | ||
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.2.0/dist/verifalia-widget.js" | ||
integrity="sha512-KNWaWGZz1V4Hm+9e4pdMB0rJ/wOY3ifDIYdfnHyoRnAXtpTxvxU+beMZ6nO//qqPYWcm9uFlIA1eye6/BAnbjQ==" | ||
crossorigin="anonymous"></script> | ||
@@ -57,3 +57,3 @@ </body> | ||
First things first: using the Verifalia email verification service requires to have a Verifalia account: if you don't have one, just [register for a free one](https://verifalia.com/sign-up). In addition to that, this widget requires a *browser app key* (a sequence of alphanumeric characters): [create a browser app](https://verifalia.com/client-area#/browser-apps/new), if you don't have one already and grab the provided app key. | ||
First things first: using the Verifalia email verification service requires to have a Verifalia account: if you don't have one, just [register for a free one](https://verifalia.com/sign-up). In addition to that, this widget requires a *browser app key* (a sequence of alphanumeric characters): [create a browser app](https://verifalia.com/client-area#/browser-apps/new), if you don't have one already, and grab the provided app key. | ||
@@ -60,0 +60,0 @@ Once you have your browser app key at hand, provide it to the widget using either Javascript or through special attributes applied to the `body` element of your HTML page, as explained in the next two sections. |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65620
194