import{cJ as S,cK as $,cL as B,cM as z,cN as W,bj as H}from"./index-DR3HTfO6.js";var h={exports:{}},g={exports:{}},I;function O(){return I||(I=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=F;var v=o(S());function o(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(a)}function F(a,l){(0,v.default)(a);var u,_;f(l)==="object"?(u=l.min||0,_=l.max):(u=arguments[1],_=arguments[2]);var x=encodeURI(a).split(/%..|./).length-1;return x>=u&&(typeof _>"u"||x<=_)}c.exports=i.default,c.exports.default=i.default})(g,g.exports)),g.exports}var L;function Q(){return L||(L=1,(function(c,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=A;var v=u(S()),o=u(B()),f=u(O()),F=u(z()),a=u(W()),l=u($());function u(r){return r&&r.__esModule?r:{default:r}}var _={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},x=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,U=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,k=/^[a-z\d]+$/,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,M=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,P=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,j=254;function R(r){var e=r.replace(/^"(.+)"$/,"$1");if(!e.trim())return!1;var d=/[\.";<>]/.test(e);if(d){if(e===r)return!1;var s=e.split('"').length===e.split('\\"').length;if(!s)return!1}return!0}function A(r,e){if((0,v.default)(r),e=(0,l.default)(e,_),e.require_display_name||e.allow_display_name){var d=r.match(x);if(d){var s=d[1];if(r=r.replace(s,"").replace(/(^<|>$)/g,""),s.endsWith(" ")&&(s=s.slice(0,-1)),!R(s))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&r.length>j)return!1;var y=r.split("@"),n=y.pop(),m=n.toLowerCase();if(e.host_blacklist.length>0&&(0,o.default)(m,e.host_blacklist)||e.host_whitelist.length>0&&!(0,o.default)(m,e.host_whitelist))return!1;var t=y.join("@");if(e.domain_specific_validation&&(m==="gmail.com"||m==="googlemail.com")){t=t.toLowerCase();var q=t.split("+")[0];if(!(0,f.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var w=q.split("."),p=0;p<w.length;p++)if(!k.test(w[p]))return!1}if(e.ignore_max_length===!1&&(!(0,f.default)(t,{max:64})||!(0,f.default)(n,{max:254})))return!1;if(!(0,F.default)(n,{require_tld:e.require_tld,ignore_max_length:e.ignore_max_length,allow_underscores:e.allow_underscores})){if(!e.allow_ip_domain)return!1;if(!(0,a.default)(n)){if(!n.startsWith("[")||!n.endsWith("]"))return!1;var D=n.slice(1,-1);if(D.length===0||!(0,a.default)(D))return!1}}if(e.blacklisted_chars&&t.search(new RegExp("[".concat(e.blacklisted_chars,"]+"),"g"))!==-1)return!1;if(t[0]==='"'&&t[t.length-1]==='"')return t=t.slice(1,t.length-1),e.allow_utf8_local_part?P.test(t):C.test(t);for(var N=e.allow_utf8_local_part?M:U,E=t.split("."),b=0;b<E.length;b++)if(!N.test(E[b]))return!1;return!0}c.exports=i.default,c.exports.default=i.default})(h,h.exports)),h.exports}var J=Q();const X=H(J);export{X as i};
