import{g as Y}from"./vendor-react-DX7tU9aY.js";import{r as $,a as ee,b as re,c as te,d as ae}from"./isIP-BBY240SU.js";var p={exports:{}},g={exports:{}},P;function le(){return P||(P=1,(function(_,f){Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var m=function(v,q){return v.indexOf(q)!==-1};f.default=m,_.exports=f.default,_.exports.default=f.default})(g,g.exports)),g.exports}var k;function ie(){return k||(k=1,(function(_,f){Object.defineProperty(f,"__esModule",{value:!0}),f.default=N;var m=o($()),y=o(re()),v=o(le()),q=o(ae()),I=o(te()),M=o(ee());function o(e){return e&&e.__esModule?e:{default:e}}function T(e,r){return z(e)||F(e,r)||D(e,r)||C()}function C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(e,r){if(e){if(typeof e=="string")return A(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,r):void 0}}function A(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function F(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,l,c,u,i=[],a=!0,s=!1;try{if(c=(t=t.call(e)).next,r!==0)for(;!(a=(n=c.call(t)).done)&&(i.push(n.value),i.length!==r);a=!0);}catch(d){s=!0,l=d}finally{try{if(!a&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(s)throw l}}return i}}function z(e){if(Array.isArray(e))return e}var E={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},H=/^\[([^\]]+)\](?::([0-9]+))?$/;function N(e,r){if((0,m.default)(e),!e||/[\s<>]/.test(e)||e.indexOf("mailto:")===0||(r=(0,M.default)(r,E),r.validate_length&&e.length>r.max_allowed_length)||!r.allow_fragments&&(0,v.default)(e,"#")||!r.allow_query_components&&((0,v.default)(e,"?")||(0,v.default)(e,"&")))return!1;var t,n,l,c,u,i,a,s;a=e.split("#"),e=a.shift(),a=e.split("?"),e=a.shift();var d=e.match(/^([a-z][a-z0-9+\-.]*):/i),S=!1,b=function(X){return S=!0,t=X.toLowerCase(),r.require_valid_protocol&&r.protocols.indexOf(t)===-1?!1:e.substring(d[0].length)};if(d){var w=d[1],h=e.substring(d[0].length),Q=h.slice(0,2)==="//";if(Q){if(e=b(w),e===!1)return!1}else{var O=h.indexOf("/"),R=O===-1?h:h.substring(0,O),L=R.indexOf("@");if(L!==-1){var U=R.substring(0,L),W=/^[a-zA-Z0-9\-_.%:]*$/,Z=W.test(U),B=/%[0-9a-fA-F]{2}/.test(U);if(Z&&!B){if(r.require_protocol)return!1}else if(e=b(w),e===!1)return!1}else{var G=/^[0-9]/.test(h);if(G){if(r.require_protocol)return!1}else if(e=b(w),e===!1)return!1}}}else if(r.require_protocol)return!1;if(e.slice(0,2)==="//"){if(!S&&!r.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(e==="")return!1;if(a=e.split("/"),e=a.shift(),e===""&&!r.require_host)return!0;if(a=e.split("@"),a.length>1){if(r.disallow_auth||a[0]===""||(n=a.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;var J=n.split(":"),j=T(J,2),K=j[0],V=j[1];if(K===""&&V==="")return!1}c=a.join("@"),i=null,s=null;var x=c.match(H);if(x?(l="",s=x[1],i=x[2]||null):(a=c.split(":"),l=a.shift(),a.length&&(i=a.join(":"))),i!==null&&i.length>0){if(u=parseInt(i,10),!/^[0-9]+$/.test(i)||u<=0||u>65535)return!1}else if(r.require_port)return!1;return r.host_whitelist?(0,y.default)(l,r.host_whitelist):l===""&&!r.require_host?!0:!(!(0,I.default)(l)&&!(0,q.default)(l,r)&&(!s||!(0,I.default)(s,6))||(l=l||s,r.host_blacklist&&(0,y.default)(l,r.host_blacklist)))}_.exports=f.default,_.exports.default=f.default})(p,p.exports)),p.exports}var fe=ie();const oe=Y(fe);export{oe as i};
