@npm_leadtech/legal-contracts-ui 0.59.0 → 0.59.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ContactBanner.js +22 -24
- package/dist/components/Header.d.ts +0 -9
- package/dist/components/Header.js +20 -29
- package/dist/components/Markdown.js +31 -31
- package/dist/shared/hooks/useScroll.js +15 -0
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.js +0 -62
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.js +0 -11
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.js +0 -106
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.js +0 -13
- package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js +0 -20
- package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.js +0 -5
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.js +0 -38
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.js +0 -245
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/.pnpm/hast-util-from-parse5@8.0.3/node_modules/hast-util-from-parse5/lib/index.js +0 -145
- package/dist/node_modules/.pnpm/hast-util-parse-selector@4.0.0/node_modules/hast-util-parse-selector/lib/index.js +0 -20
- package/dist/node_modules/.pnpm/hast-util-raw@9.1.0/node_modules/hast-util-raw/lib/index.js +0 -217
- package/dist/node_modules/.pnpm/hast-util-to-parse5@8.0.1/node_modules/hast-util-to-parse5/lib/index.js +0 -118
- package/dist/node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/create-h.js +0 -112
- package/dist/node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/index.js +0 -8
- package/dist/node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -44
- package/dist/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js +0 -25
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/doctype.js +0 -98
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.js +0 -7
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.js +0 -210
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.js +0 -250
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.js +0 -14
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/unicode.js +0 -73
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.js +0 -84
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.js +0 -2271
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.js +0 -240
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.js +0 -2
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.js +0 -1940
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -88
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/default.js +0 -162
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js +0 -12
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js +0 -61
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.js +0 -33
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js +0 -368
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js +0 -6
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.js +0 -566
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js +0 -19
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js +0 -36
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js +0 -28
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js +0 -10
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js +0 -21
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js +0 -14
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.js +0 -19
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.js +0 -11
- package/dist/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.js +0 -11
- package/dist/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js +0 -12
- package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js +0 -11
- package/dist/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js +0 -91
- package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js +0 -17
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js +0 -6
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js +0 -56
- package/dist/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js +0 -16
- package/dist/node_modules/.pnpm/vfile-location@5.0.3/node_modules/vfile-location/lib/index.js +0 -42
- package/dist/node_modules/.pnpm/web-namespaces@2.0.1/node_modules/web-namespaces/index.js +0 -11
- package/dist/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js +0 -18
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
t && /* @__PURE__ */ e("span", { className: "hidden sm:block", children: t }),
|
|
21
|
-
a && /* @__PURE__ */ e("span", { children: a })
|
|
3
|
+
import { useScroll as i } from "../shared/hooks/useScroll.js";
|
|
4
|
+
import { InfoIcon as c } from "./InfoIcon.js";
|
|
5
|
+
const h = ({ contactText: s, phoneNumber: l, contactHoursText: t, contactHours: a }) => {
|
|
6
|
+
const n = i(10);
|
|
7
|
+
return /* @__PURE__ */ e(
|
|
8
|
+
"section",
|
|
9
|
+
{
|
|
10
|
+
className: `flex w-full justify-center border-b border-neutral-200 bg-neutral-50 px-4 transition-all duration-500 ease-in-out ${n ? "h-0 py-0" : "h-8.75 py-2"}`,
|
|
11
|
+
children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center justify-center gap-4 text-center text-neutral-900 md:text-left", children: [
|
|
12
|
+
s && /* @__PURE__ */ e("p", { className: "text-small hidden sm:block", children: s }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(c, {}) }),
|
|
14
|
+
l && /* @__PURE__ */ e("a", { href: `tel:${l}`, className: "text-small block font-bold sm:hidden", children: l }),
|
|
15
|
+
l && /* @__PURE__ */ e("p", { className: "text-small hidden font-bold sm:block", children: l }),
|
|
16
|
+
/* @__PURE__ */ r("div", { className: "text-small flex items-center gap-1", children: [
|
|
17
|
+
t && /* @__PURE__ */ e("span", { className: "hidden sm:block", children: t }),
|
|
18
|
+
a && /* @__PURE__ */ e("span", { children: a })
|
|
19
|
+
] })
|
|
22
20
|
] })
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
26
24
|
export {
|
|
27
|
-
|
|
25
|
+
h as ContactBanner
|
|
28
26
|
};
|
|
@@ -2,14 +2,6 @@ import { FC } from 'react';
|
|
|
2
2
|
import * as React_2 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
|
-
export interface ContactBannerProps {
|
|
6
|
-
contactText?: string;
|
|
7
|
-
phoneNumber?: string;
|
|
8
|
-
contactHoursText?: string;
|
|
9
|
-
contactHours?: string;
|
|
10
|
-
isScrolled?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
5
|
export interface FormattedLanguageItem {
|
|
14
6
|
code: string;
|
|
15
7
|
name: string;
|
|
@@ -26,7 +18,6 @@ export declare interface HeaderProps {
|
|
|
26
18
|
languageSelectorProps?: LanguageSelectorProps;
|
|
27
19
|
userActions: ReactNode;
|
|
28
20
|
mobileMenu: Omit<MobileMenuProps, 'logo' | 'userActions' | 'searchBarProps'>;
|
|
29
|
-
contactBannerProps: Omit<ContactBannerProps, 'isScrolled'>;
|
|
30
21
|
}
|
|
31
22
|
|
|
32
23
|
export interface LanguageSelectorProps {
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { NavMenu as
|
|
6
|
-
import { LanguageSelector as
|
|
7
|
-
import { ScalatorIcon as
|
|
8
|
-
import { SearchBar as
|
|
9
|
-
const
|
|
2
|
+
import "react";
|
|
3
|
+
import { MobileMenu as o } from "./MobileMenu.js";
|
|
4
|
+
import { useScroll as c } from "../shared/hooks/useScroll.js";
|
|
5
|
+
import { NavMenu as s } from "./NavMenu.js";
|
|
6
|
+
import { LanguageSelector as p } from "./LanguageSelector.js";
|
|
7
|
+
import { ScalatorIcon as x } from "./ScalatorIcon.js";
|
|
8
|
+
import { SearchBar as f } from "./SearchBar.js";
|
|
9
|
+
const j = ({
|
|
10
10
|
logo: l,
|
|
11
11
|
navMenu: d,
|
|
12
|
-
searchBarProps:
|
|
13
|
-
languageSelectorProps:
|
|
12
|
+
searchBarProps: i,
|
|
13
|
+
languageSelectorProps: a,
|
|
14
14
|
userActions: n,
|
|
15
|
-
mobileMenu: t
|
|
16
|
-
contactBannerProps: c
|
|
15
|
+
mobileMenu: t
|
|
17
16
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
const s = () => {
|
|
21
|
-
m(window.scrollY > 10);
|
|
22
|
-
};
|
|
23
|
-
return window.addEventListener("scroll", s, { passive: !0 }), () => {
|
|
24
|
-
window.removeEventListener("scroll", s);
|
|
25
|
-
};
|
|
26
|
-
}, []), /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
|
|
27
|
-
/* @__PURE__ */ e(x, { isScrolled: o, ...c }),
|
|
17
|
+
const m = c(10);
|
|
18
|
+
return /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
|
|
28
19
|
/* @__PURE__ */ e(
|
|
29
20
|
"header",
|
|
30
21
|
{
|
|
31
|
-
className: `transition-colors duration-300 ease-in-out ${
|
|
22
|
+
className: `transition-colors duration-300 ease-in-out ${m ? "bg-white shadow-md" : "bg-primary-50"}`,
|
|
32
23
|
children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
|
|
33
24
|
/* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
|
|
34
25
|
l,
|
|
35
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e(s, { className: "hidden lg:block", ...d })
|
|
36
27
|
] }),
|
|
37
28
|
/* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
|
|
29
|
+
/* @__PURE__ */ e(f, { ...i }),
|
|
30
|
+
a && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(p, { ...a }) }),
|
|
40
31
|
n
|
|
41
32
|
] }),
|
|
42
33
|
/* @__PURE__ */ r(
|
|
@@ -48,16 +39,16 @@ const O = ({
|
|
|
48
39
|
"aria-expanded": t.isOpen,
|
|
49
40
|
children: [
|
|
50
41
|
t.openText,
|
|
51
|
-
/* @__PURE__ */ e(
|
|
42
|
+
/* @__PURE__ */ e(x, {})
|
|
52
43
|
]
|
|
53
44
|
}
|
|
54
45
|
)
|
|
55
46
|
] })
|
|
56
47
|
}
|
|
57
48
|
),
|
|
58
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(o, { ...t, logo: l, userActions: n, searchBarProps: i })
|
|
59
50
|
] });
|
|
60
51
|
};
|
|
61
52
|
export {
|
|
62
|
-
|
|
53
|
+
j as Header
|
|
63
54
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import t from "react-markdown";
|
|
3
|
-
import i from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import g from "
|
|
3
|
+
import i from "rehype-raw";
|
|
4
|
+
import p from "remark-gfm";
|
|
5
|
+
import { Anchor as a } from "./Anchor.js";
|
|
6
|
+
import { Blockquote as d } from "./Blockquote.js";
|
|
7
|
+
import { Code as f } from "./Code.js";
|
|
8
|
+
import { Header1 as n } from "./Header1.js";
|
|
9
|
+
import { Header2 as l } from "./Header2.js";
|
|
10
|
+
import { Header3 as c } from "./Header3.js";
|
|
11
|
+
import { Header4 as s } from "./Header4.js";
|
|
12
|
+
import { OrderedList as h } from "./OrderedList.js";
|
|
13
|
+
import { Paragraph as u } from "./Paragraph.js";
|
|
14
|
+
import { TableRow as b, TableHeader as k, TableData as H, Table as w } from "./Table.js";
|
|
15
|
+
import { UnorderedList as T } from "./UnorderedList.js";
|
|
16
|
+
import { Video as g } from "./Video.js";
|
|
17
17
|
const z = ({ content: o, className: e = "", useCustom: m = !0 }) => /* @__PURE__ */ r("div", { className: e, children: /* @__PURE__ */ r(
|
|
18
18
|
t,
|
|
19
19
|
{
|
|
20
|
-
rehypePlugins: [
|
|
21
|
-
remarkPlugins: [
|
|
20
|
+
rehypePlugins: [i],
|
|
21
|
+
remarkPlugins: [p],
|
|
22
22
|
components: m ? {
|
|
23
|
-
h1:
|
|
24
|
-
h2:
|
|
25
|
-
h3:
|
|
26
|
-
h4:
|
|
27
|
-
p:
|
|
28
|
-
a
|
|
29
|
-
ul:
|
|
30
|
-
ol:
|
|
31
|
-
code:
|
|
32
|
-
blockquote:
|
|
33
|
-
video:
|
|
34
|
-
table:
|
|
35
|
-
td:
|
|
36
|
-
th:
|
|
37
|
-
tr:
|
|
23
|
+
h1: n,
|
|
24
|
+
h2: l,
|
|
25
|
+
h3: c,
|
|
26
|
+
h4: s,
|
|
27
|
+
p: u,
|
|
28
|
+
a,
|
|
29
|
+
ul: T,
|
|
30
|
+
ol: h,
|
|
31
|
+
code: f,
|
|
32
|
+
blockquote: d,
|
|
33
|
+
video: g,
|
|
34
|
+
table: w,
|
|
35
|
+
td: H,
|
|
36
|
+
th: k,
|
|
37
|
+
tr: b
|
|
38
38
|
} : void 0,
|
|
39
39
|
children: o
|
|
40
40
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState as l, useEffect as t } from "react";
|
|
2
|
+
const c = (e = 10) => {
|
|
3
|
+
const [o, s] = l(!1);
|
|
4
|
+
return t(() => {
|
|
5
|
+
const r = () => {
|
|
6
|
+
s(window.scrollY > e);
|
|
7
|
+
};
|
|
8
|
+
return window.addEventListener("scroll", r, { passive: !0 }), () => {
|
|
9
|
+
window.removeEventListener("scroll", r);
|
|
10
|
+
};
|
|
11
|
+
}, [e]), o;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as useScroll
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BIGINT as p, ERROR as I, SET as g, MAP as l, REGEXP as E, DATE as R, OBJECT as i, ARRAY as y, VOID as A, PRIMITIVE as b } from "./types.js";
|
|
2
|
-
const f = typeof self == "object" ? self : globalThis, B = (c, w) => {
|
|
3
|
-
const s = (e, o) => (c.set(o, e), e), a = (e) => {
|
|
4
|
-
if (c.has(e))
|
|
5
|
-
return c.get(e);
|
|
6
|
-
const [o, t] = w[e];
|
|
7
|
-
switch (o) {
|
|
8
|
-
case b:
|
|
9
|
-
case A:
|
|
10
|
-
return s(t, e);
|
|
11
|
-
case y: {
|
|
12
|
-
const r = s([], e);
|
|
13
|
-
for (const n of t)
|
|
14
|
-
r.push(a(n));
|
|
15
|
-
return r;
|
|
16
|
-
}
|
|
17
|
-
case i: {
|
|
18
|
-
const r = s({}, e);
|
|
19
|
-
for (const [n, u] of t)
|
|
20
|
-
r[a(n)] = a(u);
|
|
21
|
-
return r;
|
|
22
|
-
}
|
|
23
|
-
case R:
|
|
24
|
-
return s(new Date(t), e);
|
|
25
|
-
case E: {
|
|
26
|
-
const { source: r, flags: n } = t;
|
|
27
|
-
return s(new RegExp(r, n), e);
|
|
28
|
-
}
|
|
29
|
-
case l: {
|
|
30
|
-
const r = s(/* @__PURE__ */ new Map(), e);
|
|
31
|
-
for (const [n, u] of t)
|
|
32
|
-
r.set(a(n), a(u));
|
|
33
|
-
return r;
|
|
34
|
-
}
|
|
35
|
-
case g: {
|
|
36
|
-
const r = s(/* @__PURE__ */ new Set(), e);
|
|
37
|
-
for (const n of t)
|
|
38
|
-
r.add(a(n));
|
|
39
|
-
return r;
|
|
40
|
-
}
|
|
41
|
-
case I: {
|
|
42
|
-
const { name: r, message: n } = t;
|
|
43
|
-
return s(new f[r](n), e);
|
|
44
|
-
}
|
|
45
|
-
case p:
|
|
46
|
-
return s(BigInt(t), e);
|
|
47
|
-
case "BigInt":
|
|
48
|
-
return s(Object(BigInt(t)), e);
|
|
49
|
-
case "ArrayBuffer":
|
|
50
|
-
return s(new Uint8Array(t).buffer, t);
|
|
51
|
-
case "DataView": {
|
|
52
|
-
const { buffer: r } = new Uint8Array(t);
|
|
53
|
-
return s(new DataView(r), t);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return s(new f[o](t), e);
|
|
57
|
-
};
|
|
58
|
-
return a;
|
|
59
|
-
}, m = (c) => B(/* @__PURE__ */ new Map(), c)(0);
|
|
60
|
-
export {
|
|
61
|
-
m as deserialize
|
|
62
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { deserialize as t } from "./deserialize.js";
|
|
2
|
-
import { serialize as u } from "./serialize.js";
|
|
3
|
-
const s = typeof structuredClone == "function" ? (
|
|
4
|
-
/* c8 ignore start */
|
|
5
|
-
(r, e) => e && ("json" in e || "lossy" in e) ? t(u(r, e)) : structuredClone(r)
|
|
6
|
-
) : (r, e) => t(u(r, e));
|
|
7
|
-
export {
|
|
8
|
-
s as default,
|
|
9
|
-
t as deserialize,
|
|
10
|
-
u as serialize
|
|
11
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { SET as w, MAP as O, REGEXP as A, DATE as I, OBJECT as S, ARRAY as E, PRIMITIVE as b, BIGINT as T, ERROR as m, VOID as x } from "./types.js";
|
|
2
|
-
const p = "", { toString: k } = {}, { keys: B } = Object, g = (c) => {
|
|
3
|
-
const f = typeof c;
|
|
4
|
-
if (f !== "object" || !c)
|
|
5
|
-
return [b, f];
|
|
6
|
-
const s = k.call(c).slice(8, -1);
|
|
7
|
-
switch (s) {
|
|
8
|
-
case "Array":
|
|
9
|
-
return [E, p];
|
|
10
|
-
case "Object":
|
|
11
|
-
return [S, p];
|
|
12
|
-
case "Date":
|
|
13
|
-
return [I, p];
|
|
14
|
-
case "RegExp":
|
|
15
|
-
return [A, p];
|
|
16
|
-
case "Map":
|
|
17
|
-
return [O, p];
|
|
18
|
-
case "Set":
|
|
19
|
-
return [w, p];
|
|
20
|
-
case "DataView":
|
|
21
|
-
return [E, s];
|
|
22
|
-
}
|
|
23
|
-
return s.includes("Array") ? [E, s] : s.includes("Error") ? [m, s] : [S, s];
|
|
24
|
-
}, u = ([c, f]) => c === b && (f === "function" || f === "symbol"), D = (c, f, s, h) => {
|
|
25
|
-
const o = (r, i) => {
|
|
26
|
-
const e = h.push(r) - 1;
|
|
27
|
-
return s.set(i, e), e;
|
|
28
|
-
}, y = (r) => {
|
|
29
|
-
if (s.has(r))
|
|
30
|
-
return s.get(r);
|
|
31
|
-
let [i, e] = g(r);
|
|
32
|
-
switch (i) {
|
|
33
|
-
case b: {
|
|
34
|
-
let t = r;
|
|
35
|
-
switch (e) {
|
|
36
|
-
case "bigint":
|
|
37
|
-
i = T, t = r.toString();
|
|
38
|
-
break;
|
|
39
|
-
case "function":
|
|
40
|
-
case "symbol":
|
|
41
|
-
if (c)
|
|
42
|
-
throw new TypeError("unable to serialize " + e);
|
|
43
|
-
t = null;
|
|
44
|
-
break;
|
|
45
|
-
case "undefined":
|
|
46
|
-
return o([x], r);
|
|
47
|
-
}
|
|
48
|
-
return o([i, t], r);
|
|
49
|
-
}
|
|
50
|
-
case E: {
|
|
51
|
-
if (e) {
|
|
52
|
-
let n = r;
|
|
53
|
-
return e === "DataView" ? n = new Uint8Array(r.buffer) : e === "ArrayBuffer" && (n = new Uint8Array(r)), o([e, [...n]], r);
|
|
54
|
-
}
|
|
55
|
-
const t = [], a = o([i, t], r);
|
|
56
|
-
for (const n of r)
|
|
57
|
-
t.push(y(n));
|
|
58
|
-
return a;
|
|
59
|
-
}
|
|
60
|
-
case S: {
|
|
61
|
-
if (e)
|
|
62
|
-
switch (e) {
|
|
63
|
-
case "BigInt":
|
|
64
|
-
return o([e, r.toString()], r);
|
|
65
|
-
case "Boolean":
|
|
66
|
-
case "Number":
|
|
67
|
-
case "String":
|
|
68
|
-
return o([e, r.valueOf()], r);
|
|
69
|
-
}
|
|
70
|
-
if (f && "toJSON" in r)
|
|
71
|
-
return y(r.toJSON());
|
|
72
|
-
const t = [], a = o([i, t], r);
|
|
73
|
-
for (const n of B(r))
|
|
74
|
-
(c || !u(g(r[n]))) && t.push([y(n), y(r[n])]);
|
|
75
|
-
return a;
|
|
76
|
-
}
|
|
77
|
-
case I:
|
|
78
|
-
return o([i, r.toISOString()], r);
|
|
79
|
-
case A: {
|
|
80
|
-
const { source: t, flags: a } = r;
|
|
81
|
-
return o([i, { source: t, flags: a }], r);
|
|
82
|
-
}
|
|
83
|
-
case O: {
|
|
84
|
-
const t = [], a = o([i, t], r);
|
|
85
|
-
for (const [n, d] of r)
|
|
86
|
-
(c || !(u(g(n)) || u(g(d)))) && t.push([y(n), y(d)]);
|
|
87
|
-
return a;
|
|
88
|
-
}
|
|
89
|
-
case w: {
|
|
90
|
-
const t = [], a = o([i, t], r);
|
|
91
|
-
for (const n of r)
|
|
92
|
-
(c || !u(g(n))) && t.push(y(n));
|
|
93
|
-
return a;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
const { message: R } = r;
|
|
97
|
-
return o([i, { name: e, message: R }], r);
|
|
98
|
-
};
|
|
99
|
-
return y;
|
|
100
|
-
}, P = (c, { json: f, lossy: s } = {}) => {
|
|
101
|
-
const h = [];
|
|
102
|
-
return D(!(f || s), !!f, /* @__PURE__ */ new Map(), h)(c), h;
|
|
103
|
-
};
|
|
104
|
-
export {
|
|
105
|
-
P as serialize
|
|
106
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
function f(n) {
|
|
2
|
-
const e = [], t = String(n || "");
|
|
3
|
-
let i = t.indexOf(","), o = 0, s = !1;
|
|
4
|
-
for (; !s; ) {
|
|
5
|
-
i === -1 && (i = t.length, s = !0);
|
|
6
|
-
const r = t.slice(o, i).trim();
|
|
7
|
-
(r || !s) && e.push(r), o = i + 1, i = t.indexOf(",", o);
|
|
8
|
-
}
|
|
9
|
-
return e;
|
|
10
|
-
}
|
|
11
|
-
function p(n, e) {
|
|
12
|
-
const t = {};
|
|
13
|
-
return (n[n.length - 1] === "" ? [...n, ""] : n).join(
|
|
14
|
-
(t.padRight ? " " : "") + "," + (t.padLeft === !1 ? "" : " ")
|
|
15
|
-
).trim();
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
f as parse,
|
|
19
|
-
p as stringify
|
|
20
|
-
};
|
package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const a = /* @__PURE__ */ new Map([
|
|
2
|
-
[0, 65533],
|
|
3
|
-
// C1 Unicode control character reference replacements
|
|
4
|
-
[128, 8364],
|
|
5
|
-
[130, 8218],
|
|
6
|
-
[131, 402],
|
|
7
|
-
[132, 8222],
|
|
8
|
-
[133, 8230],
|
|
9
|
-
[134, 8224],
|
|
10
|
-
[135, 8225],
|
|
11
|
-
[136, 710],
|
|
12
|
-
[137, 8240],
|
|
13
|
-
[138, 352],
|
|
14
|
-
[139, 8249],
|
|
15
|
-
[140, 338],
|
|
16
|
-
[142, 381],
|
|
17
|
-
[145, 8216],
|
|
18
|
-
[146, 8217],
|
|
19
|
-
[147, 8220],
|
|
20
|
-
[148, 8221],
|
|
21
|
-
[149, 8226],
|
|
22
|
-
[150, 8211],
|
|
23
|
-
[151, 8212],
|
|
24
|
-
[152, 732],
|
|
25
|
-
[153, 8482],
|
|
26
|
-
[154, 353],
|
|
27
|
-
[155, 8250],
|
|
28
|
-
[156, 339],
|
|
29
|
-
[158, 382],
|
|
30
|
-
[159, 376]
|
|
31
|
-
]);
|
|
32
|
-
function n(r) {
|
|
33
|
-
var e;
|
|
34
|
-
return r >= 55296 && r <= 57343 || r > 1114111 ? 65533 : (e = a.get(r)) !== null && e !== void 0 ? e : r;
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
n as replaceCodePoint
|
|
38
|
-
};
|