-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreip.bundle.js
1 lines (1 loc) · 42.2 KB
/
greip.bundle.js
1
var Greip;(()=>{"use strict";var e={746:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getGFP=t.makePostRquest=t.makeHttpRquest=t.serialize=t.availableCountryParams=t.availableFormats=t.availableLanguages=t.availableGeoIPParams=t.baseURL=void 0;var o=n(425);t.baseURL="https://greipapi.com",t.availableGeoIPParams=["location","security","timezone","currency","device"],t.availableLanguages=["EN","AR","DE","FR","ES","JA","ZH","RU"],t.availableFormats=["JSON","XML","CSV","Newline"],t.availableCountryParams=["language","flag","currency","timezone"],t.serialize=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},t.makeHttpRquest=function(e,n,r,i){n.source="JS-Package",o.default.get(t.baseURL+e+"?"+(0,t.serialize)(n),{headers:i}).then((function(e){if(200!==e.status)throw new Error("An unknown error occurred while sending the request to Greip API.");r(e.data)})).catch((function(e){throw new Error("An unknown error occurred while sending the request to Greip API.")}))},t.makePostRquest=function(e,n,r){n.source="JS-Package",o.default.post(t.baseURL+"/"+e,n).then((function(e){if(200!==e.status)throw new Error("An unknown error occurred while sending the request to Greip API.");r(e.data)})).catch((function(e){throw new Error("An unknown error occurred while sending the request to Greip API.")}))},t.getGFP=function(){try{var e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=navigator.language,n=navigator.languages,o=window.screen.width,r=window.screen.height,i=void 0!==navigator.plugins?Array.from(navigator.plugins).map((function(e){return e.name})):null;return JSON.stringify({timezone:e,primary_language:t,preferred_languages:n,screen_width:o,screen_height:r,plugins:i})}catch(e){return null}}},425:(e,t,n)=>{function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,p=u("undefined"),d=c("ArrayBuffer"),f=u("string"),h=u("function"),m=u("number"),y=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=c("Date"),b=c("File"),E=c("Blob"),v=c("FileList"),R=c("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),l(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let s;for(o=0;o<i;o++)s=r[o],t.call(null,e[s],s,e)}}function S(e,t){t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,A=e=>!p(e)&&e!==k,P=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>T&&e instanceof T);var T;const N=c("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),C=c("RegExp"),F=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};O(n,((n,r)=>{let i;!1!==(i=t(n,r,e))&&(o[r]=i||n)})),Object.defineProperties(e,o)},x="abcdefghijklmnopqrstuvwxyz",_="0123456789",U={DIGIT:_,ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+_},L=c("AsyncFunction");var B={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=s(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:f,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:g,isUndefined:p,isDate:w,isFile:b,isBlob:E,isRegExp:C,isFunction:h,isStream:e=>y(e)&&h(e.pipe),isURLSearchParams:R,isTypedArray:P,isFileList:v,forEach:O,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},o=(o,r)=>{const i=t&&S(n,r)||r;g(n[i])&&g(o)?n[i]=e(n[i],o):g(o)?n[i]=e({},o):l(o)?n[i]=o.slice():n[i]=o};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],o);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(O(t,((t,r)=>{n&&h(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:N,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];h(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:S,global:k,isContextDefined:A,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const r=l(e)?[]:{};return O(e,((e,t)=>{const i=n(e,o+1);!p(i)&&(r[t]=i)})),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:L,isThenable:e=>e&&(y(e)||h(e))&&h(e.then)&&h(e.catch)};function D(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}B.inherits(D,Error,{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:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=D.prototype,q={};function J(e){return B.isPlainObject(e)||B.isArray(e)}function Y(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function H(e,t,n){return e?e.concat(t).map((function(e,t){return e=Y(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{q[e]={value:e}})),Object.defineProperties(D,q),Object.defineProperty(I,"isAxiosError",{value:!0}),D.from=(e,t,n,o,r,i)=>{const s=Object.create(I);return B.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),D.call(s,e.message,t,n,o,r),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const z=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)}));function M(e,t,n){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,r=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(B.isDate(e))return e.toISOString();if(!a&&B.isBlob(e))throw new D("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(e)||B.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,r){let a=e;if(e&&!r&&"object"==typeof e)if(B.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(J)}(e)||(B.isFileList(e)||B.endsWith(n,"[]"))&&(a=B.toArray(e)))return n=Y(n),a.forEach((function(e,o){!B.isUndefined(e)&&null!==e&&t.append(!0===s?H([n],o,i):null===s?n:n+"[]",c(e))})),!1;return!!J(e)||(t.append(H(r,n,i),c(e)),!1)}const l=[],p=Object.assign(z,{defaultVisitor:u,convertValue:c,isVisitable:J});if(!B.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!B.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+o.join("."));l.push(n),B.forEach(n,(function(n,i){!0===(!(B.isUndefined(n)||null===n)&&r.call(t,n,B.isString(i)?i.trim():i,o,p))&&e(n,o?o.concat(i):[i])})),l.pop()}}(e),t}function V(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&M(e,this,t)}const G=K.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const o=n&&n.encode||W,r=n&&n.serialize;let i;if(i=r?r(t,n):B.isURLSearchParams(t)?t.toString():new K(t,n).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,V)}:V;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Z=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(ne="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(ne)<0);var ne;const oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var re={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:oe,hasStandardBrowserEnv:te}),...Q};function ie(e){function t(e,n,o,r){let i=e[r++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=r>=e.length;return i=!i&&B.isArray(o)?o.length:i,a?(B.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s):(o[i]&&B.isObject(o[i])||(o[i]=[]),t(e,n,o[i],r)&&B.isArray(o[i])&&(o[i]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o<r;o++)i=n[o],t[i]=e[i];return t}(o[i])),!s)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,o)=>{t(function(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,n,0)})),n}return null}const se={transitional:$,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=B.isObject(e);if(r&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return o?JSON.stringify(ie(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return M(e,new re.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){return re.isNode&&B.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=B.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return M(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||se.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw D.from(e,D.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:re.classes.FormData,Blob:re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],(e=>{se.headers[e]={}}));var ae=se;const ce=B.toObjectSet(["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"]),ue=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function pe(e){return!1===e||null==e?e:B.isArray(e)?e.map(pe):String(e)}function de(e,t,n,o,r){return B.isFunction(o)?o.call(this,t,n):(r&&(t=n),B.isString(t)?B.isString(o)?-1!==t.indexOf(o):B.isRegExp(o)?o.test(t):void 0:void 0)}class fe{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=le(t);if(!r)throw new Error("header name must be a non-empty string");const i=B.findKey(o,r);(!i||void 0===o[i]||!0===n||void 0===n&&!1!==o[i])&&(o[i||t]=pe(e))}const i=(e,t)=>B.forEach(e,((e,n)=>r(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?i(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&ce[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)})),t})(e),t):null!=e&&r(t,e,n),this}get(e,t){if(e=le(e)){const n=B.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=le(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!de(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=le(e)){const r=B.findKey(n,e);!r||t&&!de(0,n[r],r,t)||(delete n[r],o=!0)}}return B.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!de(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return B.forEach(this,((o,r)=>{const i=B.findKey(n,r);if(i)return t[i]=pe(o),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=pe(o),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,o)=>{null!=n&&!1!==n&&(t[o]=e&&B.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ue]=this[ue]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=le(e);t[o]||(function(e,t){const n=B.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[o]=!0)}return B.isArray(e)?e.forEach(o):o(e),this}}fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(fe.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),B.freezeMethods(fe);var he=fe;function me(e,t){const n=this||ae,o=t||n,r=he.from(o.headers);let i=o.data;return B.forEach(e,(function(e){i=e.call(n,i,r.normalize(),t?t.status:void 0)})),r.normalize(),i}function ye(e){return!(!e||!e.__CANCEL__)}function ge(e,t,n){D.call(this,null==e?"canceled":e,D.ERR_CANCELED,t,n),this.name="CanceledError"}B.inherits(ge,D,{__CANCEL__:!0});var we=re.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const s=[e+"="+encodeURIComponent(t)];B.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),B.isString(o)&&s.push("path="+o),B.isString(r)&&s.push("domain="+r),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function be(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ee=re.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function o(n){let o=n;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=o(window.location.href),function(e){const t=B.isString(e)?o(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ve(e,t){let n=0;const o=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=o[s];r||(r=c),n[i]=a,o[i]=c;let l=s,p=0;for(;l!==i;)p+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-r<t)return;const d=u&&c-u;return d?Math.round(1e3*p/d):void 0}}(50,250);return r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r};u[t?"download":"upload"]=!0,e(u)}}const Re={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let o=e.data;const r=he.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(B.isFormData(o))if(re.hasStandardBrowserEnv||re.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if(!1!==(s=r.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];r.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(t+":"+n))}const p=be(e.baseURL,e.url);function d(){if(!l)return;const o=he.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:o,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new D("Request aborted",D.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new D("Network Error",D.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const o=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new D(t,o.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,l)),l=null},re.hasStandardBrowserEnv&&(c&&B.isFunction(c)&&(c=c(e)),c||!1!==c&&Ee(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&we.read(e.xsrfCookieName);t&&r.set(e.xsrfHeaderName,t)}void 0===o&&r.setContentType(null),"setRequestHeader"in l&&B.forEach(r.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new ge(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(p);f&&-1===re.protocols.indexOf(f)?n(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e)):l.send(o||null)}))}};B.forEach(Re,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Oe=e=>`- ${e}`,Se=e=>B.isFunction(e)||null===e||!1===e;var ke=e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let i=0;i<t;i++){let t;if(n=e[i],o=n,!Se(n)&&(o=Re[(t=String(n)).toLowerCase()],void 0===o))throw new D(`Unknown adapter '${t}'`);if(o)break;r[t||"#"+i]=o}if(!o){const e=Object.entries(r).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new D("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Oe).join("\n"):" "+Oe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function Pe(e){return Ae(e),e.headers=he.from(e.headers),e.data=me.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ke(e.adapter||ae.adapter)(e).then((function(t){return Ae(e),t.data=me.call(e,e.transformResponse,t),t.headers=he.from(t.headers),t}),(function(t){return ye(t)||(Ae(e),t&&t.response&&(t.response.data=me.call(e,e.transformResponse,t.response),t.response.headers=he.from(t.response.headers))),Promise.reject(t)}))}const Te=e=>e instanceof he?e.toJSON():e;function Ne(e,t){t=t||{};const n={};function o(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function r(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:o(void 0,e,n):o(e,t,n)}function i(e,t){if(!B.isUndefined(t))return o(void 0,t)}function s(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,i){return i in t?o(n,r):i in e?o(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>r(Te(e),Te(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(o){const i=c[o]||r,s=i(e[o],t[o],o);B.isUndefined(s)&&i!==a||(n[o]=s)})),n}const je={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{je[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};je.transitional=function(e,t,n){function o(e,t){return"[Axios v1.6.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,i)=>{if(!1===e)throw new D(o(r," has been removed"+(t?" in "+t:"")),D.ERR_DEPRECATED);return t&&!Ce[r]&&(Ce[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}};var Fe={assertOptions:function(e,t,n){if("object"!=typeof e)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new D("option "+i+" must be "+n,D.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}},validators:je};const xe=Fe.validators;class _e{constructor(e){this.defaults=e,this.interceptors={request:new Z,response:new Z}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ne(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&Fe.assertOptions(n,{silentJSONParsing:xe.transitional(xe.boolean),forcedJSONParsing:xe.transitional(xe.boolean),clarifyTimeoutError:xe.transitional(xe.boolean)},!1),null!=o&&(B.isFunction(o)?t.paramsSerializer={serialize:o}:Fe.assertOptions(o,{encode:xe.function,serialize:xe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&B.merge(r.common,r[t.method]);r&&B.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=he.concat(i,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,p=0;if(!a){const e=[Pe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);p<l;)u=u.then(e[p++],e[p++]);return u}l=s.length;let d=t;for(p=0;p<l;){const e=s[p++],t=s[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Pe.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=c.length;p<l;)u=u.then(c[p++],c[p++]);return u}getUri(e){return X(be((e=Ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function(e){_e.prototype[e]=function(t,n){return this.request(Ne(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach(["post","put","patch"],(function(e){function t(t){return function(n,o,r){return this.request(Ne(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}_e.prototype[e]=t(),_e.prototype[e+"Form"]=t(!0)}));var Ue=_e;class Le{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e),t=e})).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e((function(e,o,r){n.reason||(n.reason=new ge(e,o,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Le((function(t){e=t})),cancel:e}}}var Be=Le;const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach((([e,t])=>{De[t]=e}));var Ie=De;const qe=function e(t){const n=new Ue(t),r=o(Ue.prototype.request,n);return B.extend(r,Ue.prototype,n,{allOwnKeys:!0}),B.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ne(t,n))},r}(ae);qe.Axios=Ue,qe.CanceledError=ge,qe.CancelToken=Be,qe.isCancel=ye,qe.VERSION="1.6.7",qe.toFormData=M,qe.AxiosError=D,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=function(e){return function(t){return e.apply(null,t)}},qe.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},qe.mergeConfig=Ne,qe.AxiosHeaders=he,qe.formToJSON=e=>ie(B.isHTMLForm(e)?new FormData(e):e),qe.getAdapter=ke,qe.HttpStatusCode=Ie,qe.default=qe,e.exports=qe}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var o={};(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.IBANValidation=e.PhoneValidation=e.PaymentFraud=e.EmailValidation=e.ASN=e.BadWord=e.Country=e.BulkLookup=e.Threats=e.Lookup=e.GeoIP=void 0;var t=n(746);e.GeoIP=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.params||[],i=e.format||"JSON",s=e.lang||"EN",a=e.mode||"live";s=s.toUpperCase();var c=(0,t.getGFP)();r.forEach((function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')))})),t.availableFormats.includes(i)||o(new Error('The `format` option value "'+i+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),t.availableLanguages.includes(s)||o(new Error('The `lang` option value "'+s+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),"live"!==a&&"test"!==a&&o(new Error('The `mode` option value "'+a+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),(0,t.makeHttpRquest)("/geoip",{key:e.key,params:r.join(","),format:i,lang:s,mode:a},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}),{gfp:c})}))},e.Lookup=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.ip||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),r.length<7&&o(new Error("You should pass the `ip` parameter.")),i.forEach((function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')))})),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/lookup/ip",{ip:r,key:e.key,params:i.join(","),format:s,lang:a,mode:c},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.Threats=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.ip||"",i=e.format||"JSON",s=e.mode||"live";r.length<7&&o(new Error("You should pass the `ip` parameter.")),t.availableFormats.includes(i)||o(new Error('The `format` option value "'+i+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==s&&"test"!==s&&o(new Error('The `mode` option value "'+s+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/lookup/ip/threats",{ip:r,key:e.key,format:i,mode:s},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.BulkLookup=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.ips||[],i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),"object"!=typeof r&&(r=[]),r.length<1&&o(new Error("You should pass the `ips` parameter.")),r.forEach((function(e){e.length<7&&o(new Error("You should pass a valid IP Addresses in the `ips` parameter."))})),i.forEach((function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')))})),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/lookup/ip/bulk",{ips:r,key:e.key,params:i.join(","),format:s,lang:a,mode:c},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.Country=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.countryCode||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";r=r.toUpperCase(),a=a.toUpperCase(),2!==r.length&&o(new Error("You should pass the `countryCode` parameter. Also, it should be a `ISO 3166-1 alpha-2` format.\nRead more at: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2")),i.forEach((function(e){e.length>0&&(t.availableCountryParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `language`, `flag`, `currency` and/or `timezone`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')))})),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),(0,t.makeHttpRquest)("/lookup/country",{CountryCode:r,key:e.key,params:i.join(","),format:s,lang:a,mode:c},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.BadWord=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.text||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),r.length<1&&o(new Error("You should pass the `text` parameter.")),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML` or `CSV`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),(0,t.makeHttpRquest)("/scoring/profanity",{text:r,key:e.key,params:i.join(","),format:s,lang:a,mode:c},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.ASN=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.asn||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `asn` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/asn-lookup')),(0,t.makeHttpRquest)("/lookup/asn",{asn:r,key:e.key,mode:i},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.EmailValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.email||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `email` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/data-validation/email-lookup')),(0,t.makeHttpRquest)("/scoring/email",{email:r,key:e.key,mode:i},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.PaymentFraud=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.data||[],i=e.mode||"live";("object"!=typeof r||Array.isArray(r))&&o(new Error("You should pass the `data` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/payment-fraud/payment-fraud-prevention')),(0,t.makePostRquest)("paymentFraud",{data:r,key:e.key,mode:i},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.PhoneValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.phone||"",i=e.countryCode||"",s=e.mode||"live";(r.length<1||i.length<1)&&o(new Error("You should pass both `phone` and `countryCode` parameters.")),"live"!==s&&"test"!==s&&o(new Error('The `mode` option value "'+s+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/data-validation/phone-lookup')),(0,t.makeHttpRquest)("/scoring/phone",{phone:r,countryCode:i,key:e.key,mode:s},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))},e.IBANValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise((function(n,o){var r=e.iban||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `iban` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/payment-fraud/iban-validation')),(0,t.makeHttpRquest)("/lookup/iban",{iban:r,key:e.key,mode:i},(function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)}))}))}})(),Greip=o})();