trusty-cms 4.3.3 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/Gemfile.lock +87 -77
- data/app/assets/javascripts/ckeditor/config.js +2 -2
- data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
- data/app/controllers/admin/assets_controller.rb +5 -1
- data/app/models/asset.rb +39 -48
- data/app/models/asset_type.rb +6 -2
- data/app/views/admin/assets/edit.html.haml +5 -3
- data/config/database.yml +2 -2
- data/config/locales/en.yml +1 -0
- data/coverage/index.html +1 -1
- data/lib/trusty_cms/deprecation.rb +13 -0
- data/lib/trusty_cms.rb +1 -1
- data/node_modules/path-parse/index.js +17 -35
- data/node_modules/path-parse/package.json +1 -1
- data/node_modules/postcss/CHANGELOG.md +27 -0
- data/node_modules/postcss/README.md +21 -0
- data/node_modules/postcss/lib/at-rule.js +2 -4
- data/node_modules/postcss/lib/comment.js +2 -4
- data/node_modules/postcss/lib/container.js +27 -122
- data/node_modules/postcss/lib/css-syntax-error.js +5 -7
- data/node_modules/postcss/lib/declaration.js +2 -4
- data/node_modules/postcss/lib/input.js +3 -5
- data/node_modules/postcss/lib/lazy-result.js +10 -17
- data/node_modules/postcss/lib/map-generator.js +10 -17
- data/node_modules/postcss/lib/node.js +2 -4
- data/node_modules/postcss/lib/parser.js +2 -4
- data/node_modules/postcss/lib/postcss.d.ts +25 -19
- data/node_modules/postcss/lib/previous-map.js +17 -6
- data/node_modules/postcss/lib/processor.js +16 -15
- data/node_modules/postcss/lib/result.js +2 -4
- data/node_modules/postcss/lib/root.js +10 -17
- data/node_modules/postcss/lib/rule.js +2 -4
- data/node_modules/postcss/lib/stringifier.js +2 -4
- data/node_modules/postcss/lib/warning.js +2 -4
- data/node_modules/postcss/package.json +16 -12
- data/spec/dummy/log/test.log +542 -443
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
- data/trusty_cms.gemspec +2 -1
- data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
- data/yarn.lock +3 -3
- metadata +31 -307
- data/config/initializers/interpolation.rb +0 -6
- data/node_modules/path-parse/test.js +0 -77
- data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
- data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
- data/node_modules/postcss/docs/api/index.html +0 -22716
- data/spec/dummy/log/development.log +0 -158
- data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
- data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
- data/spec/dummy/node_modules/jquery/README.md +0 -62
- data/spec/dummy/node_modules/jquery/bower.json +0 -14
- data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
- data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
- data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
- data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/spec/dummy/node_modules/jquery/package.json +0 -117
- data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
- data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
- data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
- data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
- data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
- data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
- data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
- data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
- data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
- data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
- data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
- data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
- data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
- data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
- data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
- data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
- data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
- data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
- data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
- data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
- data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
- data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
- data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
- data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
- data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
- data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
- data/spec/dummy/node_modules/jquery/src/core.js +0 -400
- data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
- data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
- data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
- data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
- data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
- data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
- data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
- data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
- data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
- data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
- data/spec/dummy/node_modules/jquery/src/css.js +0 -494
- data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
- data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
- data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
- data/spec/dummy/node_modules/jquery/src/data.js +0 -180
- data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
- data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
- data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
- data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
- data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
- data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
- data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
- data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
- data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
- data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
- data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
- data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
- data/spec/dummy/node_modules/jquery/src/event.js +0 -892
- data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
- data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
- data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
- data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
- data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
- data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
- data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
- data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
- data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
- data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
- data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
- data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
- data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
- data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
- data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
- data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
- data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
- data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
- data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
- data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
- data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
- data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
- data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
- data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
- data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
- data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
- data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
- data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
- data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
- data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
- data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
- data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
- data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
- data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
- data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
- data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
- data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
- data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
- data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
- data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
- data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -2,29 +2,14 @@
|
|
2
2
|
|
3
3
|
var isWindows = process.platform === 'win32';
|
4
4
|
|
5
|
-
// Regex to split a windows path into
|
6
|
-
|
7
|
-
|
8
|
-
/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
9
|
-
|
10
|
-
// Regex to split the tail part of the above into [*, dir, basename, ext]
|
11
|
-
var splitTailRe =
|
12
|
-
/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
5
|
+
// Regex to split a windows path into into [dir, root, basename, name, ext]
|
6
|
+
var splitWindowsRe =
|
7
|
+
/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/;
|
13
8
|
|
14
9
|
var win32 = {};
|
15
10
|
|
16
|
-
// Function to split a filename into [root, dir, basename, ext]
|
17
11
|
function win32SplitPath(filename) {
|
18
|
-
|
19
|
-
var result = splitDeviceRe.exec(filename),
|
20
|
-
device = (result[1] || '') + (result[2] || ''),
|
21
|
-
tail = result[3] || '';
|
22
|
-
// Split the tail into dir, basename and extension
|
23
|
-
var result2 = splitTailRe.exec(tail),
|
24
|
-
dir = result2[1],
|
25
|
-
basename = result2[2],
|
26
|
-
ext = result2[3];
|
27
|
-
return [device, dir, basename, ext];
|
12
|
+
return splitWindowsRe.exec(filename).slice(1);
|
28
13
|
}
|
29
14
|
|
30
15
|
win32.parse = function(pathString) {
|
@@ -34,24 +19,24 @@ win32.parse = function(pathString) {
|
|
34
19
|
);
|
35
20
|
}
|
36
21
|
var allParts = win32SplitPath(pathString);
|
37
|
-
if (!allParts || allParts.length !==
|
22
|
+
if (!allParts || allParts.length !== 5) {
|
38
23
|
throw new TypeError("Invalid path '" + pathString + "'");
|
39
24
|
}
|
40
25
|
return {
|
41
|
-
root: allParts[
|
42
|
-
dir: allParts[0]
|
26
|
+
root: allParts[1],
|
27
|
+
dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),
|
43
28
|
base: allParts[2],
|
44
|
-
ext: allParts[
|
45
|
-
name: allParts[
|
29
|
+
ext: allParts[4],
|
30
|
+
name: allParts[3]
|
46
31
|
};
|
47
32
|
};
|
48
33
|
|
49
34
|
|
50
35
|
|
51
|
-
// Split a filename into [
|
36
|
+
// Split a filename into [dir, root, basename, name, ext], unix version
|
52
37
|
// 'root' is just a slash, or nothing.
|
53
38
|
var splitPathRe =
|
54
|
-
/^(
|
39
|
+
/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/;
|
55
40
|
var posix = {};
|
56
41
|
|
57
42
|
|
@@ -67,19 +52,16 @@ posix.parse = function(pathString) {
|
|
67
52
|
);
|
68
53
|
}
|
69
54
|
var allParts = posixSplitPath(pathString);
|
70
|
-
if (!allParts || allParts.length !==
|
55
|
+
if (!allParts || allParts.length !== 5) {
|
71
56
|
throw new TypeError("Invalid path '" + pathString + "'");
|
72
57
|
}
|
73
|
-
|
74
|
-
allParts[2] = allParts[2] || '';
|
75
|
-
allParts[3] = allParts[3] || '';
|
76
|
-
|
58
|
+
|
77
59
|
return {
|
78
|
-
root: allParts[
|
79
|
-
dir: allParts[0]
|
60
|
+
root: allParts[1],
|
61
|
+
dir: allParts[0].slice(0, -1),
|
80
62
|
base: allParts[2],
|
81
|
-
ext: allParts[
|
82
|
-
name: allParts[
|
63
|
+
ext: allParts[4],
|
64
|
+
name: allParts[3],
|
83
65
|
};
|
84
66
|
};
|
85
67
|
|
@@ -1,6 +1,33 @@
|
|
1
1
|
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
+
## 7.0.36
|
5
|
+
* Backport ReDoS vulnerabilities from PostCSS 8.
|
6
|
+
|
7
|
+
## 7.0.35
|
8
|
+
* Add migration guide link to PostCSS 8 error text.
|
9
|
+
|
10
|
+
## 7.0.34
|
11
|
+
* Fix compatibility with `postcss-scss` 2.
|
12
|
+
|
13
|
+
## 7.0.33
|
14
|
+
* Add error message for PostCSS 8 plugins.
|
15
|
+
|
16
|
+
## 7.0.32
|
17
|
+
* Fix error message (by @admosity).
|
18
|
+
|
19
|
+
## 7.0.31
|
20
|
+
* Use only the latest source map annotation (by Emmanouil Zoumpoulakis).
|
21
|
+
|
22
|
+
## 7.0.30
|
23
|
+
* Fix TypeScript definition (by Natalie Weizenbaum).
|
24
|
+
|
25
|
+
## 7.0.29
|
26
|
+
* Update `Processor#version`.
|
27
|
+
|
28
|
+
## 7.0.28
|
29
|
+
* Fix TypeScript definition (by Natalie Weizenbaum).
|
30
|
+
|
4
31
|
## 7.0.27
|
5
32
|
* Fix TypeScript definition (by Natalie Weizenbaum).
|
6
33
|
|
@@ -39,6 +39,16 @@ at <surrender@evilmartians.com>.
|
|
39
39
|
alt="Sponsored by Evil Martians" width="236" height="54">
|
40
40
|
</a>
|
41
41
|
|
42
|
+
## Sponsorship
|
43
|
+
|
44
|
+
PostCSS needs your support. We are accepting donations
|
45
|
+
[at Open Collective](https://opencollective.com/postcss/).
|
46
|
+
|
47
|
+
<a href="https://tailwindcss.com/">
|
48
|
+
<img src="https://refactoringui.nyc3.cdn.digitaloceanspaces.com/tailwind-logo.svg"
|
49
|
+
alt="Sponsored by Tailwind CSS" width="273" height="64">
|
50
|
+
</a>
|
51
|
+
|
42
52
|
## Plugins
|
43
53
|
|
44
54
|
Currently, PostCSS has more than 200 plugins. You can find all of the plugins
|
@@ -468,3 +478,14 @@ To report a security vulnerability, please use the [Tidelift security contact].
|
|
468
478
|
Tidelift will coordinate the fix and disclosure.
|
469
479
|
|
470
480
|
[Tidelift security contact]: https://tidelift.com/security
|
481
|
+
|
482
|
+
|
483
|
+
## For Enterprise
|
484
|
+
|
485
|
+
Available as part of the Tidelift Subscription.
|
486
|
+
|
487
|
+
The maintainers of `postcss` and thousands of other packages are working
|
488
|
+
with Tidelift to deliver commercial support and maintenance for the open source
|
489
|
+
dependencies you use to build your applications. Save time, reduce risk,
|
490
|
+
and improve code health, while paying the maintainers of the exact dependencies
|
491
|
+
you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-postcss?utm_source=npm-postcss&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
@@ -27,9 +27,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
|
|
27
27
|
* const media = root.last
|
28
28
|
* media.nodes //=> []
|
29
29
|
*/
|
30
|
-
var AtRule =
|
31
|
-
/*#__PURE__*/
|
32
|
-
function (_Container) {
|
30
|
+
var AtRule = /*#__PURE__*/function (_Container) {
|
33
31
|
_inheritsLoose(AtRule, _Container);
|
34
32
|
|
35
33
|
function AtRule(defaults) {
|
@@ -126,4 +124,4 @@ function (_Container) {
|
|
126
124
|
var _default = AtRule;
|
127
125
|
exports.default = _default;
|
128
126
|
module.exports = exports.default;
|
129
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
127
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIiwiQ29udGFpbmVyIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBa0JNQSxNOzs7QUFDSixrQkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQixrQ0FBTUEsUUFBTjtBQUNBLFVBQUtDLElBQUwsR0FBWSxRQUFaO0FBRnFCO0FBR3RCOzs7O1NBRURDLE0sR0FBQSxrQkFBcUI7QUFBQTs7QUFDbkIsUUFBSSxDQUFDLEtBQUtDLEtBQVYsRUFBaUIsS0FBS0EsS0FBTCxHQUFhLEVBQWI7O0FBREUsc0NBQVZDLFFBQVU7QUFBVkEsTUFBQUEsUUFBVTtBQUFBOztBQUVuQix5REFBYUYsTUFBYixrREFBdUJFLFFBQXZCO0FBQ0QsRzs7U0FFREMsTyxHQUFBLG1CQUFzQjtBQUFBOztBQUNwQixRQUFJLENBQUMsS0FBS0YsS0FBVixFQUFpQixLQUFLQSxLQUFMLEdBQWEsRUFBYjs7QUFERyx1Q0FBVkMsUUFBVTtBQUFWQSxNQUFBQSxRQUFVO0FBQUE7O0FBRXBCLDBEQUFhQyxPQUFiLG1EQUF3QkQsUUFBeEI7QUFDRDtBQUVEOzs7Ozs7Ozs7O0FBVUE7Ozs7Ozs7Ozs7OztBQVlBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBdENtQkUsa0I7O2VBdUVOUCxNIiwic291cmNlc0NvbnRlb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lY2xhcmF0aW9u4oCZcyB2YWx1ZSxcbiAgICogUG9zdENTUyB3aWxsIHVzZSB0aGUgcmF3IHZhbHVlIHdpdGggY29tbWVudHMuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCcgIEBtZWRpYVxcbnByaW50IHtcXG59JylcbiAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICcgICcsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYmV0d2VlbjogJyAnLFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIGFmdGVyTmFtZTogJ1xcbicsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXI6ICdcXG4nIH1cbiAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IEF0UnVsZVxuIl0sImZpbGUiOiJhdC1ydWxlLmpzIn0=
|
@@ -17,9 +17,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
|
|
17
17
|
*
|
18
18
|
* @extends Node
|
19
19
|
*/
|
20
|
-
var Comment =
|
21
|
-
/*#__PURE__*/
|
22
|
-
function (_Node) {
|
20
|
+
var Comment = /*#__PURE__*/function (_Node) {
|
23
21
|
_inheritsLoose(Comment, _Node);
|
24
22
|
|
25
23
|
function Comment(defaults) {
|
@@ -54,4 +52,4 @@ function (_Node) {
|
|
54
52
|
var _default = Comment;
|
55
53
|
exports.default = _default;
|
56
54
|
module.exports = exports.default;
|
57
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
55
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7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hcyBpdCB3YXMgaW4gdGhlIG9yaWdpbiBpbnB1dC5cbiAgICpcbiAgICogRXZlcnkgcGFyc2VyIHNhdmVzIGl0cyBvd24gcHJvcGVydGllcyxcbiAgICogYnV0IHRoZSBkZWZhdWx0IENTUyBwYXJzZXIgdXNlczpcbiAgICpcbiAgICogKiBgYmVmb3JlYDogdGhlIHNwYWNlIHN5bWJvbHMgYmVmb3JlIHRoZSBub2RlLlxuICAgKiAqIGBsZWZ0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiBgLypgIGFuZCB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICogKiBgcmlnaHRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29tbWVudFxuIl0sImZpbGUiOiJjb21tZW50LmpzIn0=
|
@@ -11,6 +11,12 @@ var _node = _interopRequireDefault(require("./node"));
|
|
11
11
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
13
|
|
14
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
|
15
|
+
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
17
|
+
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
19
|
+
|
14
20
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
15
21
|
|
16
22
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
@@ -36,9 +42,7 @@ function cleanSource(nodes) {
|
|
36
42
|
*/
|
37
43
|
|
38
44
|
|
39
|
-
var Container =
|
40
|
-
/*#__PURE__*/
|
41
|
-
function (_Node) {
|
45
|
+
var Container = /*#__PURE__*/function (_Node) {
|
42
46
|
_inheritsLoose(Container, _Node);
|
43
47
|
|
44
48
|
function Container() {
|
@@ -367,19 +371,8 @@ function (_Node) {
|
|
367
371
|
var child = _children[_i];
|
368
372
|
var nodes = this.normalize(child, this.last);
|
369
373
|
|
370
|
-
for (var _iterator = nodes,
|
371
|
-
var
|
372
|
-
|
373
|
-
if (_isArray) {
|
374
|
-
if (_i2 >= _iterator.length) break;
|
375
|
-
_ref = _iterator[_i2++];
|
376
|
-
} else {
|
377
|
-
_i2 = _iterator.next();
|
378
|
-
if (_i2.done) break;
|
379
|
-
_ref = _i2.value;
|
380
|
-
}
|
381
|
-
|
382
|
-
var node = _ref;
|
374
|
+
for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {
|
375
|
+
var node = _step.value;
|
383
376
|
this.nodes.push(node);
|
384
377
|
}
|
385
378
|
}
|
@@ -415,34 +408,12 @@ function (_Node) {
|
|
415
408
|
|
416
409
|
children = children.reverse();
|
417
410
|
|
418
|
-
for (var _iterator2 = children,
|
419
|
-
var
|
420
|
-
|
421
|
-
if (_isArray2) {
|
422
|
-
if (_i3 >= _iterator2.length) break;
|
423
|
-
_ref2 = _iterator2[_i3++];
|
424
|
-
} else {
|
425
|
-
_i3 = _iterator2.next();
|
426
|
-
if (_i3.done) break;
|
427
|
-
_ref2 = _i3.value;
|
428
|
-
}
|
429
|
-
|
430
|
-
var child = _ref2;
|
411
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(children), _step2; !(_step2 = _iterator2()).done;) {
|
412
|
+
var child = _step2.value;
|
431
413
|
var nodes = this.normalize(child, this.first, 'prepend').reverse();
|
432
414
|
|
433
|
-
for (var _iterator3 = nodes,
|
434
|
-
var
|
435
|
-
|
436
|
-
if (_isArray3) {
|
437
|
-
if (_i4 >= _iterator3.length) break;
|
438
|
-
_ref3 = _iterator3[_i4++];
|
439
|
-
} else {
|
440
|
-
_i4 = _iterator3.next();
|
441
|
-
if (_i4.done) break;
|
442
|
-
_ref3 = _i4.value;
|
443
|
-
}
|
444
|
-
|
445
|
-
var node = _ref3;
|
415
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose(nodes), _step3; !(_step3 = _iterator3()).done;) {
|
416
|
+
var node = _step3.value;
|
446
417
|
this.nodes.unshift(node);
|
447
418
|
}
|
448
419
|
|
@@ -458,19 +429,8 @@ function (_Node) {
|
|
458
429
|
_Node.prototype.cleanRaws.call(this, keepBetween);
|
459
430
|
|
460
431
|
if (this.nodes) {
|
461
|
-
for (var _iterator4 = this.nodes,
|
462
|
-
var
|
463
|
-
|
464
|
-
if (_isArray4) {
|
465
|
-
if (_i5 >= _iterator4.length) break;
|
466
|
-
_ref4 = _iterator4[_i5++];
|
467
|
-
} else {
|
468
|
-
_i5 = _iterator4.next();
|
469
|
-
if (_i5.done) break;
|
470
|
-
_ref4 = _i5.value;
|
471
|
-
}
|
472
|
-
|
473
|
-
var node = _ref4;
|
432
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose(this.nodes), _step4; !(_step4 = _iterator4()).done;) {
|
433
|
+
var node = _step4.value;
|
474
434
|
node.cleanRaws(keepBetween);
|
475
435
|
}
|
476
436
|
}
|
@@ -493,19 +453,8 @@ function (_Node) {
|
|
493
453
|
var type = exist === 0 ? 'prepend' : false;
|
494
454
|
var nodes = this.normalize(add, this.nodes[exist], type).reverse();
|
495
455
|
|
496
|
-
for (var _iterator5 = nodes,
|
497
|
-
var
|
498
|
-
|
499
|
-
if (_isArray5) {
|
500
|
-
if (_i6 >= _iterator5.length) break;
|
501
|
-
_ref5 = _iterator5[_i6++];
|
502
|
-
} else {
|
503
|
-
_i6 = _iterator5.next();
|
504
|
-
if (_i6.done) break;
|
505
|
-
_ref5 = _i6.value;
|
506
|
-
}
|
507
|
-
|
508
|
-
var node = _ref5;
|
456
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose(nodes), _step5; !(_step5 = _iterator5()).done;) {
|
457
|
+
var node = _step5.value;
|
509
458
|
this.nodes.splice(exist, 0, node);
|
510
459
|
}
|
511
460
|
|
@@ -535,19 +484,8 @@ function (_Node) {
|
|
535
484
|
exist = this.index(exist);
|
536
485
|
var nodes = this.normalize(add, this.nodes[exist]).reverse();
|
537
486
|
|
538
|
-
for (var _iterator6 = nodes,
|
539
|
-
var
|
540
|
-
|
541
|
-
if (_isArray6) {
|
542
|
-
if (_i7 >= _iterator6.length) break;
|
543
|
-
_ref6 = _iterator6[_i7++];
|
544
|
-
} else {
|
545
|
-
_i7 = _iterator6.next();
|
546
|
-
if (_i7.done) break;
|
547
|
-
_ref6 = _i7.value;
|
548
|
-
}
|
549
|
-
|
550
|
-
var node = _ref6;
|
487
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose(nodes), _step6; !(_step6 = _iterator6()).done;) {
|
488
|
+
var node = _step6.value;
|
551
489
|
this.nodes.splice(exist + 1, 0, node);
|
552
490
|
}
|
553
491
|
|
@@ -608,19 +546,8 @@ function (_Node) {
|
|
608
546
|
;
|
609
547
|
|
610
548
|
_proto.removeAll = function removeAll() {
|
611
|
-
for (var _iterator7 = this.nodes,
|
612
|
-
var
|
613
|
-
|
614
|
-
if (_isArray7) {
|
615
|
-
if (_i8 >= _iterator7.length) break;
|
616
|
-
_ref7 = _iterator7[_i8++];
|
617
|
-
} else {
|
618
|
-
_i8 = _iterator7.next();
|
619
|
-
if (_i8.done) break;
|
620
|
-
_ref7 = _i8.value;
|
621
|
-
}
|
622
|
-
|
623
|
-
var node = _ref7;
|
549
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose(this.nodes), _step7; !(_step7 = _iterator7()).done;) {
|
550
|
+
var node = _step7.value;
|
624
551
|
node.parent = undefined;
|
625
552
|
}
|
626
553
|
|
@@ -739,38 +666,16 @@ function (_Node) {
|
|
739
666
|
} else if (Array.isArray(nodes)) {
|
740
667
|
nodes = nodes.slice(0);
|
741
668
|
|
742
|
-
for (var _iterator8 = nodes,
|
743
|
-
var
|
744
|
-
|
745
|
-
if (_isArray8) {
|
746
|
-
if (_i9 >= _iterator8.length) break;
|
747
|
-
_ref8 = _iterator8[_i9++];
|
748
|
-
} else {
|
749
|
-
_i9 = _iterator8.next();
|
750
|
-
if (_i9.done) break;
|
751
|
-
_ref8 = _i9.value;
|
752
|
-
}
|
753
|
-
|
754
|
-
var i = _ref8;
|
669
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose(nodes), _step8; !(_step8 = _iterator8()).done;) {
|
670
|
+
var i = _step8.value;
|
755
671
|
if (i.parent) i.parent.removeChild(i, 'ignore');
|
756
672
|
}
|
757
673
|
} else if (nodes.type === 'root') {
|
758
674
|
nodes = nodes.nodes.slice(0);
|
759
675
|
|
760
|
-
for (var _iterator9 = nodes,
|
761
|
-
var
|
762
|
-
|
763
|
-
if (_isArray9) {
|
764
|
-
if (_i10 >= _iterator9.length) break;
|
765
|
-
_ref9 = _iterator9[_i10++];
|
766
|
-
} else {
|
767
|
-
_i10 = _iterator9.next();
|
768
|
-
if (_i10.done) break;
|
769
|
-
_ref9 = _i10.value;
|
770
|
-
}
|
771
|
-
|
772
|
-
var _i11 = _ref9;
|
773
|
-
if (_i11.parent) _i11.parent.removeChild(_i11, 'ignore');
|
676
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose(nodes), _step9; !(_step9 = _iterator9()).done;) {
|
677
|
+
var _i2 = _step9.value;
|
678
|
+
if (_i2.parent) _i2.parent.removeChild(_i2, 'ignore');
|
774
679
|
}
|
775
680
|
} else if (nodes.type) {
|
776
681
|
nodes = [nodes];
|
@@ -866,4 +771,4 @@ var _default = Container;
|
|
866
771
|
|
867
772
|
exports.default = _default;
|
868
773
|
module.exports = exports.default;
|
869
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbnRhaW5lci5lczYiXSwibmFtZXMiOlsiY2xlYW5Tb3VyY2UiLCJub2RlcyIsIm1hcCIsImkiLCJzb3VyY2UiLCJDb250YWluZXIiLCJwdXNoIiwiY2hpbGQiLCJwYXJlbnQiLCJlYWNoIiwiY2FsbGJhY2siLCJsYXN0RWFjaCIsImluZGV4ZXMiLCJpZCIsInVuZGVmaW5lZCIsImluZGV4IiwicmVzdWx0IiwibGVuZ3RoIiwid2FsayIsImUiLCJwb3N0Y3NzTm9kZSIsInN0YWNrIiwidGVzdCIsInMiLCJyZXBsYWNlIiwiaW5wdXQiLCJmcm9tIiwic3RhcnQiLCJsaW5lIiwiY29sdW1uIiwid2Fsa0RlY2xzIiwicHJvcCIsInR5cGUiLCJSZWdFeHAiLCJ3YWxrUnVsZXMiLCJzZWxlY3RvciIsIndhbGtBdFJ1bGVzIiwibmFtZSIsIndhbGtDb21tZW50cyIsImFwcGVuZCIsImNoaWxkcmVuIiwibm9ybWFsaXplIiwibGFzdCIsIm5vZGUiLCJwcmVwZW5kIiwicmV2ZXJzZSIsImZpcnN0IiwidW5zaGlmdCIsImNsZWFuUmF3cyIsImtlZXBCZXR3ZWVuIiwiaW5zZXJ0QmVmb3JlI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9wZXJ0eSBuYW1lcy5cbiAgICogQHBhcmFtIHtzdHJpbmd9IG9wdHMuZmFzdCAgICAgICAgICAgU3RyaW5nIHRoYXTigJlzIHVzZWQgdG8gbmFycm93IGRvd25cbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzIGFuZCBzcGVlZCB1cCB0aGUgcmVnZXhwIHNlYXJjaC5cbiAgICogQHBhcmFtIHtmdW5jdGlvbnxzdHJpbmd9IGNhbGxiYWNrICAgU3RyaW5nIHRvIHJlcGxhY2UgcGF0dGVybiBvciBjYWxsYmFja1xuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGF0IHJldHVybnMgYSBuZXcgdmFsdWUuIFRoZSBjYWxsYmFja1xuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWxsIHJlY2VpdmUgdGhlIHNhbWUgYXJndW1lbnRzXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzIHRob3NlIHBhc3NlZCB0byBhIGZ1bmN0aW9uIHBhcmFtZXRlclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZiBgU3RyaW5nI3JlcGxhY2VgLlxuICAgKlxuICAgKiBAcmV0dXJuIHtOb2RlfSBUaGlzIG5vZGUgZm9yIG1ldGhvZHMgY2hhaW4uXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIHJvb3QucmVwbGFjZVZhbHVlcygvXFxkK3JlbS8sIHsgZmFzdDogJ3JlbScgfSwgc3RyaW5nID0+IHtcbiAgICogICByZXR1cm4gMTUgKiBwYXJzZUludChzdHJpbmcpICsgJ3B4J1xuICAgKiB9KVxuICAgKi9cbiAgcmVwbGFjZVZhbHVlcyAocGF0dGVybiwgb3B0cywgY2FsbGJhY2spIHtcbiAgICBpZiAoIWNhbGxiYWNrKSB7XG4gICAgICBjYWxsYmFjayA9IG9wdHNcbiAgICAgIG9w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