Skip to content

Commit 67e21de

Browse files
committed
chore(dist): Updates dist files
1 parent 4e073c0 commit 67e21de

File tree

3 files changed

+67
-74
lines changed

3 files changed

+67
-74
lines changed

dist/psl.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/psl.mjs

Lines changed: 65 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
function $(e) {
1+
function U(e) {
22
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
33
}
4-
var O, H;
5-
function J() {
6-
if (H) return O;
7-
H = 1;
8-
const e = 2147483647, s = 36, c = 1, o = 26, t = 38, d = 700, z = 72, y = 128, g = "-", N = /^xn--/, R = /[^\0-\x7F]/, P = /[\x2E\u3002\uFF0E\uFF61]/g, V = {
4+
var C, F;
5+
function $() {
6+
if (F) return C;
7+
F = 1;
8+
const e = 2147483647, s = 36, c = 1, o = 26, t = 38, d = 700, z = 72, y = 128, g = "-", H = /^xn--/, N = /[^\0-\x7F]/, R = /[\x2E\u3002\uFF0E\uFF61]/g, P = {
99
overflow: "Overflow: input needs wider integers to process",
1010
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
1111
"invalid-input": "Invalid input"
12-
}, I = s - c, h = Math.floor, C = String.fromCharCode;
12+
}, _ = s - c, h = Math.floor, I = String.fromCharCode;
1313
function v(a) {
14-
throw new RangeError(V[a]);
14+
throw new RangeError(P[a]);
1515
}
16-
function G(a, i) {
16+
function V(a, i) {
1717
const m = [];
1818
let n = a.length;
1919
for (; n--; )
2020
m[n] = i(a[n]);
2121
return m;
2222
}
23-
function S(a, i) {
23+
function L(a, i) {
2424
const m = a.split("@");
2525
let n = "";
26-
m.length > 1 && (n = m[0] + "@", a = m[1]), a = a.replace(P, ".");
27-
const r = a.split("."), p = G(r, i).join(".");
26+
m.length > 1 && (n = m[0] + "@", a = m[1]), a = a.replace(R, ".");
27+
const r = a.split("."), p = V(r, i).join(".");
2828
return n + p;
2929
}
30-
function D(a) {
30+
function S(a) {
3131
const i = [];
3232
let m = 0;
3333
const n = a.length;
@@ -41,16 +41,16 @@ function J() {
4141
}
4242
return i;
4343
}
44-
const W = (a) => String.fromCodePoint(...a), U = function(a) {
44+
const G = (a) => String.fromCodePoint(...a), W = function(a) {
4545
return a >= 48 && a < 58 ? 26 + (a - 48) : a >= 65 && a < 91 ? a - 65 : a >= 97 && a < 123 ? a - 97 : s;
46-
}, T = function(a, i) {
46+
}, D = function(a, i) {
4747
return a + 22 + 75 * (a < 26) - ((i != 0) << 5);
48-
}, E = function(a, i, m) {
48+
}, T = function(a, i, m) {
4949
let n = 0;
50-
for (a = m ? h(a / d) : a >> 1, a += h(a / i); a > I * o >> 1; n += s)
51-
a = h(a / I);
52-
return h(n + (I + 1) * a / (a + t));
53-
}, B = function(a) {
50+
for (a = m ? h(a / d) : a >> 1, a += h(a / i); a > _ * o >> 1; n += s)
51+
a = h(a / _);
52+
return h(n + (_ + 1) * a / (a + t));
53+
}, E = function(a) {
5454
const i = [], m = a.length;
5555
let n = 0, r = y, p = z, j = a.lastIndexOf(g);
5656
j < 0 && (j = 0);
@@ -60,7 +60,7 @@ function J() {
6060
const k = n;
6161
for (let l = 1, b = s; ; b += s) {
6262
u >= m && v("invalid-input");
63-
const w = U(a.charCodeAt(u++));
63+
const w = W(a.charCodeAt(u++));
6464
w >= s && v("invalid-input"), w > h((e - n) / l) && v("overflow"), n += w * l;
6565
const x = b <= p ? c : b >= p + o ? o : b - p;
6666
if (w < x)
@@ -69,16 +69,16 @@ function J() {
6969
l > h(e / q) && v("overflow"), l *= q;
7070
}
7171
const f = i.length + 1;
72-
p = E(n - k, f, k == 0), h(n / f) > e - r && v("overflow"), r += h(n / f), n %= f, i.splice(n++, 0, r);
72+
p = T(n - k, f, k == 0), h(n / f) > e - r && v("overflow"), r += h(n / f), n %= f, i.splice(n++, 0, r);
7373
}
7474
return String.fromCodePoint(...i);
75-
}, M = function(a) {
75+
}, B = function(a) {
7676
const i = [];
77-
a = D(a);
77+
a = S(a);
7878
const m = a.length;
7979
let n = y, r = 0, p = z;
8080
for (const k of a)
81-
k < 128 && i.push(C(k));
81+
k < 128 && i.push(I(k));
8282
const j = i.length;
8383
let u = j;
8484
for (j && i.push(g); u < m; ) {
@@ -94,18 +94,18 @@ function J() {
9494
const x = w <= p ? c : w >= p + o ? o : w - p;
9595
if (b < x)
9696
break;
97-
const q = b - x, F = s - x;
97+
const q = b - x, M = s - x;
9898
i.push(
99-
C(T(x + q % F, 0))
100-
), b = h(q / F);
99+
I(D(x + q % M, 0))
100+
), b = h(q / M);
101101
}
102-
i.push(C(T(b, 0))), p = E(r, f, u === j), r = 0, ++u;
102+
i.push(I(D(b, 0))), p = T(r, f, u === j), r = 0, ++u;
103103
}
104104
++r, ++n;
105105
}
106106
return i.join("");
107107
};
108-
return O = {
108+
return C = {
109109
/**
110110
* A string representing the current Punycode.js version number.
111111
* @memberOf punycode
@@ -120,25 +120,25 @@ function J() {
120120
* @type Object
121121
*/
122122
ucs2: {
123-
decode: D,
124-
encode: W
123+
decode: S,
124+
encode: G
125125
},
126-
decode: B,
127-
encode: M,
126+
decode: E,
127+
encode: B,
128128
toASCII: function(a) {
129-
return S(a, function(i) {
130-
return R.test(i) ? "xn--" + M(i) : i;
129+
return L(a, function(i) {
130+
return N.test(i) ? "xn--" + B(i) : i;
131131
});
132132
},
133133
toUnicode: function(a) {
134-
return S(a, function(i) {
135-
return N.test(i) ? B(i.slice(4).toLowerCase()) : i;
134+
return L(a, function(i) {
135+
return H.test(i) ? E(i.slice(4).toLowerCase()) : i;
136136
});
137137
}
138-
}, O;
138+
}, C;
139139
}
140-
var K = J();
141-
const A = /* @__PURE__ */ $(K), Q = [
140+
var J = $();
141+
const A = /* @__PURE__ */ U(J), K = [
142142
"ac",
143143
"com.ac",
144144
"edu.ac",
@@ -9915,9 +9915,7 @@ const A = /* @__PURE__ */ $(K), Q = [
99159915
"basicserver.io",
99169916
"virtualserver.io",
99179917
"enterprisecloud.nu"
9918-
];
9919-
var _ = {};
9920-
const X = Q.reduce(
9918+
], Q = K.reduce(
99219919
(e, s) => {
99229920
const c = s.replace(/^(\*\.|\!)/, ""), o = A.toASCII(c), t = s.charAt(0);
99239921
if (e.has(o))
@@ -9931,31 +9929,31 @@ const X = Q.reduce(
99319929
}), e;
99329930
},
99339931
/* @__PURE__ */ new Map()
9934-
);
9935-
_.findRule = function(e) {
9936-
for (var s = A.toASCII(e), c = s.split("."), o = 0; o < c.length; o++) {
9937-
var t = c.slice(o).join("."), d = X.get(t);
9932+
), X = (e) => {
9933+
const c = A.toASCII(e).split(".");
9934+
for (let o = 0; o < c.length; o++) {
9935+
const t = c.slice(o).join("."), d = Q.get(t);
99389936
if (d)
99399937
return d;
99409938
}
99419939
return null;
9942-
};
9943-
const Y = {
9940+
}, Y = {
99449941
DOMAIN_TOO_SHORT: "Domain name too short.",
99459942
DOMAIN_TOO_LONG: "Domain name too long. It should be no more than 255 chars.",
99469943
LABEL_STARTS_WITH_DASH: "Domain name label can not start with a dash.",
99479944
LABEL_ENDS_WITH_DASH: "Domain name label can not end with a dash.",
99489945
LABEL_TOO_LONG: "Domain name label should be at most 63 chars long.",
99499946
LABEL_TOO_SHORT: "Domain name label should be at least 1 character long.",
99509947
LABEL_INVALID_CHARS: "Domain name label can only contain alphanumeric characters or dashes."
9951-
};
9952-
_.validate = function(e) {
9953-
var s = A.toASCII(e);
9948+
}, Z = (e) => {
9949+
const s = A.toASCII(e);
99549950
if (s.length < 1)
99559951
return "DOMAIN_TOO_SHORT";
99569952
if (s.length > 255)
99579953
return "DOMAIN_TOO_LONG";
9958-
for (var c = s.split("."), o, t = 0; t < c.length; ++t) {
9954+
const c = s.split(".");
9955+
let o;
9956+
for (let t = 0; t < c.length; ++t) {
99599957
if (o = c[t], !o.length)
99609958
return "LABEL_TOO_SHORT";
99619959
if (o.length > 63)
@@ -9967,13 +9965,12 @@ _.validate = function(e) {
99679965
if (!/^[a-z0-9\-_]+$/.test(o))
99689966
return "LABEL_INVALID_CHARS";
99699967
}
9970-
};
9971-
const L = function(e) {
9968+
}, O = (e) => {
99729969
if (typeof e != "string")
99739970
throw new TypeError("Domain name must be a string.");
9974-
var s = e.slice(0).toLowerCase();
9971+
let s = e.slice(0).toLowerCase();
99759972
s.charAt(s.length - 1) === "." && (s = s.slice(0, s.length - 1));
9976-
var c = _.validate(s);
9973+
const c = Z(s);
99779974
if (c)
99789975
return {
99799976
input: e,
@@ -9982,7 +9979,7 @@ const L = function(e) {
99829979
code: c
99839980
}
99849981
};
9985-
var o = {
9982+
const o = {
99869983
input: e,
99879984
tld: null,
99889985
sld: null,
@@ -9992,24 +9989,20 @@ const L = function(e) {
99929989
}, t = s.split(".");
99939990
if (t[t.length - 1] === "local")
99949991
return o;
9995-
var d = function() {
9996-
return /xn--/.test(s) && (o.domain && (o.domain = A.toASCII(o.domain)), o.subdomain && (o.subdomain = A.toASCII(o.subdomain))), o;
9997-
}, z = _.findRule(s);
9992+
const d = () => (/xn--/.test(s) && (o.domain && (o.domain = A.toASCII(o.domain)), o.subdomain && (o.subdomain = A.toASCII(o.subdomain))), o), z = X(s);
99989993
if (!z)
99999994
return t.length < 2 ? o : (o.tld = t.pop(), o.sld = t.pop(), o.domain = [o.sld, o.tld].join("."), t.length && (o.subdomain = t.pop()), d());
100009995
o.listed = !0;
10001-
var y = z.suffix.split("."), g = t.slice(0, t.length - y.length);
9996+
const y = z.suffix.split("."), g = t.slice(0, t.length - y.length);
100029997
return z.exception && g.push(y.shift()), o.tld = y.join("."), !g.length || (z.wildcard && (y.unshift(g.pop()), o.tld = y.join(".")), !g.length) || (o.sld = g.pop(), o.domain = [o.sld, o.tld].join("."), g.length && (o.subdomain = g.join("."))), d();
10003-
}, Z = function(e) {
10004-
return e && L(e).domain || null;
10005-
}, aa = function(e) {
10006-
var s = L(e);
9998+
}, aa = (e) => e && O(e).domain || null, oa = (e) => {
9999+
const s = O(e);
1000710000
return !!(s.domain && s.listed);
10008-
}, ea = { parse: L, get: Z, isValid: aa };
10001+
}, na = { parse: O, get: aa, isValid: oa };
1000910002
export {
10010-
ea as default,
10003+
na as default,
1001110004
Y as errorCodes,
10012-
Z as get,
10013-
aa as isValid,
10014-
L as parse
10005+
aa as get,
10006+
oa as isValid,
10007+
O as parse
1001510008
};

dist/psl.umd.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)