@forbespro/lead-agent
Version:
Lead Chat Agent React Component
19 lines (18 loc) • 501 B
JavaScript
import { decodeNamedCharacterReference as o } from "./index130.js";
import { decodeNumericCharacterReference as a } from "./index127.js";
const n = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
function m(r) {
return r.replace(n, f);
}
function f(r, c, e) {
if (c)
return c;
if (e.charCodeAt(0) === 35) {
const t = e.charCodeAt(1), d = t === 120 || t === 88;
return a(e.slice(d ? 2 : 1), d ? 16 : 10);
}
return o(e) || r;
}
export {
m as decodeString
};