@phillips/seldon 1.65.0 → 1.67.0
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/_virtual/attributes-to-props.js +4 -0
- package/dist/_virtual/constants.js +4 -0
- package/dist/_virtual/dom-to-react.js +4 -0
- package/dist/_virtual/domparser.js +4 -0
- package/dist/_virtual/html-to-dom.js +4 -0
- package/dist/_virtual/index10.js +4 -0
- package/dist/_virtual/index11.js +4 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/_virtual/index8.js +4 -0
- package/dist/_virtual/index9.js +4 -0
- package/dist/_virtual/node.js +4 -0
- package/dist/_virtual/possibleStandardNamesOptimized.js +4 -0
- package/dist/_virtual/utilities.js +4 -0
- package/dist/_virtual/utilities2.js +4 -0
- package/dist/_virtual/utilities3.js +4 -0
- package/dist/components/HTMLParser/HTMLParser.d.ts +24 -0
- package/dist/components/HTMLParser/HTMLParser.js +21 -0
- package/dist/components/HTMLParser/index.d.ts +1 -0
- package/dist/components/HTMLParser/utils.d.ts +7 -0
- package/dist/components/HTMLParser/utils.js +31 -0
- package/dist/components/Search/Search.js +23 -22
- package/dist/components/Search/SearchResults/SearchResults.d.ts +2 -1
- package/dist/components/Search/SearchResults/SearchResults.js +26 -16
- package/dist/components/Text/Text.d.ts +1 -2
- package/dist/components/Text/Text.js +13 -23
- package/dist/components/TextSymbol/TextSymbol.d.ts +9 -0
- package/dist/components/TextSymbol/TextSymbol.js +11 -0
- package/dist/components/TextSymbol/index.d.ts +2 -0
- package/dist/components/TextSymbol/types.d.ts +4 -0
- package/dist/components/TextSymbol/types.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +76 -72
- package/dist/node_modules/domelementtype/lib/index.js +12 -0
- package/dist/node_modules/domhandler/lib/index.js +84 -0
- package/dist/node_modules/domhandler/lib/node.js +356 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +522 -0
- package/dist/node_modules/html-dom-parser/lib/client/constants.js +38 -0
- package/dist/node_modules/html-dom-parser/lib/client/domparser.js +56 -0
- package/dist/node_modules/html-dom-parser/lib/client/html-to-dom.js +20 -0
- package/dist/node_modules/html-dom-parser/lib/client/utilities.js +55 -0
- package/dist/node_modules/html-react-parser/esm/index.js +7 -0
- package/dist/node_modules/html-react-parser/lib/attributes-to-props.js +40 -0
- package/dist/node_modules/html-react-parser/lib/dom-to-react.js +60 -0
- package/dist/node_modules/html-react-parser/lib/index.js +42 -0
- package/dist/node_modules/html-react-parser/lib/utilities.js +58 -0
- package/dist/node_modules/inline-style-parser/index.js +86 -0
- package/dist/node_modules/react-property/lib/index.js +440 -0
- package/dist/node_modules/react-property/lib/possibleStandardNamesOptimized.js +493 -0
- package/dist/node_modules/style-to-js/cjs/index.js +19 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +16 -0
- package/dist/node_modules/style-to-object/cjs/index.js +21 -0
- package/dist/patterns/Subscribe/Subscribe.d.ts +1 -1
- package/dist/patterns/Subscribe/Subscribe.js +40 -38
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Dropdown/_dropdown.scss +2 -1
- package/dist/scss/components/Input/_input.scss +3 -1
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +4 -0
- package/dist/scss/components/Search/_search.scss +17 -2
- package/dist/scss/components/Search/_searchButton.scss +15 -5
- package/dist/scss/components/Text/_text.scss +0 -5
- package/dist/scss/components/TextSymbol/_textSymbol.scss +14 -0
- package/dist/scss/site-furniture/Header/_header.scss +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PaddingTokens as f, SpacingTokens as
|
|
2
|
-
import { default as
|
|
1
|
+
import { PaddingTokens as f, SpacingTokens as l, defaultYear as p, emailValidation as s, encodeURLSearchParams as m, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as x, getCommonProps as i, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
|
+
import { default as C } from "./pages/Page.js";
|
|
3
3
|
import { default as P } from "./components/Button/Button.js";
|
|
4
|
-
import { ButtonVariants as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
4
|
+
import { ButtonVariants as b } from "./components/Button/types.js";
|
|
5
|
+
import { default as k } from "./components/IconButton/IconButton.js";
|
|
6
|
+
import { default as B } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
7
|
import { default as h } from "./site-furniture/Footer/Footer.js";
|
|
8
8
|
import { Grid as w } from "./components/Grid/Grid.js";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as A } from "./site-furniture/Header/Header.js";
|
|
10
10
|
import { default as G } from "./components/Navigation/Navigation.js";
|
|
11
11
|
import { default as H } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
12
12
|
import { default as O } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
@@ -20,68 +20,70 @@ import { default as _ } from "./components/LinkList/LinkList.js";
|
|
|
20
20
|
import { default as ee } from "./components/Row/Row.js";
|
|
21
21
|
import { default as re } from "./components/GridItem/GridItem.js";
|
|
22
22
|
import { GridItemAlign as ae } from "./components/GridItem/types.js";
|
|
23
|
-
import { default as
|
|
23
|
+
import { default as le } from "./components/Search/Search.js";
|
|
24
24
|
import { default as se } from "./components/Select/Select.js";
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { SubscriptionState as
|
|
25
|
+
import { default as de } from "./components/SplitPanel/SplitPanel.js";
|
|
26
|
+
import { default as xe } from "./patterns/Subscribe/Subscribe.js";
|
|
27
|
+
import { SubscriptionState as ne } from "./patterns/Subscribe/types.js";
|
|
28
28
|
import { default as ce } from "./patterns/Social/Social.js";
|
|
29
|
-
import { default as
|
|
29
|
+
import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
|
|
30
30
|
import { default as Pe } from "./components/Modal/Modal.js";
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
31
|
+
import { default as be } from "./components/Drawer/Drawer.js";
|
|
32
|
+
import { default as ke } from "./components/Pagination/Pagination.js";
|
|
33
|
+
import { default as Be } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
34
34
|
import { TextVariants as he } from "./components/Text/types.js";
|
|
35
35
|
import { default as we } from "./components/Text/Text.js";
|
|
36
|
-
import {
|
|
37
|
-
import { default as Ge } from "./components/
|
|
38
|
-
import { default as He } from "./
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
36
|
+
import { TextSymbolVariants as Ae } from "./components/TextSymbol/types.js";
|
|
37
|
+
import { default as Ge } from "./components/TextSymbol/TextSymbol.js";
|
|
38
|
+
import { default as He } from "./components/Accordion/Accordion.js";
|
|
39
|
+
import { default as Oe } from "./components/Accordion/AccordionItem.js";
|
|
40
|
+
import { default as Ue } from "./patterns/UserManagement/UserManagement.js";
|
|
41
|
+
import { AuthState as Fe } from "./patterns/UserManagement/types.js";
|
|
42
|
+
import { SupportedLanguages as Ye } from "./types/commonTypes.js";
|
|
43
|
+
import { default as qe } from "./components/Breadcrumb/Breadcrumb.js";
|
|
42
44
|
import "react/jsx-runtime";
|
|
43
45
|
import "./node_modules/classnames/index.js";
|
|
44
46
|
import "react";
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { SeldonProvider as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
47
|
+
import { default as Ke } from "./components/Dropdown/Dropdown.js";
|
|
48
|
+
import { default as Xe } from "./components/Video/Video.js";
|
|
49
|
+
import { default as _e } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
50
|
+
import { default as eo } from "./components/ContentPeek/ContentPeek.js";
|
|
51
|
+
import { default as ro } from "./components/Collapsible/Collapsible.js";
|
|
52
|
+
import { default as ao } from "./components/Collapsible/CollapsibleContent.js";
|
|
53
|
+
import { default as lo } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
54
|
+
import { SeldonProvider as so } from "./providers/SeldonProvider.js";
|
|
55
|
+
import { default as uo } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
56
|
+
import { default as io } from "./components/Carousel/Carousel.js";
|
|
57
|
+
import { default as go } from "./components/Carousel/CarouselContent.js";
|
|
58
|
+
import { default as So } from "./components/Carousel/CarouselItem.js";
|
|
59
|
+
import { default as Lo } from "./components/Carousel/CarouselDots.js";
|
|
58
60
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
He as Accordion,
|
|
62
|
+
Oe as AccordionItem,
|
|
63
|
+
Fe as AuthState,
|
|
64
|
+
qe as Breadcrumb,
|
|
63
65
|
P as Button,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
b as ButtonVariants,
|
|
67
|
+
io as Carousel,
|
|
68
|
+
go as CarouselContent,
|
|
69
|
+
Lo as CarouselDots,
|
|
70
|
+
So as CarouselItem,
|
|
71
|
+
ro as Collapsible,
|
|
72
|
+
ao as CollapsibleContent,
|
|
73
|
+
lo as CollapsibleTrigger,
|
|
74
|
+
eo as ContentPeek,
|
|
75
|
+
be as Drawer,
|
|
76
|
+
Ke as Dropdown,
|
|
77
|
+
B as ErrorBoundary,
|
|
76
78
|
h as Footer,
|
|
77
79
|
w as Grid,
|
|
78
80
|
re as GridItem,
|
|
79
81
|
ae as GridItemAlign,
|
|
80
|
-
|
|
82
|
+
A as Header,
|
|
81
83
|
F as HeroBanner,
|
|
82
|
-
|
|
84
|
+
k as IconButton,
|
|
83
85
|
Y as Input,
|
|
84
|
-
|
|
86
|
+
_e as LanguageSelector,
|
|
85
87
|
q as Link,
|
|
86
88
|
X as LinkBlock,
|
|
87
89
|
_ as LinkList,
|
|
@@ -92,33 +94,35 @@ export {
|
|
|
92
94
|
O as NavigationItemTrigger,
|
|
93
95
|
U as NavigationList,
|
|
94
96
|
f as PaddingTokens,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
C as Page,
|
|
98
|
+
uo as PageContentWrapper,
|
|
99
|
+
ke as Pagination,
|
|
98
100
|
ee as Row,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
le as Search,
|
|
102
|
+
so as SeldonProvider,
|
|
101
103
|
se as Select,
|
|
102
104
|
ce as Social,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
l as SpacingTokens,
|
|
106
|
+
de as SplitPanel,
|
|
107
|
+
Be as StatefulViewingsList,
|
|
108
|
+
xe as Subscribe,
|
|
109
|
+
ne as SubscriptionState,
|
|
110
|
+
Ye as SupportedLanguages,
|
|
109
111
|
we as Text,
|
|
112
|
+
Ae as TextSymbolVariants,
|
|
113
|
+
Ge as TextSymbols,
|
|
110
114
|
he as TextVariants,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
Ue as UserManagement,
|
|
116
|
+
Xe as Video,
|
|
117
|
+
Ce as ViewingsList,
|
|
118
|
+
p as defaultYear,
|
|
115
119
|
s as emailValidation,
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
m as encodeURLSearchParams,
|
|
121
|
+
d as findChildrenExcludingTypes,
|
|
118
122
|
u as findChildrenOfType,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
x as generatePaddingClassName,
|
|
124
|
+
i as getCommonProps,
|
|
125
|
+
n as noOp,
|
|
122
126
|
g as px,
|
|
123
127
|
c as useNormalizedInputProps
|
|
124
128
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __exports as D } from "../../../_virtual/index10.js";
|
|
2
|
+
(function(i) {
|
|
3
|
+
Object.defineProperty(i, "__esModule", { value: !0 }), i.Doctype = i.CDATA = i.Tag = i.Style = i.Script = i.Comment = i.Directive = i.Text = i.Root = i.isTag = i.ElementType = void 0;
|
|
4
|
+
var t;
|
|
5
|
+
(function(c) {
|
|
6
|
+
c.Root = "root", c.Text = "text", c.Directive = "directive", c.Comment = "comment", c.Script = "script", c.Style = "style", c.Tag = "tag", c.CDATA = "cdata", c.Doctype = "doctype";
|
|
7
|
+
})(t = i.ElementType || (i.ElementType = {}));
|
|
8
|
+
function a(c) {
|
|
9
|
+
return c.type === t.Tag || c.type === t.Script || c.type === t.Style;
|
|
10
|
+
}
|
|
11
|
+
i.isTag = a, i.Root = t.Root, i.Text = t.Text, i.Directive = t.Directive, i.Comment = t.Comment, i.Script = t.Script, i.Style = t.Style, i.Tag = t.Tag, i.CDATA = t.CDATA, i.Doctype = t.Doctype;
|
|
12
|
+
})(D);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { commonjsGlobal as a } from "../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __exports as c } from "../../../_virtual/index8.js";
|
|
3
|
+
import "../../domelementtype/lib/index.js";
|
|
4
|
+
import "./node.js";
|
|
5
|
+
import { __exports as p } from "../../../_virtual/node.js";
|
|
6
|
+
import { __exports as m } from "../../../_virtual/index10.js";
|
|
7
|
+
(function(r) {
|
|
8
|
+
var u = a && a.__createBinding || (Object.create ? function(i, t, e, n) {
|
|
9
|
+
n === void 0 && (n = e);
|
|
10
|
+
var o = Object.getOwnPropertyDescriptor(t, e);
|
|
11
|
+
(!o || ("get" in o ? !t.__esModule : o.writable || o.configurable)) && (o = { enumerable: !0, get: function() {
|
|
12
|
+
return t[e];
|
|
13
|
+
} }), Object.defineProperty(i, n, o);
|
|
14
|
+
} : function(i, t, e, n) {
|
|
15
|
+
n === void 0 && (n = e), i[n] = t[e];
|
|
16
|
+
}), f = a && a.__exportStar || function(i, t) {
|
|
17
|
+
for (var e in i) e !== "default" && !Object.prototype.hasOwnProperty.call(t, e) && u(t, i, e);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.DomHandler = void 0;
|
|
20
|
+
var d = m, s = p;
|
|
21
|
+
f(p, r);
|
|
22
|
+
var l = {
|
|
23
|
+
withStartIndices: !1,
|
|
24
|
+
withEndIndices: !1,
|
|
25
|
+
xmlMode: !1
|
|
26
|
+
}, h = (
|
|
27
|
+
/** @class */
|
|
28
|
+
function() {
|
|
29
|
+
function i(t, e, n) {
|
|
30
|
+
this.dom = [], this.root = new s.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof e == "function" && (n = e, e = l), typeof t == "object" && (e = t, t = void 0), this.callback = t != null ? t : null, this.options = e != null ? e : l, this.elementCB = n != null ? n : null;
|
|
31
|
+
}
|
|
32
|
+
return i.prototype.onparserinit = function(t) {
|
|
33
|
+
this.parser = t;
|
|
34
|
+
}, i.prototype.onreset = function() {
|
|
35
|
+
this.dom = [], this.root = new s.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
|
|
36
|
+
}, i.prototype.onend = function() {
|
|
37
|
+
this.done || (this.done = !0, this.parser = null, this.handleCallback(null));
|
|
38
|
+
}, i.prototype.onerror = function(t) {
|
|
39
|
+
this.handleCallback(t);
|
|
40
|
+
}, i.prototype.onclosetag = function() {
|
|
41
|
+
this.lastNode = null;
|
|
42
|
+
var t = this.tagStack.pop();
|
|
43
|
+
this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
|
|
44
|
+
}, i.prototype.onopentag = function(t, e) {
|
|
45
|
+
var n = this.options.xmlMode ? d.ElementType.Tag : void 0, o = new s.Element(t, e, void 0, n);
|
|
46
|
+
this.addNode(o), this.tagStack.push(o);
|
|
47
|
+
}, i.prototype.ontext = function(t) {
|
|
48
|
+
var e = this.lastNode;
|
|
49
|
+
if (e && e.type === d.ElementType.Text)
|
|
50
|
+
e.data += t, this.options.withEndIndices && (e.endIndex = this.parser.endIndex);
|
|
51
|
+
else {
|
|
52
|
+
var n = new s.Text(t);
|
|
53
|
+
this.addNode(n), this.lastNode = n;
|
|
54
|
+
}
|
|
55
|
+
}, i.prototype.oncomment = function(t) {
|
|
56
|
+
if (this.lastNode && this.lastNode.type === d.ElementType.Comment) {
|
|
57
|
+
this.lastNode.data += t;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
var e = new s.Comment(t);
|
|
61
|
+
this.addNode(e), this.lastNode = e;
|
|
62
|
+
}, i.prototype.oncommentend = function() {
|
|
63
|
+
this.lastNode = null;
|
|
64
|
+
}, i.prototype.oncdatastart = function() {
|
|
65
|
+
var t = new s.Text(""), e = new s.CDATA([t]);
|
|
66
|
+
this.addNode(e), t.parent = e, this.lastNode = t;
|
|
67
|
+
}, i.prototype.oncdataend = function() {
|
|
68
|
+
this.lastNode = null;
|
|
69
|
+
}, i.prototype.onprocessinginstruction = function(t, e) {
|
|
70
|
+
var n = new s.ProcessingInstruction(t, e);
|
|
71
|
+
this.addNode(n);
|
|
72
|
+
}, i.prototype.handleCallback = function(t) {
|
|
73
|
+
if (typeof this.callback == "function")
|
|
74
|
+
this.callback(t, this.dom);
|
|
75
|
+
else if (t)
|
|
76
|
+
throw t;
|
|
77
|
+
}, i.prototype.addNode = function(t) {
|
|
78
|
+
var e = this.tagStack[this.tagStack.length - 1], n = e.children[e.children.length - 1];
|
|
79
|
+
this.options.withStartIndices && (t.startIndex = this.parser.startIndex), this.options.withEndIndices && (t.endIndex = this.parser.endIndex), e.children.push(t), n && (t.prev = n, n.next = t), t.parent = e, this.lastNode = null;
|
|
80
|
+
}, i;
|
|
81
|
+
}()
|
|
82
|
+
);
|
|
83
|
+
r.DomHandler = h, r.default = h;
|
|
84
|
+
})(c);
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { commonjsGlobal as p } from "../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __exports as r } from "../../../_virtual/node.js";
|
|
3
|
+
import "../../domelementtype/lib/index.js";
|
|
4
|
+
import { __exports as I } from "../../../_virtual/index10.js";
|
|
5
|
+
var s = p && p.__extends || /* @__PURE__ */ function() {
|
|
6
|
+
var e = function(t, n) {
|
|
7
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, o) {
|
|
8
|
+
i.__proto__ = o;
|
|
9
|
+
} || function(i, o) {
|
|
10
|
+
for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (i[a] = o[a]);
|
|
11
|
+
}, e(t, n);
|
|
12
|
+
};
|
|
13
|
+
return function(t, n) {
|
|
14
|
+
if (typeof n != "function" && n !== null)
|
|
15
|
+
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
16
|
+
e(t, n);
|
|
17
|
+
function i() {
|
|
18
|
+
this.constructor = t;
|
|
19
|
+
}
|
|
20
|
+
t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
|
21
|
+
};
|
|
22
|
+
}(), c = p && p.__assign || function() {
|
|
23
|
+
return c = Object.assign || function(e) {
|
|
24
|
+
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
|
25
|
+
t = arguments[n];
|
|
26
|
+
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}, c.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(r, "__esModule", { value: !0 });
|
|
32
|
+
r.cloneNode = r.hasChildren = r.isDocument = r.isDirective = r.isComment = r.isText = r.isCDATA = r.isTag = r.Element = r.Document = r.CDATA = r.NodeWithChildren = r.ProcessingInstruction = r.Comment = r.Text = r.DataNode = r.Node = void 0;
|
|
33
|
+
var u = I, b = (
|
|
34
|
+
/** @class */
|
|
35
|
+
function() {
|
|
36
|
+
function e() {
|
|
37
|
+
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
38
|
+
}
|
|
39
|
+
return Object.defineProperty(e.prototype, "parentNode", {
|
|
40
|
+
// Read-write aliases for properties
|
|
41
|
+
/**
|
|
42
|
+
* Same as {@link parent}.
|
|
43
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
44
|
+
*/
|
|
45
|
+
get: function() {
|
|
46
|
+
return this.parent;
|
|
47
|
+
},
|
|
48
|
+
set: function(t) {
|
|
49
|
+
this.parent = t;
|
|
50
|
+
},
|
|
51
|
+
enumerable: !1,
|
|
52
|
+
configurable: !0
|
|
53
|
+
}), Object.defineProperty(e.prototype, "previousSibling", {
|
|
54
|
+
/**
|
|
55
|
+
* Same as {@link prev}.
|
|
56
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
57
|
+
*/
|
|
58
|
+
get: function() {
|
|
59
|
+
return this.prev;
|
|
60
|
+
},
|
|
61
|
+
set: function(t) {
|
|
62
|
+
this.prev = t;
|
|
63
|
+
},
|
|
64
|
+
enumerable: !1,
|
|
65
|
+
configurable: !0
|
|
66
|
+
}), Object.defineProperty(e.prototype, "nextSibling", {
|
|
67
|
+
/**
|
|
68
|
+
* Same as {@link next}.
|
|
69
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
70
|
+
*/
|
|
71
|
+
get: function() {
|
|
72
|
+
return this.next;
|
|
73
|
+
},
|
|
74
|
+
set: function(t) {
|
|
75
|
+
this.next = t;
|
|
76
|
+
},
|
|
77
|
+
enumerable: !1,
|
|
78
|
+
configurable: !0
|
|
79
|
+
}), e.prototype.cloneNode = function(t) {
|
|
80
|
+
return t === void 0 && (t = !1), g(this, t);
|
|
81
|
+
}, e;
|
|
82
|
+
}()
|
|
83
|
+
);
|
|
84
|
+
r.Node = b;
|
|
85
|
+
var m = (
|
|
86
|
+
/** @class */
|
|
87
|
+
function(e) {
|
|
88
|
+
s(t, e);
|
|
89
|
+
function t(n) {
|
|
90
|
+
var i = e.call(this) || this;
|
|
91
|
+
return i.data = n, i;
|
|
92
|
+
}
|
|
93
|
+
return Object.defineProperty(t.prototype, "nodeValue", {
|
|
94
|
+
/**
|
|
95
|
+
* Same as {@link data}.
|
|
96
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
97
|
+
*/
|
|
98
|
+
get: function() {
|
|
99
|
+
return this.data;
|
|
100
|
+
},
|
|
101
|
+
set: function(n) {
|
|
102
|
+
this.data = n;
|
|
103
|
+
},
|
|
104
|
+
enumerable: !1,
|
|
105
|
+
configurable: !0
|
|
106
|
+
}), t;
|
|
107
|
+
}(b)
|
|
108
|
+
);
|
|
109
|
+
r.DataNode = m;
|
|
110
|
+
var v = (
|
|
111
|
+
/** @class */
|
|
112
|
+
function(e) {
|
|
113
|
+
s(t, e);
|
|
114
|
+
function t() {
|
|
115
|
+
var n = e !== null && e.apply(this, arguments) || this;
|
|
116
|
+
return n.type = u.ElementType.Text, n;
|
|
117
|
+
}
|
|
118
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
119
|
+
get: function() {
|
|
120
|
+
return 3;
|
|
121
|
+
},
|
|
122
|
+
enumerable: !1,
|
|
123
|
+
configurable: !0
|
|
124
|
+
}), t;
|
|
125
|
+
}(m)
|
|
126
|
+
);
|
|
127
|
+
r.Text = v;
|
|
128
|
+
var x = (
|
|
129
|
+
/** @class */
|
|
130
|
+
function(e) {
|
|
131
|
+
s(t, e);
|
|
132
|
+
function t() {
|
|
133
|
+
var n = e !== null && e.apply(this, arguments) || this;
|
|
134
|
+
return n.type = u.ElementType.Comment, n;
|
|
135
|
+
}
|
|
136
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
137
|
+
get: function() {
|
|
138
|
+
return 8;
|
|
139
|
+
},
|
|
140
|
+
enumerable: !1,
|
|
141
|
+
configurable: !0
|
|
142
|
+
}), t;
|
|
143
|
+
}(m)
|
|
144
|
+
);
|
|
145
|
+
r.Comment = x;
|
|
146
|
+
var T = (
|
|
147
|
+
/** @class */
|
|
148
|
+
function(e) {
|
|
149
|
+
s(t, e);
|
|
150
|
+
function t(n, i) {
|
|
151
|
+
var o = e.call(this, i) || this;
|
|
152
|
+
return o.name = n, o.type = u.ElementType.Directive, o;
|
|
153
|
+
}
|
|
154
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
155
|
+
get: function() {
|
|
156
|
+
return 1;
|
|
157
|
+
},
|
|
158
|
+
enumerable: !1,
|
|
159
|
+
configurable: !0
|
|
160
|
+
}), t;
|
|
161
|
+
}(m)
|
|
162
|
+
);
|
|
163
|
+
r.ProcessingInstruction = T;
|
|
164
|
+
var h = (
|
|
165
|
+
/** @class */
|
|
166
|
+
function(e) {
|
|
167
|
+
s(t, e);
|
|
168
|
+
function t(n) {
|
|
169
|
+
var i = e.call(this) || this;
|
|
170
|
+
return i.children = n, i;
|
|
171
|
+
}
|
|
172
|
+
return Object.defineProperty(t.prototype, "firstChild", {
|
|
173
|
+
// Aliases
|
|
174
|
+
/** First child of the node. */
|
|
175
|
+
get: function() {
|
|
176
|
+
var n;
|
|
177
|
+
return (n = this.children[0]) !== null && n !== void 0 ? n : null;
|
|
178
|
+
},
|
|
179
|
+
enumerable: !1,
|
|
180
|
+
configurable: !0
|
|
181
|
+
}), Object.defineProperty(t.prototype, "lastChild", {
|
|
182
|
+
/** Last child of the node. */
|
|
183
|
+
get: function() {
|
|
184
|
+
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
|
|
185
|
+
},
|
|
186
|
+
enumerable: !1,
|
|
187
|
+
configurable: !0
|
|
188
|
+
}), Object.defineProperty(t.prototype, "childNodes", {
|
|
189
|
+
/**
|
|
190
|
+
* Same as {@link children}.
|
|
191
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
192
|
+
*/
|
|
193
|
+
get: function() {
|
|
194
|
+
return this.children;
|
|
195
|
+
},
|
|
196
|
+
set: function(n) {
|
|
197
|
+
this.children = n;
|
|
198
|
+
},
|
|
199
|
+
enumerable: !1,
|
|
200
|
+
configurable: !0
|
|
201
|
+
}), t;
|
|
202
|
+
}(b)
|
|
203
|
+
);
|
|
204
|
+
r.NodeWithChildren = h;
|
|
205
|
+
var C = (
|
|
206
|
+
/** @class */
|
|
207
|
+
function(e) {
|
|
208
|
+
s(t, e);
|
|
209
|
+
function t() {
|
|
210
|
+
var n = e !== null && e.apply(this, arguments) || this;
|
|
211
|
+
return n.type = u.ElementType.CDATA, n;
|
|
212
|
+
}
|
|
213
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
214
|
+
get: function() {
|
|
215
|
+
return 4;
|
|
216
|
+
},
|
|
217
|
+
enumerable: !1,
|
|
218
|
+
configurable: !0
|
|
219
|
+
}), t;
|
|
220
|
+
}(h)
|
|
221
|
+
);
|
|
222
|
+
r.CDATA = C;
|
|
223
|
+
var P = (
|
|
224
|
+
/** @class */
|
|
225
|
+
function(e) {
|
|
226
|
+
s(t, e);
|
|
227
|
+
function t() {
|
|
228
|
+
var n = e !== null && e.apply(this, arguments) || this;
|
|
229
|
+
return n.type = u.ElementType.Root, n;
|
|
230
|
+
}
|
|
231
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
232
|
+
get: function() {
|
|
233
|
+
return 9;
|
|
234
|
+
},
|
|
235
|
+
enumerable: !1,
|
|
236
|
+
configurable: !0
|
|
237
|
+
}), t;
|
|
238
|
+
}(h)
|
|
239
|
+
);
|
|
240
|
+
r.Document = P;
|
|
241
|
+
var O = (
|
|
242
|
+
/** @class */
|
|
243
|
+
function(e) {
|
|
244
|
+
s(t, e);
|
|
245
|
+
function t(n, i, o, a) {
|
|
246
|
+
o === void 0 && (o = []), a === void 0 && (a = n === "script" ? u.ElementType.Script : n === "style" ? u.ElementType.Style : u.ElementType.Tag);
|
|
247
|
+
var l = e.call(this, o) || this;
|
|
248
|
+
return l.name = n, l.attribs = i, l.type = a, l;
|
|
249
|
+
}
|
|
250
|
+
return Object.defineProperty(t.prototype, "nodeType", {
|
|
251
|
+
get: function() {
|
|
252
|
+
return 1;
|
|
253
|
+
},
|
|
254
|
+
enumerable: !1,
|
|
255
|
+
configurable: !0
|
|
256
|
+
}), Object.defineProperty(t.prototype, "tagName", {
|
|
257
|
+
// DOM Level 1 aliases
|
|
258
|
+
/**
|
|
259
|
+
* Same as {@link name}.
|
|
260
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
261
|
+
*/
|
|
262
|
+
get: function() {
|
|
263
|
+
return this.name;
|
|
264
|
+
},
|
|
265
|
+
set: function(n) {
|
|
266
|
+
this.name = n;
|
|
267
|
+
},
|
|
268
|
+
enumerable: !1,
|
|
269
|
+
configurable: !0
|
|
270
|
+
}), Object.defineProperty(t.prototype, "attributes", {
|
|
271
|
+
get: function() {
|
|
272
|
+
var n = this;
|
|
273
|
+
return Object.keys(this.attribs).map(function(i) {
|
|
274
|
+
var o, a;
|
|
275
|
+
return {
|
|
276
|
+
name: i,
|
|
277
|
+
value: n.attribs[i],
|
|
278
|
+
namespace: (o = n["x-attribsNamespace"]) === null || o === void 0 ? void 0 : o[i],
|
|
279
|
+
prefix: (a = n["x-attribsPrefix"]) === null || a === void 0 ? void 0 : a[i]
|
|
280
|
+
};
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
enumerable: !1,
|
|
284
|
+
configurable: !0
|
|
285
|
+
}), t;
|
|
286
|
+
}(h)
|
|
287
|
+
);
|
|
288
|
+
r.Element = O;
|
|
289
|
+
function D(e) {
|
|
290
|
+
return (0, u.isTag)(e);
|
|
291
|
+
}
|
|
292
|
+
r.isTag = D;
|
|
293
|
+
function j(e) {
|
|
294
|
+
return e.type === u.ElementType.CDATA;
|
|
295
|
+
}
|
|
296
|
+
r.isCDATA = j;
|
|
297
|
+
function N(e) {
|
|
298
|
+
return e.type === u.ElementType.Text;
|
|
299
|
+
}
|
|
300
|
+
r.isText = N;
|
|
301
|
+
function E(e) {
|
|
302
|
+
return e.type === u.ElementType.Comment;
|
|
303
|
+
}
|
|
304
|
+
r.isComment = E;
|
|
305
|
+
function A(e) {
|
|
306
|
+
return e.type === u.ElementType.Directive;
|
|
307
|
+
}
|
|
308
|
+
r.isDirective = A;
|
|
309
|
+
function _(e) {
|
|
310
|
+
return e.type === u.ElementType.Root;
|
|
311
|
+
}
|
|
312
|
+
r.isDocument = _;
|
|
313
|
+
function S(e) {
|
|
314
|
+
return Object.prototype.hasOwnProperty.call(e, "children");
|
|
315
|
+
}
|
|
316
|
+
r.hasChildren = S;
|
|
317
|
+
function g(e, t) {
|
|
318
|
+
t === void 0 && (t = !1);
|
|
319
|
+
var n;
|
|
320
|
+
if (N(e))
|
|
321
|
+
n = new v(e.data);
|
|
322
|
+
else if (E(e))
|
|
323
|
+
n = new x(e.data);
|
|
324
|
+
else if (D(e)) {
|
|
325
|
+
var i = t ? d(e.children) : [], o = new O(e.name, c({}, e.attribs), i);
|
|
326
|
+
i.forEach(function(w) {
|
|
327
|
+
return w.parent = o;
|
|
328
|
+
}), e.namespace != null && (o.namespace = e.namespace), e["x-attribsNamespace"] && (o["x-attribsNamespace"] = c({}, e["x-attribsNamespace"])), e["x-attribsPrefix"] && (o["x-attribsPrefix"] = c({}, e["x-attribsPrefix"])), n = o;
|
|
329
|
+
} else if (j(e)) {
|
|
330
|
+
var i = t ? d(e.children) : [], a = new C(i);
|
|
331
|
+
i.forEach(function(y) {
|
|
332
|
+
return y.parent = a;
|
|
333
|
+
}), n = a;
|
|
334
|
+
} else if (_(e)) {
|
|
335
|
+
var i = t ? d(e.children) : [], l = new P(i);
|
|
336
|
+
i.forEach(function(y) {
|
|
337
|
+
return y.parent = l;
|
|
338
|
+
}), e["x-mode"] && (l["x-mode"] = e["x-mode"]), n = l;
|
|
339
|
+
} else if (A(e)) {
|
|
340
|
+
var f = new T(e.name, e.data);
|
|
341
|
+
e["x-name"] != null && (f["x-name"] = e["x-name"], f["x-publicId"] = e["x-publicId"], f["x-systemId"] = e["x-systemId"]), n = f;
|
|
342
|
+
} else
|
|
343
|
+
throw new Error("Not implemented yet: ".concat(e.type));
|
|
344
|
+
return n.startIndex = e.startIndex, n.endIndex = e.endIndex, e.sourceCodeLocation != null && (n.sourceCodeLocation = e.sourceCodeLocation), n;
|
|
345
|
+
}
|
|
346
|
+
r.cloneNode = g;
|
|
347
|
+
function d(e) {
|
|
348
|
+
for (var t = e.map(function(i) {
|
|
349
|
+
return g(i, !0);
|
|
350
|
+
}), n = 1; n < t.length; n++)
|
|
351
|
+
t[n].prev = t[n - 1], t[n - 1].next = t[n];
|
|
352
|
+
return t;
|
|
353
|
+
}
|
|
354
|
+
export {
|
|
355
|
+
r as default
|
|
356
|
+
};
|