@flourish/sdk 4.2.2 → 5.0.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/README.md +14 -1
- package/RELEASE_NOTES.md +3 -2
- package/common/embed/embedding.d.ts +1 -1
- package/common/embed/embedding.js +6 -8
- package/common/package.json +2 -1
- package/common/tsconfig.sdk.tsbuildinfo +1 -1
- package/lib/cmd/login.js +12 -17
- package/lib/cmd/publish.js +2 -7
- package/lib/cmd/register.js +10 -13
- package/lib/sdk.js +4 -6
- package/package.json +23 -24
- package/rollup.config.mjs +29 -0
- package/server/index.js +2 -1
- package/server/views/index.html +5 -2
- package/site/embedded.js +2 -1
- package/site/images/icon-add-folder.svg +1 -1
- package/site/script.js +3 -2
- package/site/sdk.css +1 -1
- package/my_template/node_modules/.package-lock.json +0 -525
- package/my_template/node_modules/@babel/code-frame/LICENSE +0 -22
- package/my_template/node_modules/@babel/code-frame/README.md +0 -19
- package/my_template/node_modules/@babel/code-frame/lib/index.js +0 -157
- package/my_template/node_modules/@babel/code-frame/lib/index.js.map +0 -1
- package/my_template/node_modules/@babel/code-frame/package.json +0 -30
- package/my_template/node_modules/@babel/helper-validator-identifier/LICENSE +0 -22
- package/my_template/node_modules/@babel/helper-validator-identifier/README.md +0 -19
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js +0 -70
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +0 -1
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js +0 -57
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js.map +0 -1
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js +0 -35
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +0 -1
- package/my_template/node_modules/@babel/helper-validator-identifier/package.json +0 -28
- package/my_template/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +0 -73
- package/my_template/node_modules/@babel/highlight/LICENSE +0 -22
- package/my_template/node_modules/@babel/highlight/README.md +0 -19
- package/my_template/node_modules/@babel/highlight/lib/index.js +0 -105
- package/my_template/node_modules/@babel/highlight/lib/index.js.map +0 -1
- package/my_template/node_modules/@babel/highlight/package.json +0 -29
- package/my_template/node_modules/@types/estree/LICENSE +0 -21
- package/my_template/node_modules/@types/estree/README.md +0 -15
- package/my_template/node_modules/@types/estree/flow.d.ts +0 -167
- package/my_template/node_modules/@types/estree/index.d.ts +0 -683
- package/my_template/node_modules/@types/estree/package.json +0 -26
- package/my_template/node_modules/@types/node/LICENSE +0 -21
- package/my_template/node_modules/@types/node/README.md +0 -15
- package/my_template/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/my_template/node_modules/@types/node/assert.d.ts +0 -996
- package/my_template/node_modules/@types/node/async_hooks.d.ts +0 -539
- package/my_template/node_modules/@types/node/buffer.d.ts +0 -2362
- package/my_template/node_modules/@types/node/child_process.d.ts +0 -1540
- package/my_template/node_modules/@types/node/cluster.d.ts +0 -432
- package/my_template/node_modules/@types/node/console.d.ts +0 -415
- package/my_template/node_modules/@types/node/constants.d.ts +0 -19
- package/my_template/node_modules/@types/node/crypto.d.ts +0 -4456
- package/my_template/node_modules/@types/node/dgram.d.ts +0 -586
- package/my_template/node_modules/@types/node/diagnostics_channel.d.ts +0 -191
- package/my_template/node_modules/@types/node/dns/promises.d.ts +0 -425
- package/my_template/node_modules/@types/node/dns.d.ts +0 -809
- package/my_template/node_modules/@types/node/dom-events.d.ts +0 -122
- package/my_template/node_modules/@types/node/domain.d.ts +0 -170
- package/my_template/node_modules/@types/node/events.d.ts +0 -879
- package/my_template/node_modules/@types/node/fs/promises.d.ts +0 -1239
- package/my_template/node_modules/@types/node/fs.d.ts +0 -4291
- package/my_template/node_modules/@types/node/globals.d.ts +0 -385
- package/my_template/node_modules/@types/node/globals.global.d.ts +0 -1
- package/my_template/node_modules/@types/node/http.d.ts +0 -1888
- package/my_template/node_modules/@types/node/http2.d.ts +0 -2382
- package/my_template/node_modules/@types/node/https.d.ts +0 -550
- package/my_template/node_modules/@types/node/index.d.ts +0 -88
- package/my_template/node_modules/@types/node/inspector.d.ts +0 -2747
- package/my_template/node_modules/@types/node/module.d.ts +0 -301
- package/my_template/node_modules/@types/node/net.d.ts +0 -949
- package/my_template/node_modules/@types/node/os.d.ts +0 -478
- package/my_template/node_modules/@types/node/package.json +0 -230
- package/my_template/node_modules/@types/node/path.d.ts +0 -191
- package/my_template/node_modules/@types/node/perf_hooks.d.ts +0 -639
- package/my_template/node_modules/@types/node/process.d.ts +0 -1539
- package/my_template/node_modules/@types/node/punycode.d.ts +0 -117
- package/my_template/node_modules/@types/node/querystring.d.ts +0 -141
- package/my_template/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/my_template/node_modules/@types/node/readline.d.ts +0 -539
- package/my_template/node_modules/@types/node/repl.d.ts +0 -430
- package/my_template/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/my_template/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/my_template/node_modules/@types/node/stream/web.d.ts +0 -350
- package/my_template/node_modules/@types/node/stream.d.ts +0 -1701
- package/my_template/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/my_template/node_modules/@types/node/test.d.ts +0 -1382
- package/my_template/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/my_template/node_modules/@types/node/timers.d.ts +0 -240
- package/my_template/node_modules/@types/node/tls.d.ts +0 -1210
- package/my_template/node_modules/@types/node/trace_events.d.ts +0 -182
- package/my_template/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/my_template/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/my_template/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/my_template/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/my_template/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/my_template/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/my_template/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/my_template/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/my_template/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/my_template/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/my_template/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/my_template/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/my_template/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/my_template/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/my_template/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/my_template/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/my_template/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/my_template/node_modules/@types/node/ts4.8/fs.d.ts +0 -4291
- package/my_template/node_modules/@types/node/ts4.8/globals.d.ts +0 -385
- package/my_template/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/my_template/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/my_template/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/my_template/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/my_template/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/my_template/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/my_template/node_modules/@types/node/ts4.8/module.d.ts +0 -301
- package/my_template/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/my_template/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/my_template/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/my_template/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/my_template/node_modules/@types/node/ts4.8/process.d.ts +0 -1539
- package/my_template/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/my_template/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/my_template/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/my_template/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/my_template/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/my_template/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/my_template/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/my_template/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/my_template/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/my_template/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/my_template/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/my_template/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/my_template/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/my_template/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/my_template/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/my_template/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/my_template/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/my_template/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/my_template/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/my_template/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/my_template/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/my_template/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/my_template/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/my_template/node_modules/@types/node/tty.d.ts +0 -208
- package/my_template/node_modules/@types/node/url.d.ts +0 -927
- package/my_template/node_modules/@types/node/util.d.ts +0 -2183
- package/my_template/node_modules/@types/node/v8.d.ts +0 -635
- package/my_template/node_modules/@types/node/vm.d.ts +0 -903
- package/my_template/node_modules/@types/node/wasi.d.ts +0 -158
- package/my_template/node_modules/@types/node/worker_threads.d.ts +0 -691
- package/my_template/node_modules/@types/node/zlib.d.ts +0 -517
- package/my_template/node_modules/@types/resolve/LICENSE +0 -21
- package/my_template/node_modules/@types/resolve/README.md +0 -16
- package/my_template/node_modules/@types/resolve/index.d.ts +0 -113
- package/my_template/node_modules/@types/resolve/package.json +0 -29
- package/my_template/node_modules/acorn/CHANGELOG.md +0 -620
- package/my_template/node_modules/acorn/LICENSE +0 -21
- package/my_template/node_modules/acorn/README.md +0 -269
- package/my_template/node_modules/acorn/bin/acorn +0 -4
- package/my_template/node_modules/acorn/dist/acorn.d.ts +0 -209
- package/my_template/node_modules/acorn/dist/acorn.js +0 -5186
- package/my_template/node_modules/acorn/dist/acorn.js.map +0 -1
- package/my_template/node_modules/acorn/dist/acorn.mjs +0 -5155
- package/my_template/node_modules/acorn/dist/acorn.mjs.d.ts +0 -2
- package/my_template/node_modules/acorn/dist/acorn.mjs.map +0 -1
- package/my_template/node_modules/acorn/dist/bin.js +0 -64
- package/my_template/node_modules/acorn/package.json +0 -35
- package/my_template/node_modules/amdefine/LICENSE +0 -58
- package/my_template/node_modules/amdefine/README.md +0 -171
- package/my_template/node_modules/amdefine/amdefine.js +0 -301
- package/my_template/node_modules/amdefine/intercept.js +0 -36
- package/my_template/node_modules/amdefine/package.json +0 -16
- package/my_template/node_modules/ansi-styles/index.js +0 -165
- package/my_template/node_modules/ansi-styles/license +0 -9
- package/my_template/node_modules/ansi-styles/package.json +0 -56
- package/my_template/node_modules/ansi-styles/readme.md +0 -147
- package/my_template/node_modules/builtin-modules/builtin-modules.json +0 -43
- package/my_template/node_modules/builtin-modules/index.d.ts +0 -14
- package/my_template/node_modules/builtin-modules/index.js +0 -11
- package/my_template/node_modules/builtin-modules/license +0 -9
- package/my_template/node_modules/builtin-modules/package.json +0 -44
- package/my_template/node_modules/builtin-modules/readme.md +0 -44
- package/my_template/node_modules/builtin-modules/static.d.ts +0 -14
- package/my_template/node_modules/builtin-modules/static.js +0 -2
- package/my_template/node_modules/chalk/index.js +0 -228
- package/my_template/node_modules/chalk/index.js.flow +0 -93
- package/my_template/node_modules/chalk/license +0 -9
- package/my_template/node_modules/chalk/package.json +0 -71
- package/my_template/node_modules/chalk/readme.md +0 -314
- package/my_template/node_modules/chalk/templates.js +0 -128
- package/my_template/node_modules/chalk/types/index.d.ts +0 -97
- package/my_template/node_modules/clean-css/History.md +0 -1138
- package/my_template/node_modules/clean-css/LICENSE +0 -19
- package/my_template/node_modules/clean-css/README.md +0 -369
- package/my_template/node_modules/clean-css/bin/cleancss +0 -184
- package/my_template/node_modules/clean-css/index.js +0 -1
- package/my_template/node_modules/clean-css/lib/clean.js +0 -231
- package/my_template/node_modules/clean-css/lib/colors/hex-name-shortener.js +0 -186
- package/my_template/node_modules/clean-css/lib/colors/hsl.js +0 -67
- package/my_template/node_modules/clean-css/lib/colors/rgb.js +0 -16
- package/my_template/node_modules/clean-css/lib/imports/inliner.js +0 -399
- package/my_template/node_modules/clean-css/lib/properties/break-up.js +0 -335
- package/my_template/node_modules/clean-css/lib/properties/can-override.js +0 -142
- package/my_template/node_modules/clean-css/lib/properties/clone.js +0 -26
- package/my_template/node_modules/clean-css/lib/properties/compactable.js +0 -285
- package/my_template/node_modules/clean-css/lib/properties/every-combination.js +0 -28
- package/my_template/node_modules/clean-css/lib/properties/has-inherit.js +0 -10
- package/my_template/node_modules/clean-css/lib/properties/invalid-property-error.js +0 -10
- package/my_template/node_modules/clean-css/lib/properties/optimizer.js +0 -215
- package/my_template/node_modules/clean-css/lib/properties/override-compactor.js +0 -384
- package/my_template/node_modules/clean-css/lib/properties/populate-components.js +0 -32
- package/my_template/node_modules/clean-css/lib/properties/remove-unused.js +0 -10
- package/my_template/node_modules/clean-css/lib/properties/restore-from-optimizing.js +0 -60
- package/my_template/node_modules/clean-css/lib/properties/restore.js +0 -232
- package/my_template/node_modules/clean-css/lib/properties/shorthand-compactor.js +0 -134
- package/my_template/node_modules/clean-css/lib/properties/validator.js +0 -197
- package/my_template/node_modules/clean-css/lib/properties/vendor-prefixes.js +0 -26
- package/my_template/node_modules/clean-css/lib/properties/wrap-for-optimizing.js +0 -118
- package/my_template/node_modules/clean-css/lib/selectors/advanced.js +0 -86
- package/my_template/node_modules/clean-css/lib/selectors/clean-up.js +0 -89
- package/my_template/node_modules/clean-css/lib/selectors/extractor.js +0 -69
- package/my_template/node_modules/clean-css/lib/selectors/is-special.js +0 -5
- package/my_template/node_modules/clean-css/lib/selectors/merge-adjacent.js +0 -35
- package/my_template/node_modules/clean-css/lib/selectors/merge-media-queries.js +0 -64
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js +0 -61
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js +0 -76
- package/my_template/node_modules/clean-css/lib/selectors/reduce-non-adjacent.js +0 -172
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js +0 -21
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicates.js +0 -41
- package/my_template/node_modules/clean-css/lib/selectors/reorderable.js +0 -99
- package/my_template/node_modules/clean-css/lib/selectors/restructure.js +0 -369
- package/my_template/node_modules/clean-css/lib/selectors/simple.js +0 -454
- package/my_template/node_modules/clean-css/lib/source-maps/track.js +0 -119
- package/my_template/node_modules/clean-css/lib/stringifier/helpers.js +0 -167
- package/my_template/node_modules/clean-css/lib/stringifier/one-time.js +0 -50
- package/my_template/node_modules/clean-css/lib/stringifier/simple.js +0 -22
- package/my_template/node_modules/clean-css/lib/stringifier/source-maps.js +0 -96
- package/my_template/node_modules/clean-css/lib/text/comments-processor.js +0 -131
- package/my_template/node_modules/clean-css/lib/text/escape-store.js +0 -53
- package/my_template/node_modules/clean-css/lib/text/expressions-processor.js +0 -117
- package/my_template/node_modules/clean-css/lib/text/free-text-processor.js +0 -98
- package/my_template/node_modules/clean-css/lib/text/urls-processor.js +0 -75
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-properties.js +0 -193
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-selectors.js +0 -17
- package/my_template/node_modules/clean-css/lib/tokenizer/tokenize.js +0 -297
- package/my_template/node_modules/clean-css/lib/urls/rebase.js +0 -30
- package/my_template/node_modules/clean-css/lib/urls/reduce.js +0 -154
- package/my_template/node_modules/clean-css/lib/urls/rewrite.js +0 -107
- package/my_template/node_modules/clean-css/lib/utils/clone-array.js +0 -12
- package/my_template/node_modules/clean-css/lib/utils/compatibility.js +0 -162
- package/my_template/node_modules/clean-css/lib/utils/input-source-map-tracker.js +0 -284
- package/my_template/node_modules/clean-css/lib/utils/object.js +0 -11
- package/my_template/node_modules/clean-css/lib/utils/quote-scanner.js +0 -119
- package/my_template/node_modules/clean-css/lib/utils/source-reader.js +0 -96
- package/my_template/node_modules/clean-css/lib/utils/source-tracker.js +0 -31
- package/my_template/node_modules/clean-css/lib/utils/split.js +0 -62
- package/my_template/node_modules/clean-css/node_modules/source-map/README.md +0 -510
- package/my_template/node_modules/clean-css/node_modules/source-map/build/assert-shim.js +0 -56
- package/my_template/node_modules/clean-css/node_modules/source-map/build/mini-require.js +0 -152
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-source-map.jsm +0 -21
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-utils.jsm +0 -18
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-browser.js +0 -8
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-source-map.jsm +0 -6
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-utils.jsm +0 -21
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-prefix.js +0 -8
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-suffix.js +0 -3
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/array-set.js +0 -107
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64-vlq.js +0 -146
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64.js +0 -73
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/binary-search.js +0 -117
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/mapping-list.js +0 -86
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/quick-sort.js +0 -120
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -1077
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-generator.js +0 -399
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-node.js +0 -414
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/util.js +0 -370
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map.js +0 -8
- package/my_template/node_modules/clean-css/node_modules/source-map/package.json +0 -68
- package/my_template/node_modules/clean-css/package.json +0 -53
- package/my_template/node_modules/color-convert/CHANGELOG.md +0 -54
- package/my_template/node_modules/color-convert/LICENSE +0 -21
- package/my_template/node_modules/color-convert/README.md +0 -68
- package/my_template/node_modules/color-convert/conversions.js +0 -868
- package/my_template/node_modules/color-convert/index.js +0 -78
- package/my_template/node_modules/color-convert/package.json +0 -46
- package/my_template/node_modules/color-convert/route.js +0 -97
- package/my_template/node_modules/color-name/.eslintrc.json +0 -43
- package/my_template/node_modules/color-name/LICENSE +0 -8
- package/my_template/node_modules/color-name/README.md +0 -11
- package/my_template/node_modules/color-name/index.js +0 -152
- package/my_template/node_modules/color-name/package.json +0 -25
- package/my_template/node_modules/color-name/test.js +0 -7
- package/my_template/node_modules/commander/History.md +0 -256
- package/my_template/node_modules/commander/LICENSE +0 -22
- package/my_template/node_modules/commander/Readme.md +0 -342
- package/my_template/node_modules/commander/index.js +0 -1103
- package/my_template/node_modules/commander/package.json +0 -33
- package/my_template/node_modules/copy-anything/LICENSE +0 -21
- package/my_template/node_modules/copy-anything/README.md +0 -130
- package/my_template/node_modules/copy-anything/dist/index.cjs +0 -52
- package/my_template/node_modules/copy-anything/dist/index.es.js +0 -48
- package/my_template/node_modules/copy-anything/dist/types/index.d.ts +0 -15
- package/my_template/node_modules/copy-anything/package.json +0 -98
- package/my_template/node_modules/errno/.jshintrc +0 -59
- package/my_template/node_modules/errno/.travis.yml +0 -19
- package/my_template/node_modules/errno/README.md +0 -145
- package/my_template/node_modules/errno/build.js +0 -43
- package/my_template/node_modules/errno/cli.js +0 -22
- package/my_template/node_modules/errno/custom.js +0 -57
- package/my_template/node_modules/errno/errno.js +0 -313
- package/my_template/node_modules/errno/package.json +0 -33
- package/my_template/node_modules/errno/test.js +0 -88
- package/my_template/node_modules/escape-string-regexp/index.js +0 -11
- package/my_template/node_modules/escape-string-regexp/license +0 -21
- package/my_template/node_modules/escape-string-regexp/package.json +0 -41
- package/my_template/node_modules/escape-string-regexp/readme.md +0 -27
- package/my_template/node_modules/estree-walker/CHANGELOG.md +0 -55
- package/my_template/node_modules/estree-walker/README.md +0 -45
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js +0 -65
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js.map +0 -1
- package/my_template/node_modules/estree-walker/index.d.ts +0 -27
- package/my_template/node_modules/estree-walker/package.json +0 -30
- package/my_template/node_modules/estree-walker/src/estree-walker.js +0 -51
- package/my_template/node_modules/function-bind/.eslintrc +0 -21
- package/my_template/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/my_template/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/my_template/node_modules/function-bind/.nycrc +0 -13
- package/my_template/node_modules/function-bind/CHANGELOG.md +0 -136
- package/my_template/node_modules/function-bind/LICENSE +0 -20
- package/my_template/node_modules/function-bind/README.md +0 -46
- package/my_template/node_modules/function-bind/implementation.js +0 -84
- package/my_template/node_modules/function-bind/index.js +0 -5
- package/my_template/node_modules/function-bind/package.json +0 -87
- package/my_template/node_modules/function-bind/test/.eslintrc +0 -9
- package/my_template/node_modules/function-bind/test/index.js +0 -252
- package/my_template/node_modules/graceful-fs/LICENSE +0 -15
- package/my_template/node_modules/graceful-fs/README.md +0 -143
- package/my_template/node_modules/graceful-fs/clone.js +0 -23
- package/my_template/node_modules/graceful-fs/graceful-fs.js +0 -448
- package/my_template/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/my_template/node_modules/graceful-fs/package.json +0 -53
- package/my_template/node_modules/graceful-fs/polyfills.js +0 -355
- package/my_template/node_modules/graceful-readlink/.travis.yml +0 -5
- package/my_template/node_modules/graceful-readlink/LICENSE +0 -22
- package/my_template/node_modules/graceful-readlink/README.md +0 -17
- package/my_template/node_modules/graceful-readlink/index.js +0 -12
- package/my_template/node_modules/graceful-readlink/package.json +0 -18
- package/my_template/node_modules/has-flag/index.js +0 -8
- package/my_template/node_modules/has-flag/license +0 -9
- package/my_template/node_modules/has-flag/package.json +0 -44
- package/my_template/node_modules/has-flag/readme.md +0 -70
- package/my_template/node_modules/hasown/.eslintrc +0 -5
- package/my_template/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/my_template/node_modules/hasown/.nycrc +0 -13
- package/my_template/node_modules/hasown/CHANGELOG.md +0 -20
- package/my_template/node_modules/hasown/LICENSE +0 -21
- package/my_template/node_modules/hasown/README.md +0 -40
- package/my_template/node_modules/hasown/index.d.ts +0 -3
- package/my_template/node_modules/hasown/index.d.ts.map +0 -1
- package/my_template/node_modules/hasown/index.js +0 -8
- package/my_template/node_modules/hasown/package.json +0 -91
- package/my_template/node_modules/hasown/tsconfig.json +0 -49
- package/my_template/node_modules/image-size/LICENSE +0 -9
- package/my_template/node_modules/image-size/Readme.md +0 -88
- package/my_template/node_modules/image-size/bin/image-size.js +0 -36
- package/my_template/node_modules/image-size/lib/detector.js +0 -19
- package/my_template/node_modules/image-size/lib/index.js +0 -105
- package/my_template/node_modules/image-size/lib/readUInt.js +0 -11
- package/my_template/node_modules/image-size/lib/types/bmp.js +0 -17
- package/my_template/node_modules/image-size/lib/types/dds.js +0 -18
- package/my_template/node_modules/image-size/lib/types/gif.js +0 -19
- package/my_template/node_modules/image-size/lib/types/jpg.js +0 -62
- package/my_template/node_modules/image-size/lib/types/png.js +0 -36
- package/my_template/node_modules/image-size/lib/types/psd.js +0 -17
- package/my_template/node_modules/image-size/lib/types/svg.js +0 -78
- package/my_template/node_modules/image-size/lib/types/tiff.js +0 -118
- package/my_template/node_modules/image-size/lib/types/webp.js +0 -69
- package/my_template/node_modules/image-size/lib/types.js +0 -13
- package/my_template/node_modules/image-size/package.json +0 -49
- package/my_template/node_modules/is-core-module/.eslintrc +0 -18
- package/my_template/node_modules/is-core-module/.nycrc +0 -9
- package/my_template/node_modules/is-core-module/CHANGELOG.md +0 -180
- package/my_template/node_modules/is-core-module/LICENSE +0 -20
- package/my_template/node_modules/is-core-module/README.md +0 -40
- package/my_template/node_modules/is-core-module/core.json +0 -158
- package/my_template/node_modules/is-core-module/index.js +0 -69
- package/my_template/node_modules/is-core-module/package.json +0 -73
- package/my_template/node_modules/is-core-module/test/index.js +0 -133
- package/my_template/node_modules/is-module/README.md +0 -41
- package/my_template/node_modules/is-module/component.json +0 -11
- package/my_template/node_modules/is-module/index.js +0 -11
- package/my_template/node_modules/is-module/package.json +0 -20
- package/my_template/node_modules/is-what/.babelrc +0 -3
- package/my_template/node_modules/is-what/.eslintignore +0 -9
- package/my_template/node_modules/is-what/.eslintrc.js +0 -18
- package/my_template/node_modules/is-what/.github/FUNDING.yml +0 -12
- package/my_template/node_modules/is-what/.prettierrc +0 -9
- package/my_template/node_modules/is-what/.vscode/settings.json +0 -9
- package/my_template/node_modules/is-what/LICENSE +0 -21
- package/my_template/node_modules/is-what/README.md +0 -191
- package/my_template/node_modules/is-what/build.js +0 -60
- package/my_template/node_modules/is-what/dist/index.cjs.js +0 -364
- package/my_template/node_modules/is-what/dist/index.esm.js +0 -327
- package/my_template/node_modules/is-what/package.json +0 -86
- package/my_template/node_modules/is-what/src/index.ts +0 -395
- package/my_template/node_modules/is-what/test/ava.ts +0 -376
- package/my_template/node_modules/is-what/test/index.test.js +0 -15
- package/my_template/node_modules/is-what/tsconfig.json +0 -11
- package/my_template/node_modules/is-what/types/index.d.ts +0 -253
- package/my_template/node_modules/jest-worker/LICENSE +0 -21
- package/my_template/node_modules/jest-worker/README.md +0 -215
- package/my_template/node_modules/jest-worker/build/Farm.d.ts +0 -27
- package/my_template/node_modules/jest-worker/build/Farm.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/Farm.js +0 -179
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts +0 -14
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/WorkerPool.js +0 -49
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +0 -22
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.js +0 -134
- package/my_template/node_modules/jest-worker/build/index.d.ts +0 -46
- package/my_template/node_modules/jest-worker/build/index.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/index.js +0 -184
- package/my_template/node_modules/jest-worker/build/types.d.ts +0 -98
- package/my_template/node_modules/jest-worker/build/types.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/types.js +0 -43
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +0 -47
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.js +0 -310
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +0 -29
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +0 -289
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts +0 -8
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/workers/processChild.js +0 -166
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts +0 -8
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts.map +0 -1
- package/my_template/node_modules/jest-worker/build/workers/threadChild.js +0 -176
- package/my_template/node_modules/jest-worker/node_modules/supports-color/browser.js +0 -5
- package/my_template/node_modules/jest-worker/node_modules/supports-color/index.js +0 -138
- package/my_template/node_modules/jest-worker/node_modules/supports-color/license +0 -9
- package/my_template/node_modules/jest-worker/node_modules/supports-color/package.json +0 -53
- package/my_template/node_modules/jest-worker/node_modules/supports-color/readme.md +0 -85
- package/my_template/node_modules/jest-worker/package.json +0 -29
- package/my_template/node_modules/js-tokens/CHANGELOG.md +0 -151
- package/my_template/node_modules/js-tokens/LICENSE +0 -21
- package/my_template/node_modules/js-tokens/README.md +0 -240
- package/my_template/node_modules/js-tokens/index.js +0 -23
- package/my_template/node_modules/js-tokens/package.json +0 -30
- package/my_template/node_modules/less/.eslintignore +0 -5
- package/my_template/node_modules/less/.eslintrc.json +0 -3
- package/my_template/node_modules/less/Gruntfile.js +0 -420
- package/my_template/node_modules/less/README.md +0 -13
- package/my_template/node_modules/less/bin/lessc +0 -633
- package/my_template/node_modules/less/bower.json +0 -22
- package/my_template/node_modules/less/dist/less.js +0 -11275
- package/my_template/node_modules/less/dist/less.min.js +0 -11
- package/my_template/node_modules/less/dist/less.min.js.map +0 -1
- package/my_template/node_modules/less/index.js +0 -1
- package/my_template/node_modules/less/lib/less/constants.js +0 -15
- package/my_template/node_modules/less/lib/less/constants.js.map +0 -1
- package/my_template/node_modules/less/lib/less/contexts.js +0 -171
- package/my_template/node_modules/less/lib/less/contexts.js.map +0 -1
- package/my_template/node_modules/less/lib/less/data/colors.js +0 -153
- package/my_template/node_modules/less/lib/less/data/colors.js.map +0 -1
- package/my_template/node_modules/less/lib/less/data/index.js +0 -9
- package/my_template/node_modules/less/lib/less/data/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js +0 -24
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js.map +0 -1
- package/my_template/node_modules/less/lib/less/default-options.js +0 -57
- package/my_template/node_modules/less/lib/less/default-options.js.map +0 -1
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js +0 -122
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js.map +0 -1
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js +0 -168
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js.map +0 -1
- package/my_template/node_modules/less/lib/less/environment/environment-api.js +0 -28
- package/my_template/node_modules/less/lib/less/environment/environment-api.js.map +0 -1
- package/my_template/node_modules/less/lib/less/environment/environment.js +0 -57
- package/my_template/node_modules/less/lib/less/environment/environment.js.map +0 -1
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js +0 -106
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/boolean.js +0 -21
- package/my_template/node_modules/less/lib/less/functions/boolean.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/color-blending.js +0 -78
- package/my_template/node_modules/less/lib/less/functions/color-blending.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/color.js +0 -404
- package/my_template/node_modules/less/lib/less/functions/color.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/data-uri.js +0 -86
- package/my_template/node_modules/less/lib/less/functions/data-uri.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/default.js +0 -29
- package/my_template/node_modules/less/lib/less/functions/default.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/function-caller.js +0 -66
- package/my_template/node_modules/less/lib/less/functions/function-caller.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/function-registry.js +0 -36
- package/my_template/node_modules/less/lib/less/functions/function-registry.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/index.js +0 -35
- package/my_template/node_modules/less/lib/less/functions/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/list.js +0 -136
- package/my_template/node_modules/less/lib/less/functions/list.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/math-helper.js +0 -20
- package/my_template/node_modules/less/lib/less/functions/math-helper.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/math.js +0 -30
- package/my_template/node_modules/less/lib/less/functions/math.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/number.js +0 -98
- package/my_template/node_modules/less/lib/less/functions/number.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/string.js +0 -42
- package/my_template/node_modules/less/lib/less/functions/string.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/svg.js +0 -88
- package/my_template/node_modules/less/lib/less/functions/svg.js.map +0 -1
- package/my_template/node_modules/less/lib/less/functions/types.js +0 -75
- package/my_template/node_modules/less/lib/less/functions/types.js.map +0 -1
- package/my_template/node_modules/less/lib/less/import-manager.js +0 -196
- package/my_template/node_modules/less/lib/less/import-manager.js.map +0 -1
- package/my_template/node_modules/less/lib/less/index.js +0 -130
- package/my_template/node_modules/less/lib/less/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less/less-error.js +0 -162
- package/my_template/node_modules/less/lib/less/less-error.js.map +0 -1
- package/my_template/node_modules/less/lib/less/logger.js +0 -37
- package/my_template/node_modules/less/lib/less/logger.js.map +0 -1
- package/my_template/node_modules/less/lib/less/parse-tree.js +0 -69
- package/my_template/node_modules/less/lib/less/parse-tree.js.map +0 -1
- package/my_template/node_modules/less/lib/less/parse.js +0 -108
- package/my_template/node_modules/less/lib/less/parse.js.map +0 -1
- package/my_template/node_modules/less/lib/less/parser/chunker.js +0 -147
- package/my_template/node_modules/less/lib/less/parser/chunker.js.map +0 -1
- package/my_template/node_modules/less/lib/less/parser/parser-input.js +0 -355
- package/my_template/node_modules/less/lib/less/parser/parser-input.js.map +0 -1
- package/my_template/node_modules/less/lib/less/parser/parser.js +0 -2262
- package/my_template/node_modules/less/lib/less/parser/parser.js.map +0 -1
- package/my_template/node_modules/less/lib/less/plugin-manager.js +0 -158
- package/my_template/node_modules/less/lib/less/plugin-manager.js.map +0 -1
- package/my_template/node_modules/less/lib/less/render.js +0 -64
- package/my_template/node_modules/less/lib/less/render.js.map +0 -1
- package/my_template/node_modules/less/lib/less/source-map-builder.js +0 -72
- package/my_template/node_modules/less/lib/less/source-map-builder.js.map +0 -1
- package/my_template/node_modules/less/lib/less/source-map-output.js +0 -140
- package/my_template/node_modules/less/lib/less/source-map-output.js.map +0 -1
- package/my_template/node_modules/less/lib/less/transform-tree.js +0 -93
- package/my_template/node_modules/less/lib/less/transform-tree.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/anonymous.js +0 -34
- package/my_template/node_modules/less/lib/less/tree/anonymous.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/assignment.js +0 -32
- package/my_template/node_modules/less/lib/less/tree/assignment.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/atrule.js +0 -146
- package/my_template/node_modules/less/lib/less/tree/atrule.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/attribute.js +0 -29
- package/my_template/node_modules/less/lib/less/tree/attribute.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/call.js +0 -104
- package/my_template/node_modules/less/lib/less/tree/call.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/color.js +0 -243
- package/my_template/node_modules/less/lib/less/tree/color.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/combinator.js +0 -29
- package/my_template/node_modules/less/lib/less/tree/combinator.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/comment.js +0 -28
- package/my_template/node_modules/less/lib/less/tree/comment.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/condition.js +0 -41
- package/my_template/node_modules/less/lib/less/tree/condition.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/debug-info.js +0 -37
- package/my_template/node_modules/less/lib/less/tree/debug-info.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/declaration.js +0 -118
- package/my_template/node_modules/less/lib/less/tree/declaration.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js +0 -47
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/dimension.js +0 -159
- package/my_template/node_modules/less/lib/less/tree/dimension.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/element.js +0 -64
- package/my_template/node_modules/less/lib/less/tree/element.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/expression.js +0 -90
- package/my_template/node_modules/less/lib/less/tree/expression.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/extend.js +0 -62
- package/my_template/node_modules/less/lib/less/tree/extend.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/import.js +0 -191
- package/my_template/node_modules/less/lib/less/tree/import.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/index.js +0 -56
- package/my_template/node_modules/less/lib/less/tree/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/javascript.js +0 -35
- package/my_template/node_modules/less/lib/less/tree/javascript.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js +0 -57
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/keyword.js +0 -21
- package/my_template/node_modules/less/lib/less/tree/keyword.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/media.js +0 -152
- package/my_template/node_modules/less/lib/less/tree/media.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js +0 -194
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js +0 -233
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js +0 -76
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/negative.js +0 -25
- package/my_template/node_modules/less/lib/less/tree/negative.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/node.js +0 -166
- package/my_template/node_modules/less/lib/less/tree/node.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/operation.js +0 -77
- package/my_template/node_modules/less/lib/less/tree/operation.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/paren.js +0 -21
- package/my_template/node_modules/less/lib/less/tree/paren.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/property.js +0 -62
- package/my_template/node_modules/less/lib/less/tree/property.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/quoted.js +0 -66
- package/my_template/node_modules/less/lib/less/tree/quoted.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/ruleset.js +0 -786
- package/my_template/node_modules/less/lib/less/tree/ruleset.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/selector.js +0 -126
- package/my_template/node_modules/less/lib/less/tree/selector.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js +0 -13
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/unit.js +0 -141
- package/my_template/node_modules/less/lib/less/tree/unit.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/url.js +0 -60
- package/my_template/node_modules/less/lib/less/tree/url.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/value.js +0 -43
- package/my_template/node_modules/less/lib/less/tree/value.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/variable-call.js +0 -44
- package/my_template/node_modules/less/lib/less/tree/variable-call.js.map +0 -1
- package/my_template/node_modules/less/lib/less/tree/variable.js +0 -61
- package/my_template/node_modules/less/lib/less/tree/variable.js.map +0 -1
- package/my_template/node_modules/less/lib/less/utils.js +0 -143
- package/my_template/node_modules/less/lib/less/utils.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js +0 -462
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js +0 -61
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js +0 -202
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/index.js +0 -20
- package/my_template/node_modules/less/lib/less/visitors/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js +0 -57
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js +0 -43
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js +0 -321
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less/visitors/visitor.js +0 -158
- package/my_template/node_modules/less/lib/less/visitors/visitor.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js +0 -45
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js +0 -64
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/browser.js +0 -80
- package/my_template/node_modules/less/lib/less-browser/browser.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/cache.js +0 -45
- package/my_template/node_modules/less/lib/less-browser/cache.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js +0 -183
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/file-manager.js +0 -122
- package/my_template/node_modules/less/lib/less-browser/file-manager.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/image-size.js +0 -30
- package/my_template/node_modules/less/lib/less-browser/image-size.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/index.js +0 -256
- package/my_template/node_modules/less/lib/less-browser/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/log-listener.js +0 -43
- package/my_template/node_modules/less/lib/less-browser/log-listener.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js +0 -42
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js.map +0 -1
- package/my_template/node_modules/less/lib/less-browser/utils.js +0 -29
- package/my_template/node_modules/less/lib/less-browser/utils.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/environment.js +0 -19
- package/my_template/node_modules/less/lib/less-node/environment.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/file-manager.js +0 -158
- package/my_template/node_modules/less/lib/less-node/file-manager.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/fs.js +0 -11
- package/my_template/node_modules/less/lib/less-node/fs.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/image-size.js +0 -54
- package/my_template/node_modules/less/lib/less-node/image-size.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/index.js +0 -28
- package/my_template/node_modules/less/lib/less-node/index.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js +0 -92
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js +0 -73
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js.map +0 -1
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js +0 -68
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js.map +0 -1
- package/my_template/node_modules/less/package.json +0 -133
- package/my_template/node_modules/less/test/.eslintrc.json +0 -9
- package/my_template/node_modules/less/test/README.md +0 -3
- package/my_template/node_modules/less/test/browser/common.js +0 -230
- package/my_template/node_modules/less/test/browser/css/global-vars/simple.css +0 -3
- package/my_template/node_modules/less/test/browser/css/modify-vars/simple.css +0 -8
- package/my_template/node_modules/less/test/browser/css/plugin/plugin.css +0 -3
- package/my_template/node_modules/less/test/browser/css/postProcessor/postProcessor.css +0 -4
- package/my_template/node_modules/less/test/browser/css/relative-urls/urls.css +0 -36
- package/my_template/node_modules/less/test/browser/css/rewrite-urls/urls.css +0 -36
- package/my_template/node_modules/less/test/browser/css/rootpath/urls.css +0 -35
- package/my_template/node_modules/less/test/browser/css/rootpath-relative/urls.css +0 -35
- package/my_template/node_modules/less/test/browser/css/rootpath-rewrite-urls/urls.css +0 -35
- package/my_template/node_modules/less/test/browser/css/urls.css +0 -54
- package/my_template/node_modules/less/test/browser/generator/benchmark.config.js +0 -50
- package/my_template/node_modules/less/test/browser/generator/generate.js +0 -78
- package/my_template/node_modules/less/test/browser/generator/runner.config.js +0 -186
- package/my_template/node_modules/less/test/browser/generator/runner.js +0 -2
- package/my_template/node_modules/less/test/browser/generator/template.js +0 -83
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.less +0 -3
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.txt +0 -2
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.less +0 -3
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.txt +0 -4
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.less +0 -3
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.txt +0 -4
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.less +0 -3
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.txt +0 -4
- package/my_template/node_modules/less/test/browser/less/global-vars/simple.less +0 -3
- package/my_template/node_modules/less/test/browser/less/imports/urls.less +0 -4
- package/my_template/node_modules/less/test/browser/less/imports/urls2.less +0 -4
- package/my_template/node_modules/less/test/browser/less/modify-vars/imports/simple2.less +0 -4
- package/my_template/node_modules/less/test/browser/less/modify-vars/simple.less +0 -8
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +0 -5
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +0 -15
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.js +0 -4
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.less +0 -4
- package/my_template/node_modules/less/test/browser/less/postProcessor/postProcessor.less +0 -4
- package/my_template/node_modules/less/test/browser/less/relative-urls/urls.less +0 -34
- package/my_template/node_modules/less/test/browser/less/rewrite-urls/urls.less +0 -34
- package/my_template/node_modules/less/test/browser/less/rootpath/urls.less +0 -33
- package/my_template/node_modules/less/test/browser/less/rootpath-relative/urls.less +0 -33
- package/my_template/node_modules/less/test/browser/less/rootpath-rewrite-urls/urls.less +0 -33
- package/my_template/node_modules/less/test/browser/less/urls.less +0 -62
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-browser-options.js +0 -51
- package/my_template/node_modules/less/test/browser/runner-browser-spec.js +0 -12
- package/my_template/node_modules/less/test/browser/runner-console-errors.js +0 -5
- package/my_template/node_modules/less/test/browser/runner-errors-options.js +0 -6
- package/my_template/node_modules/less/test/browser/runner-errors-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin-options.js +0 -5
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-global-vars-options.js +0 -7
- package/my_template/node_modules/less/test/browser/runner-global-vars-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-legacy-options.js +0 -6
- package/my_template/node_modules/less/test/browser/runner-legacy-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-main-options.js +0 -17
- package/my_template/node_modules/less/test/browser/runner-main-spec.js +0 -7
- package/my_template/node_modules/less/test/browser/runner-modify-vars-options.js +0 -5
- package/my_template/node_modules/less/test/browser/runner-modify-vars-spec.js +0 -33
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-options.js +0 -4
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-production-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-production-spec.js +0 -5
- package/my_template/node_modules/less/test/browser/runner-relative-urls-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-relative-urls-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rootpath-options.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-options.js +0 -4
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-options.js +0 -4
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-rootpath-spec.js +0 -3
- package/my_template/node_modules/less/test/browser/runner-strict-units-options.js +0 -5
- package/my_template/node_modules/less/test/browser/runner-strict-units-spec.js +0 -3
- package/my_template/node_modules/less/test/index.js +0 -89
- package/my_template/node_modules/less/test/less-test.js +0 -535
- package/my_template/node_modules/less/test/modify-vars.js +0 -28
- package/my_template/node_modules/less/test/plugins/filemanager/index.js +0 -19
- package/my_template/node_modules/less/test/plugins/postprocess/index.js +0 -14
- package/my_template/node_modules/less/test/plugins/preprocess/index.js +0 -19
- package/my_template/node_modules/less/test/plugins/visitor/index.js +0 -24
- package/my_template/node_modules/less/test/sourcemaps/basic.json +0 -1
- package/my_template/node_modules/less/test/sourcemaps/custom-props.json +0 -1
- package/my_template/node_modules/less/test/sourcemaps/index.html +0 -17
- package/my_template/node_modules/less/test/sourcemaps-disable-annotation/basic.json +0 -1
- package/my_template/node_modules/less/test/test-es6.ts +0 -17
- package/my_template/node_modules/less/tsconfig.json +0 -13
- package/my_template/node_modules/less-plugin-clean-css/LICENSE +0 -201
- package/my_template/node_modules/less-plugin-clean-css/README.md +0 -33
- package/my_template/node_modules/less-plugin-clean-css/lib/clean-css-processor.js +0 -63
- package/my_template/node_modules/less-plugin-clean-css/lib/index.js +0 -23
- package/my_template/node_modules/less-plugin-clean-css/lib/parse-options.js +0 -61
- package/my_template/node_modules/less-plugin-clean-css/lib/usage.js +0 -19
- package/my_template/node_modules/less-plugin-clean-css/package.json +0 -39
- package/my_template/node_modules/make-dir/index.d.ts +0 -39
- package/my_template/node_modules/make-dir/index.js +0 -139
- package/my_template/node_modules/make-dir/license +0 -9
- package/my_template/node_modules/make-dir/package.json +0 -59
- package/my_template/node_modules/make-dir/readme.md +0 -123
- package/my_template/node_modules/merge-stream/LICENSE +0 -21
- package/my_template/node_modules/merge-stream/README.md +0 -78
- package/my_template/node_modules/merge-stream/index.js +0 -41
- package/my_template/node_modules/merge-stream/package.json +0 -19
- package/my_template/node_modules/mime/CHANGELOG.md +0 -164
- package/my_template/node_modules/mime/LICENSE +0 -21
- package/my_template/node_modules/mime/README.md +0 -90
- package/my_template/node_modules/mime/cli.js +0 -8
- package/my_template/node_modules/mime/mime.js +0 -108
- package/my_template/node_modules/mime/package.json +0 -44
- package/my_template/node_modules/mime/src/build.js +0 -53
- package/my_template/node_modules/mime/src/test.js +0 -60
- package/my_template/node_modules/mime/types.json +0 -1
- package/my_template/node_modules/native-request/README.md +0 -184
- package/my_template/node_modules/native-request/commons/jsonToParameter.js +0 -14
- package/my_template/node_modules/native-request/index.js +0 -65
- package/my_template/node_modules/native-request/lib/Request.js +0 -144
- package/my_template/node_modules/native-request/package.json +0 -45
- package/my_template/node_modules/native-request/test/express.get.cookies.js +0 -58
- package/my_template/node_modules/native-request/test/express.get.js +0 -146
- package/my_template/node_modules/native-request/test/express.post.cookies.js +0 -59
- package/my_template/node_modules/native-request/test/express.post.js +0 -148
- package/my_template/node_modules/native-request/test/get.cookies.js +0 -72
- package/my_template/node_modules/native-request/test/get.js +0 -140
- package/my_template/node_modules/native-request/test/post.cookies.js +0 -72
- package/my_template/node_modules/native-request/test/post.js +0 -155
- package/my_template/node_modules/path-parse/LICENSE +0 -21
- package/my_template/node_modules/path-parse/README.md +0 -42
- package/my_template/node_modules/path-parse/index.js +0 -75
- package/my_template/node_modules/path-parse/package.json +0 -33
- package/my_template/node_modules/pify/index.js +0 -68
- package/my_template/node_modules/pify/license +0 -9
- package/my_template/node_modules/pify/package.json +0 -51
- package/my_template/node_modules/pify/readme.md +0 -145
- package/my_template/node_modules/prr/.jshintrc +0 -61
- package/my_template/node_modules/prr/.travis.yml +0 -10
- package/my_template/node_modules/prr/LICENSE.md +0 -11
- package/my_template/node_modules/prr/README.md +0 -47
- package/my_template/node_modules/prr/package.json +0 -26
- package/my_template/node_modules/prr/prr.js +0 -63
- package/my_template/node_modules/prr/test.js +0 -169
- package/my_template/node_modules/resolve/.editorconfig +0 -37
- package/my_template/node_modules/resolve/.eslintrc +0 -65
- package/my_template/node_modules/resolve/.github/FUNDING.yml +0 -12
- package/my_template/node_modules/resolve/LICENSE +0 -21
- package/my_template/node_modules/resolve/SECURITY.md +0 -3
- package/my_template/node_modules/resolve/async.js +0 -3
- package/my_template/node_modules/resolve/bin/resolve +0 -50
- package/my_template/node_modules/resolve/example/async.js +0 -5
- package/my_template/node_modules/resolve/example/sync.js +0 -3
- package/my_template/node_modules/resolve/index.js +0 -6
- package/my_template/node_modules/resolve/lib/async.js +0 -329
- package/my_template/node_modules/resolve/lib/caller.js +0 -8
- package/my_template/node_modules/resolve/lib/core.js +0 -12
- package/my_template/node_modules/resolve/lib/core.json +0 -158
- package/my_template/node_modules/resolve/lib/homedir.js +0 -24
- package/my_template/node_modules/resolve/lib/is-core.js +0 -5
- package/my_template/node_modules/resolve/lib/node-modules-paths.js +0 -42
- package/my_template/node_modules/resolve/lib/normalize-options.js +0 -10
- package/my_template/node_modules/resolve/lib/sync.js +0 -208
- package/my_template/node_modules/resolve/package.json +0 -72
- package/my_template/node_modules/resolve/readme.markdown +0 -301
- package/my_template/node_modules/resolve/sync.js +0 -3
- package/my_template/node_modules/resolve/test/core.js +0 -88
- package/my_template/node_modules/resolve/test/dotdot/abc/index.js +0 -2
- package/my_template/node_modules/resolve/test/dotdot/index.js +0 -1
- package/my_template/node_modules/resolve/test/dotdot.js +0 -29
- package/my_template/node_modules/resolve/test/faulty_basedir.js +0 -29
- package/my_template/node_modules/resolve/test/filter.js +0 -34
- package/my_template/node_modules/resolve/test/filter_sync.js +0 -33
- package/my_template/node_modules/resolve/test/home_paths.js +0 -127
- package/my_template/node_modules/resolve/test/home_paths_sync.js +0 -114
- package/my_template/node_modules/resolve/test/mock.js +0 -315
- package/my_template/node_modules/resolve/test/mock_sync.js +0 -214
- package/my_template/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +0 -1
- package/my_template/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +0 -1
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +0 -1
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +0 -3
- package/my_template/node_modules/resolve/test/module_dir.js +0 -56
- package/my_template/node_modules/resolve/test/node-modules-paths.js +0 -143
- package/my_template/node_modules/resolve/test/node_path/x/aaa/index.js +0 -1
- package/my_template/node_modules/resolve/test/node_path/x/ccc/index.js +0 -1
- package/my_template/node_modules/resolve/test/node_path/y/bbb/index.js +0 -1
- package/my_template/node_modules/resolve/test/node_path/y/ccc/index.js +0 -1
- package/my_template/node_modules/resolve/test/node_path.js +0 -70
- package/my_template/node_modules/resolve/test/nonstring.js +0 -9
- package/my_template/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/my_template/node_modules/resolve/test/pathfilter.js +0 -75
- package/my_template/node_modules/resolve/test/precedence/aaa/index.js +0 -1
- package/my_template/node_modules/resolve/test/precedence/aaa/main.js +0 -1
- package/my_template/node_modules/resolve/test/precedence/aaa.js +0 -1
- package/my_template/node_modules/resolve/test/precedence/bbb/main.js +0 -1
- package/my_template/node_modules/resolve/test/precedence/bbb.js +0 -1
- package/my_template/node_modules/resolve/test/precedence.js +0 -23
- package/my_template/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/baz/package.json +0 -4
- package/my_template/node_modules/resolve/test/resolver/baz/quux.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/package.json +0 -5
- package/my_template/node_modules/resolve/test/resolver/cup.coffee +0 -1
- package/my_template/node_modules/resolve/test/resolver/dot_main/index.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/dot_main/package.json +0 -3
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/index.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/package.json +0 -3
- package/my_template/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/false_main/package.json +0 -4
- package/my_template/node_modules/resolve/test/resolver/foo.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
- package/my_template/node_modules/resolve/test/resolver/invalid_main/package.json +0 -7
- package/my_template/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/my_template/node_modules/resolve/test/resolver/mug.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/lerna.json +0 -6
- package/my_template/node_modules/resolve/test/resolver/multirepo/package.json +0 -20
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +0 -35
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +0 -14
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +0 -14
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +0 -26
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +0 -15
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +0 -12
- package/my_template/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/same_names/foo/index.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/same_names/foo.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/bar.js +0 -1
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/package.json +0 -3
- package/my_template/node_modules/resolve/test/resolver/without_basedir/main.js +0 -5
- package/my_template/node_modules/resolve/test/resolver.js +0 -597
- package/my_template/node_modules/resolve/test/resolver_sync.js +0 -730
- package/my_template/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/my_template/node_modules/resolve/test/shadowed_core.js +0 -54
- package/my_template/node_modules/resolve/test/subdirs.js +0 -13
- package/my_template/node_modules/resolve/test/symlinks.js +0 -176
- package/my_template/node_modules/rollup/CHANGELOG.md +0 -3084
- package/my_template/node_modules/rollup/LICENSE.md +0 -578
- package/my_template/node_modules/rollup/README.md +0 -138
- package/my_template/node_modules/rollup/dist/bin/rollup +0 -1457
- package/my_template/node_modules/rollup/dist/rollup.browser.es.js +0 -25
- package/my_template/node_modules/rollup/dist/rollup.browser.js +0 -26
- package/my_template/node_modules/rollup/dist/rollup.d.ts +0 -656
- package/my_template/node_modules/rollup/dist/rollup.es.js +0 -17493
- package/my_template/node_modules/rollup/dist/rollup.js +0 -29
- package/my_template/node_modules/rollup/dist/shared/index.js +0 -321
- package/my_template/node_modules/rollup/dist/shared/node-entry.js +0 -17504
- package/my_template/node_modules/rollup/package.json +0 -139
- package/my_template/node_modules/rollup-plugin-node-resolve/CHANGELOG.md +0 -195
- package/my_template/node_modules/rollup-plugin-node-resolve/README.md +0 -135
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +0 -425
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +0 -421
- package/my_template/node_modules/rollup-plugin-node-resolve/index.d.ts +0 -100
- package/my_template/node_modules/rollup-plugin-node-resolve/package.json +0 -60
- package/my_template/node_modules/rollup-plugin-node-resolve/src/index.js +0 -358
- package/my_template/node_modules/rollup-plugin-uglify/LICENSE +0 -20
- package/my_template/node_modules/rollup-plugin-uglify/README.md +0 -84
- package/my_template/node_modules/rollup-plugin-uglify/index.js +0 -51
- package/my_template/node_modules/rollup-plugin-uglify/package.json +0 -43
- package/my_template/node_modules/rollup-plugin-uglify/transform.js +0 -13
- package/my_template/node_modules/rollup-pluginutils/CHANGELOG.md +0 -125
- package/my_template/node_modules/rollup-pluginutils/README.md +0 -169
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +0 -3292
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.d.ts +0 -39
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.es.js +0 -3280
- package/my_template/node_modules/rollup-pluginutils/package.json +0 -57
- package/my_template/node_modules/rollup-pluginutils/src/addExtension.ts +0 -9
- package/my_template/node_modules/rollup-pluginutils/src/attachScopes.ts +0 -125
- package/my_template/node_modules/rollup-pluginutils/src/createFilter.ts +0 -52
- package/my_template/node_modules/rollup-pluginutils/src/dataToEsm.ts +0 -92
- package/my_template/node_modules/rollup-pluginutils/src/extractAssignedNames.ts +0 -46
- package/my_template/node_modules/rollup-pluginutils/src/index.ts +0 -6
- package/my_template/node_modules/rollup-pluginutils/src/makeLegalIdentifier.ts +0 -21
- package/my_template/node_modules/rollup-pluginutils/src/pluginutils.d.ts +0 -39
- package/my_template/node_modules/rollup-pluginutils/src/utils/ensureArray.ts +0 -5
- package/my_template/node_modules/semver/LICENSE +0 -15
- package/my_template/node_modules/semver/README.md +0 -412
- package/my_template/node_modules/semver/bin/semver +0 -160
- package/my_template/node_modules/semver/package.json +0 -38
- package/my_template/node_modules/semver/range.bnf +0 -16
- package/my_template/node_modules/semver/semver.js +0 -1525
- package/my_template/node_modules/serialize-javascript/LICENSE +0 -27
- package/my_template/node_modules/serialize-javascript/README.md +0 -143
- package/my_template/node_modules/serialize-javascript/index.js +0 -210
- package/my_template/node_modules/serialize-javascript/package.json +0 -33
- package/my_template/node_modules/source-map/CHANGELOG.md +0 -301
- package/my_template/node_modules/source-map/LICENSE +0 -28
- package/my_template/node_modules/source-map/README.md +0 -742
- package/my_template/node_modules/source-map/dist/source-map.debug.js +0 -3234
- package/my_template/node_modules/source-map/dist/source-map.js +0 -3233
- package/my_template/node_modules/source-map/dist/source-map.min.js +0 -2
- package/my_template/node_modules/source-map/dist/source-map.min.js.map +0 -1
- package/my_template/node_modules/source-map/lib/array-set.js +0 -121
- package/my_template/node_modules/source-map/lib/base64-vlq.js +0 -140
- package/my_template/node_modules/source-map/lib/base64.js +0 -67
- package/my_template/node_modules/source-map/lib/binary-search.js +0 -111
- package/my_template/node_modules/source-map/lib/mapping-list.js +0 -79
- package/my_template/node_modules/source-map/lib/quick-sort.js +0 -114
- package/my_template/node_modules/source-map/lib/source-map-consumer.js +0 -1145
- package/my_template/node_modules/source-map/lib/source-map-generator.js +0 -425
- package/my_template/node_modules/source-map/lib/source-node.js +0 -413
- package/my_template/node_modules/source-map/lib/util.js +0 -488
- package/my_template/node_modules/source-map/package.json +0 -73
- package/my_template/node_modules/source-map/source-map.d.ts +0 -98
- package/my_template/node_modules/source-map/source-map.js +0 -8
- package/my_template/node_modules/supports-color/browser.js +0 -5
- package/my_template/node_modules/supports-color/index.js +0 -131
- package/my_template/node_modules/supports-color/license +0 -9
- package/my_template/node_modules/supports-color/package.json +0 -53
- package/my_template/node_modules/supports-color/readme.md +0 -66
- package/my_template/node_modules/supports-preserve-symlinks-flag/.eslintrc +0 -14
- package/my_template/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +0 -12
- package/my_template/node_modules/supports-preserve-symlinks-flag/.nycrc +0 -9
- package/my_template/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +0 -22
- package/my_template/node_modules/supports-preserve-symlinks-flag/LICENSE +0 -21
- package/my_template/node_modules/supports-preserve-symlinks-flag/README.md +0 -42
- package/my_template/node_modules/supports-preserve-symlinks-flag/browser.js +0 -3
- package/my_template/node_modules/supports-preserve-symlinks-flag/index.js +0 -9
- package/my_template/node_modules/supports-preserve-symlinks-flag/package.json +0 -70
- package/my_template/node_modules/supports-preserve-symlinks-flag/test/index.js +0 -29
- package/my_template/node_modules/tslib/CopyrightNotice.txt +0 -15
- package/my_template/node_modules/tslib/LICENSE.txt +0 -12
- package/my_template/node_modules/tslib/README.md +0 -142
- package/my_template/node_modules/tslib/modules/index.js +0 -51
- package/my_template/node_modules/tslib/modules/package.json +0 -3
- package/my_template/node_modules/tslib/package.json +0 -37
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js +0 -23
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json +0 -6
- package/my_template/node_modules/tslib/tslib.d.ts +0 -37
- package/my_template/node_modules/tslib/tslib.es6.html +0 -1
- package/my_template/node_modules/tslib/tslib.es6.js +0 -218
- package/my_template/node_modules/tslib/tslib.html +0 -1
- package/my_template/node_modules/tslib/tslib.js +0 -284
- package/my_template/node_modules/uglify-js/LICENSE +0 -29
- package/my_template/node_modules/uglify-js/README.md +0 -1478
- package/my_template/node_modules/uglify-js/bin/uglifyjs +0 -605
- package/my_template/node_modules/uglify-js/lib/ast.js +0 -2356
- package/my_template/node_modules/uglify-js/lib/compress.js +0 -14241
- package/my_template/node_modules/uglify-js/lib/minify.js +0 -276
- package/my_template/node_modules/uglify-js/lib/mozilla-ast.js +0 -1310
- package/my_template/node_modules/uglify-js/lib/output.js +0 -1956
- package/my_template/node_modules/uglify-js/lib/parse.js +0 -2585
- package/my_template/node_modules/uglify-js/lib/propmangle.js +0 -328
- package/my_template/node_modules/uglify-js/lib/scope.js +0 -866
- package/my_template/node_modules/uglify-js/lib/sourcemap.js +0 -195
- package/my_template/node_modules/uglify-js/lib/transform.js +0 -250
- package/my_template/node_modules/uglify-js/lib/utils.js +0 -287
- package/my_template/node_modules/uglify-js/package.json +0 -56
- package/my_template/node_modules/uglify-js/tools/domprops.html +0 -456
- package/my_template/node_modules/uglify-js/tools/domprops.json +0 -8325
- package/my_template/node_modules/uglify-js/tools/exports.js +0 -8
- package/my_template/node_modules/uglify-js/tools/node.js +0 -110
- package/my_template/node_modules/uglify-js/tools/tty.js +0 -22
- package/my_template/node_modules/undici-types/README.md +0 -6
- package/my_template/node_modules/undici-types/agent.d.ts +0 -31
- package/my_template/node_modules/undici-types/api.d.ts +0 -43
- package/my_template/node_modules/undici-types/balanced-pool.d.ts +0 -18
- package/my_template/node_modules/undici-types/cache.d.ts +0 -36
- package/my_template/node_modules/undici-types/client.d.ts +0 -97
- package/my_template/node_modules/undici-types/connector.d.ts +0 -34
- package/my_template/node_modules/undici-types/content-type.d.ts +0 -21
- package/my_template/node_modules/undici-types/cookies.d.ts +0 -28
- package/my_template/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
- package/my_template/node_modules/undici-types/dispatcher.d.ts +0 -241
- package/my_template/node_modules/undici-types/errors.d.ts +0 -128
- package/my_template/node_modules/undici-types/fetch.d.ts +0 -209
- package/my_template/node_modules/undici-types/file.d.ts +0 -39
- package/my_template/node_modules/undici-types/filereader.d.ts +0 -54
- package/my_template/node_modules/undici-types/formdata.d.ts +0 -108
- package/my_template/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/my_template/node_modules/undici-types/global-origin.d.ts +0 -7
- package/my_template/node_modules/undici-types/handlers.d.ts +0 -9
- package/my_template/node_modules/undici-types/header.d.ts +0 -4
- package/my_template/node_modules/undici-types/index.d.ts +0 -63
- package/my_template/node_modules/undici-types/interceptors.d.ts +0 -5
- package/my_template/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/my_template/node_modules/undici-types/mock-client.d.ts +0 -25
- package/my_template/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/my_template/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/my_template/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/my_template/node_modules/undici-types/package.json +0 -55
- package/my_template/node_modules/undici-types/patch.d.ts +0 -71
- package/my_template/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/my_template/node_modules/undici-types/pool.d.ts +0 -28
- package/my_template/node_modules/undici-types/proxy-agent.d.ts +0 -30
- package/my_template/node_modules/undici-types/readable.d.ts +0 -61
- package/my_template/node_modules/undici-types/webidl.d.ts +0 -220
- package/my_template/node_modules/undici-types/websocket.d.ts +0 -131
- package/server/columns.js +0 -201
- package/server/data.js +0 -327
- package/server/json.js +0 -66
|
@@ -1,2262 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var less_error_1 = __importDefault(require("../less-error"));
|
|
26
|
-
var tree_1 = __importDefault(require("../tree"));
|
|
27
|
-
var visitors_1 = __importDefault(require("../visitors"));
|
|
28
|
-
var parser_input_1 = __importDefault(require("./parser-input"));
|
|
29
|
-
var utils = __importStar(require("../utils"));
|
|
30
|
-
var function_registry_1 = __importDefault(require("../functions/function-registry"));
|
|
31
|
-
//
|
|
32
|
-
// less.js - parser
|
|
33
|
-
//
|
|
34
|
-
// A relatively straight-forward predictive parser.
|
|
35
|
-
// There is no tokenization/lexing stage, the input is parsed
|
|
36
|
-
// in one sweep.
|
|
37
|
-
//
|
|
38
|
-
// To make the parser fast enough to run in the browser, several
|
|
39
|
-
// optimization had to be made:
|
|
40
|
-
//
|
|
41
|
-
// - Matching and slicing on a huge input is often cause of slowdowns.
|
|
42
|
-
// The solution is to chunkify the input into smaller strings.
|
|
43
|
-
// The chunks are stored in the `chunks` var,
|
|
44
|
-
// `j` holds the current chunk index, and `currentPos` holds
|
|
45
|
-
// the index of the current chunk in relation to `input`.
|
|
46
|
-
// This gives us an almost 4x speed-up.
|
|
47
|
-
//
|
|
48
|
-
// - In many cases, we don't need to match individual tokens;
|
|
49
|
-
// for example, if a value doesn't hold any variables, operations
|
|
50
|
-
// or dynamic references, the parser can effectively 'skip' it,
|
|
51
|
-
// treating it as a literal.
|
|
52
|
-
// An example would be '1px solid #000' - which evaluates to itself,
|
|
53
|
-
// we don't need to know what the individual components are.
|
|
54
|
-
// The drawback, of course is that you don't get the benefits of
|
|
55
|
-
// syntax-checking on the CSS. This gives us a 50% speed-up in the parser,
|
|
56
|
-
// and a smaller speed-up in the code-gen.
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
// Token matching is done with the `$` function, which either takes
|
|
60
|
-
// a terminal string or regexp, or a non-terminal function to call.
|
|
61
|
-
// It also takes care of moving all the indices forwards.
|
|
62
|
-
//
|
|
63
|
-
var Parser = function Parser(context, imports, fileInfo) {
|
|
64
|
-
var parsers;
|
|
65
|
-
var parserInput = parser_input_1.default();
|
|
66
|
-
function error(msg, type) {
|
|
67
|
-
throw new less_error_1.default({
|
|
68
|
-
index: parserInput.i,
|
|
69
|
-
filename: fileInfo.filename,
|
|
70
|
-
type: type || 'Syntax',
|
|
71
|
-
message: msg
|
|
72
|
-
}, imports);
|
|
73
|
-
}
|
|
74
|
-
function expect(arg, msg) {
|
|
75
|
-
// some older browsers return typeof 'function' for RegExp
|
|
76
|
-
var result = (arg instanceof Function) ? arg.call(parsers) : parserInput.$re(arg);
|
|
77
|
-
if (result) {
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
error(msg || (typeof arg === 'string'
|
|
81
|
-
? "expected '" + arg + "' got '" + parserInput.currentChar() + "'"
|
|
82
|
-
: 'unexpected token'));
|
|
83
|
-
}
|
|
84
|
-
// Specialization of expect()
|
|
85
|
-
function expectChar(arg, msg) {
|
|
86
|
-
if (parserInput.$char(arg)) {
|
|
87
|
-
return arg;
|
|
88
|
-
}
|
|
89
|
-
error(msg || "expected '" + arg + "' got '" + parserInput.currentChar() + "'");
|
|
90
|
-
}
|
|
91
|
-
function getDebugInfo(index) {
|
|
92
|
-
var filename = fileInfo.filename;
|
|
93
|
-
return {
|
|
94
|
-
lineNumber: utils.getLocation(index, parserInput.getInput()).line + 1,
|
|
95
|
-
fileName: filename
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Used after initial parsing to create nodes on the fly
|
|
100
|
-
*
|
|
101
|
-
* @param {String} str - string to parse
|
|
102
|
-
* @param {Array} parseList - array of parsers to run input through e.g. ["value", "important"]
|
|
103
|
-
* @param {Number} currentIndex - start number to begin indexing
|
|
104
|
-
* @param {Object} fileInfo - fileInfo to attach to created nodes
|
|
105
|
-
*/
|
|
106
|
-
function parseNode(str, parseList, currentIndex, fileInfo, callback) {
|
|
107
|
-
var result;
|
|
108
|
-
var returnNodes = [];
|
|
109
|
-
var parser = parserInput;
|
|
110
|
-
try {
|
|
111
|
-
parser.start(str, false, function fail(msg, index) {
|
|
112
|
-
callback({
|
|
113
|
-
message: msg,
|
|
114
|
-
index: index + currentIndex
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
for (var x = 0, p = void 0, i = void 0; (p = parseList[x]); x++) {
|
|
118
|
-
i = parser.i;
|
|
119
|
-
result = parsers[p]();
|
|
120
|
-
if (result) {
|
|
121
|
-
try {
|
|
122
|
-
result._index = i + currentIndex;
|
|
123
|
-
result._fileInfo = fileInfo;
|
|
124
|
-
}
|
|
125
|
-
catch (e) { }
|
|
126
|
-
returnNodes.push(result);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
returnNodes.push(null);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
var endInfo = parser.end();
|
|
133
|
-
if (endInfo.isFinished) {
|
|
134
|
-
callback(null, returnNodes);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
callback(true, null);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
catch (e) {
|
|
141
|
-
throw new less_error_1.default({
|
|
142
|
-
index: e.index + currentIndex,
|
|
143
|
-
message: e.message
|
|
144
|
-
}, imports, fileInfo.filename);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
//
|
|
148
|
-
// The Parser
|
|
149
|
-
//
|
|
150
|
-
return {
|
|
151
|
-
parserInput: parserInput,
|
|
152
|
-
imports: imports,
|
|
153
|
-
fileInfo: fileInfo,
|
|
154
|
-
parseNode: parseNode,
|
|
155
|
-
//
|
|
156
|
-
// Parse an input string into an abstract syntax tree,
|
|
157
|
-
// @param str A string containing 'less' markup
|
|
158
|
-
// @param callback call `callback` when done.
|
|
159
|
-
// @param [additionalData] An optional map which can contains vars - a map (key, value) of variables to apply
|
|
160
|
-
//
|
|
161
|
-
parse: function (str, callback, additionalData) {
|
|
162
|
-
var root;
|
|
163
|
-
var error = null;
|
|
164
|
-
var globalVars;
|
|
165
|
-
var modifyVars;
|
|
166
|
-
var ignored;
|
|
167
|
-
var preText = '';
|
|
168
|
-
globalVars = (additionalData && additionalData.globalVars) ? Parser.serializeVars(additionalData.globalVars) + "\n" : '';
|
|
169
|
-
modifyVars = (additionalData && additionalData.modifyVars) ? "\n" + Parser.serializeVars(additionalData.modifyVars) : '';
|
|
170
|
-
if (context.pluginManager) {
|
|
171
|
-
var preProcessors = context.pluginManager.getPreProcessors();
|
|
172
|
-
for (var i = 0; i < preProcessors.length; i++) {
|
|
173
|
-
str = preProcessors[i].process(str, { context: context, imports: imports, fileInfo: fileInfo });
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if (globalVars || (additionalData && additionalData.banner)) {
|
|
177
|
-
preText = ((additionalData && additionalData.banner) ? additionalData.banner : '') + globalVars;
|
|
178
|
-
ignored = imports.contentsIgnoredChars;
|
|
179
|
-
ignored[fileInfo.filename] = ignored[fileInfo.filename] || 0;
|
|
180
|
-
ignored[fileInfo.filename] += preText.length;
|
|
181
|
-
}
|
|
182
|
-
str = str.replace(/\r\n?/g, '\n');
|
|
183
|
-
// Remove potential UTF Byte Order Mark
|
|
184
|
-
str = preText + str.replace(/^\uFEFF/, '') + modifyVars;
|
|
185
|
-
imports.contents[fileInfo.filename] = str;
|
|
186
|
-
// Start with the primary rule.
|
|
187
|
-
// The whole syntax tree is held under a Ruleset node,
|
|
188
|
-
// with the `root` property set to true, so no `{}` are
|
|
189
|
-
// output. The callback is called when the input is parsed.
|
|
190
|
-
try {
|
|
191
|
-
parserInput.start(str, context.chunkInput, function fail(msg, index) {
|
|
192
|
-
throw new less_error_1.default({
|
|
193
|
-
index: index,
|
|
194
|
-
type: 'Parse',
|
|
195
|
-
message: msg,
|
|
196
|
-
filename: fileInfo.filename
|
|
197
|
-
}, imports);
|
|
198
|
-
});
|
|
199
|
-
tree_1.default.Node.prototype.parse = this;
|
|
200
|
-
root = new tree_1.default.Ruleset(null, this.parsers.primary());
|
|
201
|
-
tree_1.default.Node.prototype.rootNode = root;
|
|
202
|
-
root.root = true;
|
|
203
|
-
root.firstRoot = true;
|
|
204
|
-
root.functionRegistry = function_registry_1.default.inherit();
|
|
205
|
-
}
|
|
206
|
-
catch (e) {
|
|
207
|
-
return callback(new less_error_1.default(e, imports, fileInfo.filename));
|
|
208
|
-
}
|
|
209
|
-
// If `i` is smaller than the `input.length - 1`,
|
|
210
|
-
// it means the parser wasn't able to parse the whole
|
|
211
|
-
// string, so we've got a parsing error.
|
|
212
|
-
//
|
|
213
|
-
// We try to extract a \n delimited string,
|
|
214
|
-
// showing the line where the parse error occurred.
|
|
215
|
-
// We split it up into two parts (the part which parsed,
|
|
216
|
-
// and the part which didn't), so we can color them differently.
|
|
217
|
-
var endInfo = parserInput.end();
|
|
218
|
-
if (!endInfo.isFinished) {
|
|
219
|
-
var message = endInfo.furthestPossibleErrorMessage;
|
|
220
|
-
if (!message) {
|
|
221
|
-
message = 'Unrecognised input';
|
|
222
|
-
if (endInfo.furthestChar === '}') {
|
|
223
|
-
message += '. Possibly missing opening \'{\'';
|
|
224
|
-
}
|
|
225
|
-
else if (endInfo.furthestChar === ')') {
|
|
226
|
-
message += '. Possibly missing opening \'(\'';
|
|
227
|
-
}
|
|
228
|
-
else if (endInfo.furthestReachedEnd) {
|
|
229
|
-
message += '. Possibly missing something';
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
error = new less_error_1.default({
|
|
233
|
-
type: 'Parse',
|
|
234
|
-
message: message,
|
|
235
|
-
index: endInfo.furthest,
|
|
236
|
-
filename: fileInfo.filename
|
|
237
|
-
}, imports);
|
|
238
|
-
}
|
|
239
|
-
var finish = function (e) {
|
|
240
|
-
e = error || e || imports.error;
|
|
241
|
-
if (e) {
|
|
242
|
-
if (!(e instanceof less_error_1.default)) {
|
|
243
|
-
e = new less_error_1.default(e, imports, fileInfo.filename);
|
|
244
|
-
}
|
|
245
|
-
return callback(e);
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
return callback(null, root);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
if (context.processImports !== false) {
|
|
252
|
-
new visitors_1.default.ImportVisitor(imports, finish)
|
|
253
|
-
.run(root);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
return finish();
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
//
|
|
260
|
-
// Here in, the parsing rules/functions
|
|
261
|
-
//
|
|
262
|
-
// The basic structure of the syntax tree generated is as follows:
|
|
263
|
-
//
|
|
264
|
-
// Ruleset -> Declaration -> Value -> Expression -> Entity
|
|
265
|
-
//
|
|
266
|
-
// Here's some Less code:
|
|
267
|
-
//
|
|
268
|
-
// .class {
|
|
269
|
-
// color: #fff;
|
|
270
|
-
// border: 1px solid #000;
|
|
271
|
-
// width: @w + 4px;
|
|
272
|
-
// > .child {...}
|
|
273
|
-
// }
|
|
274
|
-
//
|
|
275
|
-
// And here's what the parse tree might look like:
|
|
276
|
-
//
|
|
277
|
-
// Ruleset (Selector '.class', [
|
|
278
|
-
// Declaration ("color", Value ([Expression [Color #fff]]))
|
|
279
|
-
// Declaration ("border", Value ([Expression [Dimension 1px][Keyword "solid"][Color #000]]))
|
|
280
|
-
// Declaration ("width", Value ([Expression [Operation " + " [Variable "@w"][Dimension 4px]]]))
|
|
281
|
-
// Ruleset (Selector [Element '>', '.child'], [...])
|
|
282
|
-
// ])
|
|
283
|
-
//
|
|
284
|
-
// In general, most rules will try to parse a token with the `$re()` function, and if the return
|
|
285
|
-
// value is truly, will return a new node, of the relevant type. Sometimes, we need to check
|
|
286
|
-
// first, before parsing, that's when we use `peek()`.
|
|
287
|
-
//
|
|
288
|
-
parsers: parsers = {
|
|
289
|
-
//
|
|
290
|
-
// The `primary` rule is the *entry* and *exit* point of the parser.
|
|
291
|
-
// The rules here can appear at any level of the parse tree.
|
|
292
|
-
//
|
|
293
|
-
// The recursive nature of the grammar is an interplay between the `block`
|
|
294
|
-
// rule, which represents `{ ... }`, the `ruleset` rule, and this `primary` rule,
|
|
295
|
-
// as represented by this simplified grammar:
|
|
296
|
-
//
|
|
297
|
-
// primary → (ruleset | declaration)+
|
|
298
|
-
// ruleset → selector+ block
|
|
299
|
-
// block → '{' primary '}'
|
|
300
|
-
//
|
|
301
|
-
// Only at one point is the primary rule not called from the
|
|
302
|
-
// block rule: at the root level.
|
|
303
|
-
//
|
|
304
|
-
primary: function () {
|
|
305
|
-
var mixin = this.mixin;
|
|
306
|
-
var root = [];
|
|
307
|
-
var node;
|
|
308
|
-
while (true) {
|
|
309
|
-
while (true) {
|
|
310
|
-
node = this.comment();
|
|
311
|
-
if (!node) {
|
|
312
|
-
break;
|
|
313
|
-
}
|
|
314
|
-
root.push(node);
|
|
315
|
-
}
|
|
316
|
-
// always process comments before deciding if finished
|
|
317
|
-
if (parserInput.finished) {
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
if (parserInput.peek('}')) {
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
node = this.extendRule();
|
|
324
|
-
if (node) {
|
|
325
|
-
root = root.concat(node);
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
node = mixin.definition() || this.declaration() || mixin.call(false, false) ||
|
|
329
|
-
this.ruleset() || this.variableCall() || this.entities.call() || this.atrule();
|
|
330
|
-
if (node) {
|
|
331
|
-
root.push(node);
|
|
332
|
-
}
|
|
333
|
-
else {
|
|
334
|
-
var foundSemiColon = false;
|
|
335
|
-
while (parserInput.$char(';')) {
|
|
336
|
-
foundSemiColon = true;
|
|
337
|
-
}
|
|
338
|
-
if (!foundSemiColon) {
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
return root;
|
|
344
|
-
},
|
|
345
|
-
// comments are collected by the main parsing mechanism and then assigned to nodes
|
|
346
|
-
// where the current structure allows it
|
|
347
|
-
comment: function () {
|
|
348
|
-
if (parserInput.commentStore.length) {
|
|
349
|
-
var comment = parserInput.commentStore.shift();
|
|
350
|
-
return new (tree_1.default.Comment)(comment.text, comment.isLineComment, comment.index, fileInfo);
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
//
|
|
354
|
-
// Entities are tokens which can be found inside an Expression
|
|
355
|
-
//
|
|
356
|
-
entities: {
|
|
357
|
-
mixinLookup: function () {
|
|
358
|
-
return parsers.mixin.call(true, true);
|
|
359
|
-
},
|
|
360
|
-
//
|
|
361
|
-
// A string, which supports escaping " and '
|
|
362
|
-
//
|
|
363
|
-
// "milky way" 'he\'s the one!'
|
|
364
|
-
//
|
|
365
|
-
quoted: function (forceEscaped) {
|
|
366
|
-
var str;
|
|
367
|
-
var index = parserInput.i;
|
|
368
|
-
var isEscaped = false;
|
|
369
|
-
parserInput.save();
|
|
370
|
-
if (parserInput.$char('~')) {
|
|
371
|
-
isEscaped = true;
|
|
372
|
-
}
|
|
373
|
-
else if (forceEscaped) {
|
|
374
|
-
parserInput.restore();
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
str = parserInput.$quoted();
|
|
378
|
-
if (!str) {
|
|
379
|
-
parserInput.restore();
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
parserInput.forget();
|
|
383
|
-
return new (tree_1.default.Quoted)(str.charAt(0), str.substr(1, str.length - 2), isEscaped, index, fileInfo);
|
|
384
|
-
},
|
|
385
|
-
//
|
|
386
|
-
// A catch-all word, such as:
|
|
387
|
-
//
|
|
388
|
-
// black border-collapse
|
|
389
|
-
//
|
|
390
|
-
keyword: function () {
|
|
391
|
-
var k = parserInput.$char('%') || parserInput.$re(/^\[?(?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\]?/);
|
|
392
|
-
if (k) {
|
|
393
|
-
return tree_1.default.Color.fromKeyword(k) || new (tree_1.default.Keyword)(k);
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
//
|
|
397
|
-
// A function call
|
|
398
|
-
//
|
|
399
|
-
// rgb(255, 0, 255)
|
|
400
|
-
//
|
|
401
|
-
// The arguments are parsed with the `entities.arguments` parser.
|
|
402
|
-
//
|
|
403
|
-
call: function () {
|
|
404
|
-
var name;
|
|
405
|
-
var args;
|
|
406
|
-
var func;
|
|
407
|
-
var index = parserInput.i;
|
|
408
|
-
// http://jsperf.com/case-insensitive-regex-vs-strtolower-then-regex/18
|
|
409
|
-
if (parserInput.peek(/^url\(/i)) {
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
parserInput.save();
|
|
413
|
-
name = parserInput.$re(/^([\w-]+|%|progid:[\w\.]+)\(/);
|
|
414
|
-
if (!name) {
|
|
415
|
-
parserInput.forget();
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
name = name[1];
|
|
419
|
-
func = this.customFuncCall(name);
|
|
420
|
-
if (func) {
|
|
421
|
-
args = func.parse();
|
|
422
|
-
if (args && func.stop) {
|
|
423
|
-
parserInput.forget();
|
|
424
|
-
return args;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
args = this.arguments(args);
|
|
428
|
-
if (!parserInput.$char(')')) {
|
|
429
|
-
parserInput.restore('Could not parse call arguments or missing \')\'');
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
parserInput.forget();
|
|
433
|
-
return new (tree_1.default.Call)(name, args, index, fileInfo);
|
|
434
|
-
},
|
|
435
|
-
//
|
|
436
|
-
// Parsing rules for functions with non-standard args, e.g.:
|
|
437
|
-
//
|
|
438
|
-
// boolean(not(2 > 1))
|
|
439
|
-
//
|
|
440
|
-
// This is a quick prototype, to be modified/improved when
|
|
441
|
-
// more custom-parsed funcs come (e.g. `selector(...)`)
|
|
442
|
-
//
|
|
443
|
-
customFuncCall: function (name) {
|
|
444
|
-
/* Ideally the table is to be moved out of here for faster perf.,
|
|
445
|
-
but it's quite tricky since it relies on all these `parsers`
|
|
446
|
-
and `expect` available only here */
|
|
447
|
-
return {
|
|
448
|
-
alpha: f(parsers.ieAlpha, true),
|
|
449
|
-
boolean: f(condition),
|
|
450
|
-
'if': f(condition)
|
|
451
|
-
}[name.toLowerCase()];
|
|
452
|
-
function f(parse, stop) {
|
|
453
|
-
return {
|
|
454
|
-
parse: parse,
|
|
455
|
-
stop: stop // when true - stop after parse() and return its result,
|
|
456
|
-
// otherwise continue for plain args
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
function condition() {
|
|
460
|
-
return [expect(parsers.condition, 'expected condition')];
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
arguments: function (prevArgs) {
|
|
464
|
-
var argsComma = prevArgs || [];
|
|
465
|
-
var argsSemiColon = [];
|
|
466
|
-
var isSemiColonSeparated;
|
|
467
|
-
var value;
|
|
468
|
-
parserInput.save();
|
|
469
|
-
while (true) {
|
|
470
|
-
if (prevArgs) {
|
|
471
|
-
prevArgs = false;
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
value = parsers.detachedRuleset() || this.assignment() || parsers.expression();
|
|
475
|
-
if (!value) {
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
if (value.value && value.value.length == 1) {
|
|
479
|
-
value = value.value[0];
|
|
480
|
-
}
|
|
481
|
-
argsComma.push(value);
|
|
482
|
-
}
|
|
483
|
-
if (parserInput.$char(',')) {
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
if (parserInput.$char(';') || isSemiColonSeparated) {
|
|
487
|
-
isSemiColonSeparated = true;
|
|
488
|
-
value = (argsComma.length < 1) ? argsComma[0]
|
|
489
|
-
: new tree_1.default.Value(argsComma);
|
|
490
|
-
argsSemiColon.push(value);
|
|
491
|
-
argsComma = [];
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
parserInput.forget();
|
|
495
|
-
return isSemiColonSeparated ? argsSemiColon : argsComma;
|
|
496
|
-
},
|
|
497
|
-
literal: function () {
|
|
498
|
-
return this.dimension() ||
|
|
499
|
-
this.color() ||
|
|
500
|
-
this.quoted() ||
|
|
501
|
-
this.unicodeDescriptor();
|
|
502
|
-
},
|
|
503
|
-
// Assignments are argument entities for calls.
|
|
504
|
-
// They are present in ie filter properties as shown below.
|
|
505
|
-
//
|
|
506
|
-
// filter: progid:DXImageTransform.Microsoft.Alpha( *opacity=50* )
|
|
507
|
-
//
|
|
508
|
-
assignment: function () {
|
|
509
|
-
var key;
|
|
510
|
-
var value;
|
|
511
|
-
parserInput.save();
|
|
512
|
-
key = parserInput.$re(/^\w+(?=\s?=)/i);
|
|
513
|
-
if (!key) {
|
|
514
|
-
parserInput.restore();
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
if (!parserInput.$char('=')) {
|
|
518
|
-
parserInput.restore();
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
value = parsers.entity();
|
|
522
|
-
if (value) {
|
|
523
|
-
parserInput.forget();
|
|
524
|
-
return new (tree_1.default.Assignment)(key, value);
|
|
525
|
-
}
|
|
526
|
-
else {
|
|
527
|
-
parserInput.restore();
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
//
|
|
531
|
-
// Parse url() tokens
|
|
532
|
-
//
|
|
533
|
-
// We use a specific rule for urls, because they don't really behave like
|
|
534
|
-
// standard function calls. The difference is that the argument doesn't have
|
|
535
|
-
// to be enclosed within a string, so it can't be parsed as an Expression.
|
|
536
|
-
//
|
|
537
|
-
url: function () {
|
|
538
|
-
var value;
|
|
539
|
-
var index = parserInput.i;
|
|
540
|
-
parserInput.autoCommentAbsorb = false;
|
|
541
|
-
if (!parserInput.$str('url(')) {
|
|
542
|
-
parserInput.autoCommentAbsorb = true;
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
value = this.quoted() || this.variable() || this.property() ||
|
|
546
|
-
parserInput.$re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/) || '';
|
|
547
|
-
parserInput.autoCommentAbsorb = true;
|
|
548
|
-
expectChar(')');
|
|
549
|
-
return new (tree_1.default.URL)((value.value != null ||
|
|
550
|
-
value instanceof tree_1.default.Variable ||
|
|
551
|
-
value instanceof tree_1.default.Property) ?
|
|
552
|
-
value : new (tree_1.default.Anonymous)(value, index), index, fileInfo);
|
|
553
|
-
},
|
|
554
|
-
//
|
|
555
|
-
// A Variable entity, such as `@fink`, in
|
|
556
|
-
//
|
|
557
|
-
// width: @fink + 2px
|
|
558
|
-
//
|
|
559
|
-
// We use a different parser for variable definitions,
|
|
560
|
-
// see `parsers.variable`.
|
|
561
|
-
//
|
|
562
|
-
variable: function () {
|
|
563
|
-
var ch;
|
|
564
|
-
var name;
|
|
565
|
-
var index = parserInput.i;
|
|
566
|
-
parserInput.save();
|
|
567
|
-
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^@@?[\w-]+/))) {
|
|
568
|
-
ch = parserInput.currentChar();
|
|
569
|
-
if (ch === '(' || ch === '[' && !parserInput.prevChar().match(/^\s/)) {
|
|
570
|
-
// this may be a VariableCall lookup
|
|
571
|
-
var result = parsers.variableCall(name);
|
|
572
|
-
if (result) {
|
|
573
|
-
parserInput.forget();
|
|
574
|
-
return result;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
parserInput.forget();
|
|
578
|
-
return new (tree_1.default.Variable)(name, index, fileInfo);
|
|
579
|
-
}
|
|
580
|
-
parserInput.restore();
|
|
581
|
-
},
|
|
582
|
-
// A variable entity using the protective {} e.g. @{var}
|
|
583
|
-
variableCurly: function () {
|
|
584
|
-
var curly;
|
|
585
|
-
var index = parserInput.i;
|
|
586
|
-
if (parserInput.currentChar() === '@' && (curly = parserInput.$re(/^@\{([\w-]+)\}/))) {
|
|
587
|
-
return new (tree_1.default.Variable)("@" + curly[1], index, fileInfo);
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
//
|
|
591
|
-
// A Property accessor, such as `$color`, in
|
|
592
|
-
//
|
|
593
|
-
// background-color: $color
|
|
594
|
-
//
|
|
595
|
-
property: function () {
|
|
596
|
-
var name;
|
|
597
|
-
var index = parserInput.i;
|
|
598
|
-
if (parserInput.currentChar() === '$' && (name = parserInput.$re(/^\$[\w-]+/))) {
|
|
599
|
-
return new (tree_1.default.Property)(name, index, fileInfo);
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
// A property entity useing the protective {} e.g. ${prop}
|
|
603
|
-
propertyCurly: function () {
|
|
604
|
-
var curly;
|
|
605
|
-
var index = parserInput.i;
|
|
606
|
-
if (parserInput.currentChar() === '$' && (curly = parserInput.$re(/^\$\{([\w-]+)\}/))) {
|
|
607
|
-
return new (tree_1.default.Property)("$" + curly[1], index, fileInfo);
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
//
|
|
611
|
-
// A Hexadecimal color
|
|
612
|
-
//
|
|
613
|
-
// #4F3C2F
|
|
614
|
-
//
|
|
615
|
-
// `rgb` and `hsl` colors are parsed through the `entities.call` parser.
|
|
616
|
-
//
|
|
617
|
-
color: function () {
|
|
618
|
-
var rgb;
|
|
619
|
-
parserInput.save();
|
|
620
|
-
if (parserInput.currentChar() === '#' && (rgb = parserInput.$re(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3,4})([\w.#\[])?/))) {
|
|
621
|
-
if (!rgb[2]) {
|
|
622
|
-
parserInput.forget();
|
|
623
|
-
return new (tree_1.default.Color)(rgb[1], undefined, rgb[0]);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
parserInput.restore();
|
|
627
|
-
},
|
|
628
|
-
colorKeyword: function () {
|
|
629
|
-
parserInput.save();
|
|
630
|
-
var autoCommentAbsorb = parserInput.autoCommentAbsorb;
|
|
631
|
-
parserInput.autoCommentAbsorb = false;
|
|
632
|
-
var k = parserInput.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);
|
|
633
|
-
parserInput.autoCommentAbsorb = autoCommentAbsorb;
|
|
634
|
-
if (!k) {
|
|
635
|
-
parserInput.forget();
|
|
636
|
-
return;
|
|
637
|
-
}
|
|
638
|
-
parserInput.restore();
|
|
639
|
-
var color = tree_1.default.Color.fromKeyword(k);
|
|
640
|
-
if (color) {
|
|
641
|
-
parserInput.$str(k);
|
|
642
|
-
return color;
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
//
|
|
646
|
-
// A Dimension, that is, a number and a unit
|
|
647
|
-
//
|
|
648
|
-
// 0.5em 95%
|
|
649
|
-
//
|
|
650
|
-
dimension: function () {
|
|
651
|
-
if (parserInput.peekNotNumeric()) {
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
var value = parserInput.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);
|
|
655
|
-
if (value) {
|
|
656
|
-
return new (tree_1.default.Dimension)(value[1], value[2]);
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
|
-
//
|
|
660
|
-
// A unicode descriptor, as is used in unicode-range
|
|
661
|
-
//
|
|
662
|
-
// U+0?? or U+00A1-00A9
|
|
663
|
-
//
|
|
664
|
-
unicodeDescriptor: function () {
|
|
665
|
-
var ud;
|
|
666
|
-
ud = parserInput.$re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/);
|
|
667
|
-
if (ud) {
|
|
668
|
-
return new (tree_1.default.UnicodeDescriptor)(ud[0]);
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
//
|
|
672
|
-
// JavaScript code to be evaluated
|
|
673
|
-
//
|
|
674
|
-
// `window.location.href`
|
|
675
|
-
//
|
|
676
|
-
javascript: function () {
|
|
677
|
-
var js;
|
|
678
|
-
var index = parserInput.i;
|
|
679
|
-
parserInput.save();
|
|
680
|
-
var escape = parserInput.$char('~');
|
|
681
|
-
var jsQuote = parserInput.$char('`');
|
|
682
|
-
if (!jsQuote) {
|
|
683
|
-
parserInput.restore();
|
|
684
|
-
return;
|
|
685
|
-
}
|
|
686
|
-
js = parserInput.$re(/^[^`]*`/);
|
|
687
|
-
if (js) {
|
|
688
|
-
parserInput.forget();
|
|
689
|
-
return new (tree_1.default.JavaScript)(js.substr(0, js.length - 1), Boolean(escape), index, fileInfo);
|
|
690
|
-
}
|
|
691
|
-
parserInput.restore('invalid javascript definition');
|
|
692
|
-
}
|
|
693
|
-
},
|
|
694
|
-
//
|
|
695
|
-
// The variable part of a variable definition. Used in the `rule` parser
|
|
696
|
-
//
|
|
697
|
-
// @fink:
|
|
698
|
-
//
|
|
699
|
-
variable: function () {
|
|
700
|
-
var name;
|
|
701
|
-
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^(@[\w-]+)\s*:/))) {
|
|
702
|
-
return name[1];
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
//
|
|
706
|
-
// Call a variable value to retrieve a detached ruleset
|
|
707
|
-
// or a value from a detached ruleset's rules.
|
|
708
|
-
//
|
|
709
|
-
// @fink();
|
|
710
|
-
// @fink;
|
|
711
|
-
// color: @fink[@color];
|
|
712
|
-
//
|
|
713
|
-
variableCall: function (parsedName) {
|
|
714
|
-
var lookups;
|
|
715
|
-
var i = parserInput.i;
|
|
716
|
-
var inValue = !!parsedName;
|
|
717
|
-
var name = parsedName;
|
|
718
|
-
parserInput.save();
|
|
719
|
-
if (name || (parserInput.currentChar() === '@'
|
|
720
|
-
&& (name = parserInput.$re(/^(@[\w-]+)(\(\s*\))?/)))) {
|
|
721
|
-
lookups = this.mixin.ruleLookups();
|
|
722
|
-
if (!lookups && ((inValue && parserInput.$str('()') !== '()') || (name[2] !== '()'))) {
|
|
723
|
-
parserInput.restore('Missing \'[...]\' lookup in variable call');
|
|
724
|
-
return;
|
|
725
|
-
}
|
|
726
|
-
if (!inValue) {
|
|
727
|
-
name = name[1];
|
|
728
|
-
}
|
|
729
|
-
var call = new tree_1.default.VariableCall(name, i, fileInfo);
|
|
730
|
-
if (!inValue && parsers.end()) {
|
|
731
|
-
parserInput.forget();
|
|
732
|
-
return call;
|
|
733
|
-
}
|
|
734
|
-
else {
|
|
735
|
-
parserInput.forget();
|
|
736
|
-
return new tree_1.default.NamespaceValue(call, lookups, i, fileInfo);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
parserInput.restore();
|
|
740
|
-
},
|
|
741
|
-
//
|
|
742
|
-
// extend syntax - used to extend selectors
|
|
743
|
-
//
|
|
744
|
-
extend: function (isRule) {
|
|
745
|
-
var elements;
|
|
746
|
-
var e;
|
|
747
|
-
var index = parserInput.i;
|
|
748
|
-
var option;
|
|
749
|
-
var extendList;
|
|
750
|
-
var extend;
|
|
751
|
-
if (!parserInput.$str(isRule ? '&:extend(' : ':extend(')) {
|
|
752
|
-
return;
|
|
753
|
-
}
|
|
754
|
-
do {
|
|
755
|
-
option = null;
|
|
756
|
-
elements = null;
|
|
757
|
-
while (!(option = parserInput.$re(/^(all)(?=\s*(\)|,))/))) {
|
|
758
|
-
e = this.element();
|
|
759
|
-
if (!e) {
|
|
760
|
-
break;
|
|
761
|
-
}
|
|
762
|
-
if (elements) {
|
|
763
|
-
elements.push(e);
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
elements = [e];
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
option = option && option[1];
|
|
770
|
-
if (!elements) {
|
|
771
|
-
error('Missing target selector for :extend().');
|
|
772
|
-
}
|
|
773
|
-
extend = new (tree_1.default.Extend)(new (tree_1.default.Selector)(elements), option, index, fileInfo);
|
|
774
|
-
if (extendList) {
|
|
775
|
-
extendList.push(extend);
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
extendList = [extend];
|
|
779
|
-
}
|
|
780
|
-
} while (parserInput.$char(','));
|
|
781
|
-
expect(/^\)/);
|
|
782
|
-
if (isRule) {
|
|
783
|
-
expect(/^;/);
|
|
784
|
-
}
|
|
785
|
-
return extendList;
|
|
786
|
-
},
|
|
787
|
-
//
|
|
788
|
-
// extendRule - used in a rule to extend all the parent selectors
|
|
789
|
-
//
|
|
790
|
-
extendRule: function () {
|
|
791
|
-
return this.extend(true);
|
|
792
|
-
},
|
|
793
|
-
//
|
|
794
|
-
// Mixins
|
|
795
|
-
//
|
|
796
|
-
mixin: {
|
|
797
|
-
//
|
|
798
|
-
// A Mixin call, with an optional argument list
|
|
799
|
-
//
|
|
800
|
-
// #mixins > .square(#fff);
|
|
801
|
-
// #mixins.square(#fff);
|
|
802
|
-
// .rounded(4px, black);
|
|
803
|
-
// .button;
|
|
804
|
-
//
|
|
805
|
-
// We can lookup / return a value using the lookup syntax:
|
|
806
|
-
//
|
|
807
|
-
// color: #mixin.square(#fff)[@color];
|
|
808
|
-
//
|
|
809
|
-
// The `while` loop is there because mixins can be
|
|
810
|
-
// namespaced, but we only support the child and descendant
|
|
811
|
-
// selector for now.
|
|
812
|
-
//
|
|
813
|
-
call: function (inValue, getLookup) {
|
|
814
|
-
var s = parserInput.currentChar();
|
|
815
|
-
var important = false;
|
|
816
|
-
var lookups;
|
|
817
|
-
var index = parserInput.i;
|
|
818
|
-
var elements;
|
|
819
|
-
var args;
|
|
820
|
-
var hasParens;
|
|
821
|
-
if (s !== '.' && s !== '#') {
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
|
-
parserInput.save(); // stop us absorbing part of an invalid selector
|
|
825
|
-
elements = this.elements();
|
|
826
|
-
if (elements) {
|
|
827
|
-
if (parserInput.$char('(')) {
|
|
828
|
-
args = this.args(true).args;
|
|
829
|
-
expectChar(')');
|
|
830
|
-
hasParens = true;
|
|
831
|
-
}
|
|
832
|
-
if (getLookup !== false) {
|
|
833
|
-
lookups = this.ruleLookups();
|
|
834
|
-
}
|
|
835
|
-
if (getLookup === true && !lookups) {
|
|
836
|
-
parserInput.restore();
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
if (inValue && !lookups && !hasParens) {
|
|
840
|
-
// This isn't a valid in-value mixin call
|
|
841
|
-
parserInput.restore();
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
if (!inValue && parsers.important()) {
|
|
845
|
-
important = true;
|
|
846
|
-
}
|
|
847
|
-
if (inValue || parsers.end()) {
|
|
848
|
-
parserInput.forget();
|
|
849
|
-
var mixin = new (tree_1.default.mixin.Call)(elements, args, index, fileInfo, !lookups && important);
|
|
850
|
-
if (lookups) {
|
|
851
|
-
return new tree_1.default.NamespaceValue(mixin, lookups);
|
|
852
|
-
}
|
|
853
|
-
else {
|
|
854
|
-
return mixin;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
parserInput.restore();
|
|
859
|
-
},
|
|
860
|
-
/**
|
|
861
|
-
* Matching elements for mixins
|
|
862
|
-
* (Start with . or # and can have > )
|
|
863
|
-
*/
|
|
864
|
-
elements: function () {
|
|
865
|
-
var elements;
|
|
866
|
-
var e;
|
|
867
|
-
var c;
|
|
868
|
-
var elem;
|
|
869
|
-
var elemIndex;
|
|
870
|
-
var re = /^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/;
|
|
871
|
-
while (true) {
|
|
872
|
-
elemIndex = parserInput.i;
|
|
873
|
-
e = parserInput.$re(re);
|
|
874
|
-
if (!e) {
|
|
875
|
-
break;
|
|
876
|
-
}
|
|
877
|
-
elem = new (tree_1.default.Element)(c, e, false, elemIndex, fileInfo);
|
|
878
|
-
if (elements) {
|
|
879
|
-
elements.push(elem);
|
|
880
|
-
}
|
|
881
|
-
else {
|
|
882
|
-
elements = [elem];
|
|
883
|
-
}
|
|
884
|
-
c = parserInput.$char('>');
|
|
885
|
-
}
|
|
886
|
-
return elements;
|
|
887
|
-
},
|
|
888
|
-
args: function (isCall) {
|
|
889
|
-
var entities = parsers.entities;
|
|
890
|
-
var returner = { args: null, variadic: false };
|
|
891
|
-
var expressions = [];
|
|
892
|
-
var argsSemiColon = [];
|
|
893
|
-
var argsComma = [];
|
|
894
|
-
var isSemiColonSeparated;
|
|
895
|
-
var expressionContainsNamed;
|
|
896
|
-
var name;
|
|
897
|
-
var nameLoop;
|
|
898
|
-
var value;
|
|
899
|
-
var arg;
|
|
900
|
-
var expand;
|
|
901
|
-
var hasSep = true;
|
|
902
|
-
parserInput.save();
|
|
903
|
-
while (true) {
|
|
904
|
-
if (isCall) {
|
|
905
|
-
arg = parsers.detachedRuleset() || parsers.expression();
|
|
906
|
-
}
|
|
907
|
-
else {
|
|
908
|
-
parserInput.commentStore.length = 0;
|
|
909
|
-
if (parserInput.$str('...')) {
|
|
910
|
-
returner.variadic = true;
|
|
911
|
-
if (parserInput.$char(';') && !isSemiColonSeparated) {
|
|
912
|
-
isSemiColonSeparated = true;
|
|
913
|
-
}
|
|
914
|
-
(isSemiColonSeparated ? argsSemiColon : argsComma)
|
|
915
|
-
.push({ variadic: true });
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
arg = entities.variable() || entities.property() || entities.literal() || entities.keyword() || this.call(true);
|
|
919
|
-
}
|
|
920
|
-
if (!arg || !hasSep) {
|
|
921
|
-
break;
|
|
922
|
-
}
|
|
923
|
-
nameLoop = null;
|
|
924
|
-
if (arg.throwAwayComments) {
|
|
925
|
-
arg.throwAwayComments();
|
|
926
|
-
}
|
|
927
|
-
value = arg;
|
|
928
|
-
var val = null;
|
|
929
|
-
if (isCall) {
|
|
930
|
-
// Variable
|
|
931
|
-
if (arg.value && arg.value.length == 1) {
|
|
932
|
-
val = arg.value[0];
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
else {
|
|
936
|
-
val = arg;
|
|
937
|
-
}
|
|
938
|
-
if (val && (val instanceof tree_1.default.Variable || val instanceof tree_1.default.Property)) {
|
|
939
|
-
if (parserInput.$char(':')) {
|
|
940
|
-
if (expressions.length > 0) {
|
|
941
|
-
if (isSemiColonSeparated) {
|
|
942
|
-
error('Cannot mix ; and , as delimiter types');
|
|
943
|
-
}
|
|
944
|
-
expressionContainsNamed = true;
|
|
945
|
-
}
|
|
946
|
-
value = parsers.detachedRuleset() || parsers.expression();
|
|
947
|
-
if (!value) {
|
|
948
|
-
if (isCall) {
|
|
949
|
-
error('could not understand value for named argument');
|
|
950
|
-
}
|
|
951
|
-
else {
|
|
952
|
-
parserInput.restore();
|
|
953
|
-
returner.args = [];
|
|
954
|
-
return returner;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
nameLoop = (name = val.name);
|
|
958
|
-
}
|
|
959
|
-
else if (parserInput.$str('...')) {
|
|
960
|
-
if (!isCall) {
|
|
961
|
-
returner.variadic = true;
|
|
962
|
-
if (parserInput.$char(';') && !isSemiColonSeparated) {
|
|
963
|
-
isSemiColonSeparated = true;
|
|
964
|
-
}
|
|
965
|
-
(isSemiColonSeparated ? argsSemiColon : argsComma)
|
|
966
|
-
.push({ name: arg.name, variadic: true });
|
|
967
|
-
break;
|
|
968
|
-
}
|
|
969
|
-
else {
|
|
970
|
-
expand = true;
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
else if (!isCall) {
|
|
974
|
-
name = nameLoop = val.name;
|
|
975
|
-
value = null;
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
if (value) {
|
|
979
|
-
expressions.push(value);
|
|
980
|
-
}
|
|
981
|
-
argsComma.push({ name: nameLoop, value: value, expand: expand });
|
|
982
|
-
if (parserInput.$char(',')) {
|
|
983
|
-
hasSep = true;
|
|
984
|
-
continue;
|
|
985
|
-
}
|
|
986
|
-
hasSep = parserInput.$char(';') === ';';
|
|
987
|
-
if (hasSep || isSemiColonSeparated) {
|
|
988
|
-
if (expressionContainsNamed) {
|
|
989
|
-
error('Cannot mix ; and , as delimiter types');
|
|
990
|
-
}
|
|
991
|
-
isSemiColonSeparated = true;
|
|
992
|
-
if (expressions.length > 1) {
|
|
993
|
-
value = new (tree_1.default.Value)(expressions);
|
|
994
|
-
}
|
|
995
|
-
argsSemiColon.push({ name: name, value: value, expand: expand });
|
|
996
|
-
name = null;
|
|
997
|
-
expressions = [];
|
|
998
|
-
expressionContainsNamed = false;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
parserInput.forget();
|
|
1002
|
-
returner.args = isSemiColonSeparated ? argsSemiColon : argsComma;
|
|
1003
|
-
return returner;
|
|
1004
|
-
},
|
|
1005
|
-
//
|
|
1006
|
-
// A Mixin definition, with a list of parameters
|
|
1007
|
-
//
|
|
1008
|
-
// .rounded (@radius: 2px, @color) {
|
|
1009
|
-
// ...
|
|
1010
|
-
// }
|
|
1011
|
-
//
|
|
1012
|
-
// Until we have a finer grained state-machine, we have to
|
|
1013
|
-
// do a look-ahead, to make sure we don't have a mixin call.
|
|
1014
|
-
// See the `rule` function for more information.
|
|
1015
|
-
//
|
|
1016
|
-
// We start by matching `.rounded (`, and then proceed on to
|
|
1017
|
-
// the argument list, which has optional default values.
|
|
1018
|
-
// We store the parameters in `params`, with a `value` key,
|
|
1019
|
-
// if there is a value, such as in the case of `@radius`.
|
|
1020
|
-
//
|
|
1021
|
-
// Once we've got our params list, and a closing `)`, we parse
|
|
1022
|
-
// the `{...}` block.
|
|
1023
|
-
//
|
|
1024
|
-
definition: function () {
|
|
1025
|
-
var name;
|
|
1026
|
-
var params = [];
|
|
1027
|
-
var match;
|
|
1028
|
-
var ruleset;
|
|
1029
|
-
var cond;
|
|
1030
|
-
var variadic = false;
|
|
1031
|
-
if ((parserInput.currentChar() !== '.' && parserInput.currentChar() !== '#') ||
|
|
1032
|
-
parserInput.peek(/^[^{]*\}/)) {
|
|
1033
|
-
return;
|
|
1034
|
-
}
|
|
1035
|
-
parserInput.save();
|
|
1036
|
-
match = parserInput.$re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/);
|
|
1037
|
-
if (match) {
|
|
1038
|
-
name = match[1];
|
|
1039
|
-
var argInfo = this.args(false);
|
|
1040
|
-
params = argInfo.args;
|
|
1041
|
-
variadic = argInfo.variadic;
|
|
1042
|
-
// .mixincall("@{a}");
|
|
1043
|
-
// looks a bit like a mixin definition..
|
|
1044
|
-
// also
|
|
1045
|
-
// .mixincall(@a: {rule: set;});
|
|
1046
|
-
// so we have to be nice and restore
|
|
1047
|
-
if (!parserInput.$char(')')) {
|
|
1048
|
-
parserInput.restore('Missing closing \')\'');
|
|
1049
|
-
return;
|
|
1050
|
-
}
|
|
1051
|
-
parserInput.commentStore.length = 0;
|
|
1052
|
-
if (parserInput.$str('when')) { // Guard
|
|
1053
|
-
cond = expect(parsers.conditions, 'expected condition');
|
|
1054
|
-
}
|
|
1055
|
-
ruleset = parsers.block();
|
|
1056
|
-
if (ruleset) {
|
|
1057
|
-
parserInput.forget();
|
|
1058
|
-
return new (tree_1.default.mixin.Definition)(name, params, ruleset, cond, variadic);
|
|
1059
|
-
}
|
|
1060
|
-
else {
|
|
1061
|
-
parserInput.restore();
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
else {
|
|
1065
|
-
parserInput.restore();
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
ruleLookups: function () {
|
|
1069
|
-
var rule;
|
|
1070
|
-
var args;
|
|
1071
|
-
var lookups = [];
|
|
1072
|
-
if (parserInput.currentChar() !== '[') {
|
|
1073
|
-
return;
|
|
1074
|
-
}
|
|
1075
|
-
while (true) {
|
|
1076
|
-
parserInput.save();
|
|
1077
|
-
args = null;
|
|
1078
|
-
rule = this.lookupValue();
|
|
1079
|
-
if (!rule && rule !== '') {
|
|
1080
|
-
parserInput.restore();
|
|
1081
|
-
break;
|
|
1082
|
-
}
|
|
1083
|
-
lookups.push(rule);
|
|
1084
|
-
parserInput.forget();
|
|
1085
|
-
}
|
|
1086
|
-
if (lookups.length > 0) {
|
|
1087
|
-
return lookups;
|
|
1088
|
-
}
|
|
1089
|
-
},
|
|
1090
|
-
lookupValue: function () {
|
|
1091
|
-
parserInput.save();
|
|
1092
|
-
if (!parserInput.$char('[')) {
|
|
1093
|
-
parserInput.restore();
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
var name = parserInput.$re(/^(?:[@$]{0,2})[_a-zA-Z0-9-]*/);
|
|
1097
|
-
if (!parserInput.$char(']')) {
|
|
1098
|
-
parserInput.restore();
|
|
1099
|
-
return;
|
|
1100
|
-
}
|
|
1101
|
-
if (name || name === '') {
|
|
1102
|
-
parserInput.forget();
|
|
1103
|
-
return name;
|
|
1104
|
-
}
|
|
1105
|
-
parserInput.restore();
|
|
1106
|
-
}
|
|
1107
|
-
},
|
|
1108
|
-
//
|
|
1109
|
-
// Entities are the smallest recognized token,
|
|
1110
|
-
// and can be found inside a rule's value.
|
|
1111
|
-
//
|
|
1112
|
-
entity: function () {
|
|
1113
|
-
var entities = this.entities;
|
|
1114
|
-
return this.comment() || entities.literal() || entities.variable() || entities.url() ||
|
|
1115
|
-
entities.property() || entities.call() || entities.keyword() || this.mixin.call(true) ||
|
|
1116
|
-
entities.javascript();
|
|
1117
|
-
},
|
|
1118
|
-
//
|
|
1119
|
-
// A Declaration terminator. Note that we use `peek()` to check for '}',
|
|
1120
|
-
// because the `block` rule will be expecting it, but we still need to make sure
|
|
1121
|
-
// it's there, if ';' was omitted.
|
|
1122
|
-
//
|
|
1123
|
-
end: function () {
|
|
1124
|
-
return parserInput.$char(';') || parserInput.peek('}');
|
|
1125
|
-
},
|
|
1126
|
-
//
|
|
1127
|
-
// IE's alpha function
|
|
1128
|
-
//
|
|
1129
|
-
// alpha(opacity=88)
|
|
1130
|
-
//
|
|
1131
|
-
ieAlpha: function () {
|
|
1132
|
-
var value;
|
|
1133
|
-
// http://jsperf.com/case-insensitive-regex-vs-strtolower-then-regex/18
|
|
1134
|
-
if (!parserInput.$re(/^opacity=/i)) {
|
|
1135
|
-
return;
|
|
1136
|
-
}
|
|
1137
|
-
value = parserInput.$re(/^\d+/);
|
|
1138
|
-
if (!value) {
|
|
1139
|
-
value = expect(parsers.entities.variable, 'Could not parse alpha');
|
|
1140
|
-
value = "@{" + value.name.slice(1) + "}";
|
|
1141
|
-
}
|
|
1142
|
-
expectChar(')');
|
|
1143
|
-
return new tree_1.default.Quoted('', "alpha(opacity=" + value + ")");
|
|
1144
|
-
},
|
|
1145
|
-
//
|
|
1146
|
-
// A Selector Element
|
|
1147
|
-
//
|
|
1148
|
-
// div
|
|
1149
|
-
// + h1
|
|
1150
|
-
// #socks
|
|
1151
|
-
// input[type="text"]
|
|
1152
|
-
//
|
|
1153
|
-
// Elements are the building blocks for Selectors,
|
|
1154
|
-
// they are made out of a `Combinator` (see combinator rule),
|
|
1155
|
-
// and an element name, such as a tag a class, or `*`.
|
|
1156
|
-
//
|
|
1157
|
-
element: function () {
|
|
1158
|
-
var e;
|
|
1159
|
-
var c;
|
|
1160
|
-
var v;
|
|
1161
|
-
var index = parserInput.i;
|
|
1162
|
-
c = this.combinator();
|
|
1163
|
-
e = parserInput.$re(/^(?:\d+\.\d+|\d+)%/) ||
|
|
1164
|
-
parserInput.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/) ||
|
|
1165
|
-
parserInput.$char('*') || parserInput.$char('&') || this.attribute() ||
|
|
1166
|
-
parserInput.$re(/^\([^&()@]+\)/) || parserInput.$re(/^[\.#:](?=@)/) ||
|
|
1167
|
-
this.entities.variableCurly();
|
|
1168
|
-
if (!e) {
|
|
1169
|
-
parserInput.save();
|
|
1170
|
-
if (parserInput.$char('(')) {
|
|
1171
|
-
if ((v = this.selector(false)) && parserInput.$char(')')) {
|
|
1172
|
-
e = new (tree_1.default.Paren)(v);
|
|
1173
|
-
parserInput.forget();
|
|
1174
|
-
}
|
|
1175
|
-
else {
|
|
1176
|
-
parserInput.restore('Missing closing \')\'');
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
else {
|
|
1180
|
-
parserInput.forget();
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
if (e) {
|
|
1184
|
-
return new (tree_1.default.Element)(c, e, e instanceof tree_1.default.Variable, index, fileInfo);
|
|
1185
|
-
}
|
|
1186
|
-
},
|
|
1187
|
-
//
|
|
1188
|
-
// Combinators combine elements together, in a Selector.
|
|
1189
|
-
//
|
|
1190
|
-
// Because our parser isn't white-space sensitive, special care
|
|
1191
|
-
// has to be taken, when parsing the descendant combinator, ` `,
|
|
1192
|
-
// as it's an empty space. We have to check the previous character
|
|
1193
|
-
// in the input, to see if it's a ` ` character. More info on how
|
|
1194
|
-
// we deal with this in *combinator.js*.
|
|
1195
|
-
//
|
|
1196
|
-
combinator: function () {
|
|
1197
|
-
var c = parserInput.currentChar();
|
|
1198
|
-
if (c === '/') {
|
|
1199
|
-
parserInput.save();
|
|
1200
|
-
var slashedCombinator = parserInput.$re(/^\/[a-z]+\//i);
|
|
1201
|
-
if (slashedCombinator) {
|
|
1202
|
-
parserInput.forget();
|
|
1203
|
-
return new (tree_1.default.Combinator)(slashedCombinator);
|
|
1204
|
-
}
|
|
1205
|
-
parserInput.restore();
|
|
1206
|
-
}
|
|
1207
|
-
if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') {
|
|
1208
|
-
parserInput.i++;
|
|
1209
|
-
if (c === '^' && parserInput.currentChar() === '^') {
|
|
1210
|
-
c = '^^';
|
|
1211
|
-
parserInput.i++;
|
|
1212
|
-
}
|
|
1213
|
-
while (parserInput.isWhitespace()) {
|
|
1214
|
-
parserInput.i++;
|
|
1215
|
-
}
|
|
1216
|
-
return new (tree_1.default.Combinator)(c);
|
|
1217
|
-
}
|
|
1218
|
-
else if (parserInput.isWhitespace(-1)) {
|
|
1219
|
-
return new (tree_1.default.Combinator)(' ');
|
|
1220
|
-
}
|
|
1221
|
-
else {
|
|
1222
|
-
return new (tree_1.default.Combinator)(null);
|
|
1223
|
-
}
|
|
1224
|
-
},
|
|
1225
|
-
//
|
|
1226
|
-
// A CSS Selector
|
|
1227
|
-
// with less extensions e.g. the ability to extend and guard
|
|
1228
|
-
//
|
|
1229
|
-
// .class > div + h1
|
|
1230
|
-
// li a:hover
|
|
1231
|
-
//
|
|
1232
|
-
// Selectors are made out of one or more Elements, see above.
|
|
1233
|
-
//
|
|
1234
|
-
selector: function (isLess) {
|
|
1235
|
-
var index = parserInput.i;
|
|
1236
|
-
var elements;
|
|
1237
|
-
var extendList;
|
|
1238
|
-
var c;
|
|
1239
|
-
var e;
|
|
1240
|
-
var allExtends;
|
|
1241
|
-
var when;
|
|
1242
|
-
var condition;
|
|
1243
|
-
isLess = isLess !== false;
|
|
1244
|
-
while ((isLess && (extendList = this.extend())) || (isLess && (when = parserInput.$str('when'))) || (e = this.element())) {
|
|
1245
|
-
if (when) {
|
|
1246
|
-
condition = expect(this.conditions, 'expected condition');
|
|
1247
|
-
}
|
|
1248
|
-
else if (condition) {
|
|
1249
|
-
error('CSS guard can only be used at the end of selector');
|
|
1250
|
-
}
|
|
1251
|
-
else if (extendList) {
|
|
1252
|
-
if (allExtends) {
|
|
1253
|
-
allExtends = allExtends.concat(extendList);
|
|
1254
|
-
}
|
|
1255
|
-
else {
|
|
1256
|
-
allExtends = extendList;
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
else {
|
|
1260
|
-
if (allExtends) {
|
|
1261
|
-
error('Extend can only be used at the end of selector');
|
|
1262
|
-
}
|
|
1263
|
-
c = parserInput.currentChar();
|
|
1264
|
-
if (elements) {
|
|
1265
|
-
elements.push(e);
|
|
1266
|
-
}
|
|
1267
|
-
else {
|
|
1268
|
-
elements = [e];
|
|
1269
|
-
}
|
|
1270
|
-
e = null;
|
|
1271
|
-
}
|
|
1272
|
-
if (c === '{' || c === '}' || c === ';' || c === ',' || c === ')') {
|
|
1273
|
-
break;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
if (elements) {
|
|
1277
|
-
return new (tree_1.default.Selector)(elements, allExtends, condition, index, fileInfo);
|
|
1278
|
-
}
|
|
1279
|
-
if (allExtends) {
|
|
1280
|
-
error('Extend must be used to extend a selector, it cannot be used on its own');
|
|
1281
|
-
}
|
|
1282
|
-
},
|
|
1283
|
-
selectors: function () {
|
|
1284
|
-
var s;
|
|
1285
|
-
var selectors;
|
|
1286
|
-
while (true) {
|
|
1287
|
-
s = this.selector();
|
|
1288
|
-
if (!s) {
|
|
1289
|
-
break;
|
|
1290
|
-
}
|
|
1291
|
-
if (selectors) {
|
|
1292
|
-
selectors.push(s);
|
|
1293
|
-
}
|
|
1294
|
-
else {
|
|
1295
|
-
selectors = [s];
|
|
1296
|
-
}
|
|
1297
|
-
parserInput.commentStore.length = 0;
|
|
1298
|
-
if (s.condition && selectors.length > 1) {
|
|
1299
|
-
error("Guards are only currently allowed on a single selector.");
|
|
1300
|
-
}
|
|
1301
|
-
if (!parserInput.$char(',')) {
|
|
1302
|
-
break;
|
|
1303
|
-
}
|
|
1304
|
-
if (s.condition) {
|
|
1305
|
-
error("Guards are only currently allowed on a single selector.");
|
|
1306
|
-
}
|
|
1307
|
-
parserInput.commentStore.length = 0;
|
|
1308
|
-
}
|
|
1309
|
-
return selectors;
|
|
1310
|
-
},
|
|
1311
|
-
attribute: function () {
|
|
1312
|
-
if (!parserInput.$char('[')) {
|
|
1313
|
-
return;
|
|
1314
|
-
}
|
|
1315
|
-
var entities = this.entities;
|
|
1316
|
-
var key;
|
|
1317
|
-
var val;
|
|
1318
|
-
var op;
|
|
1319
|
-
if (!(key = entities.variableCurly())) {
|
|
1320
|
-
key = expect(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/);
|
|
1321
|
-
}
|
|
1322
|
-
op = parserInput.$re(/^[|~*$^]?=/);
|
|
1323
|
-
if (op) {
|
|
1324
|
-
val = entities.quoted() || parserInput.$re(/^[0-9]+%/) || parserInput.$re(/^[\w-]+/) || entities.variableCurly();
|
|
1325
|
-
}
|
|
1326
|
-
expectChar(']');
|
|
1327
|
-
return new (tree_1.default.Attribute)(key, op, val);
|
|
1328
|
-
},
|
|
1329
|
-
//
|
|
1330
|
-
// The `block` rule is used by `ruleset` and `mixin.definition`.
|
|
1331
|
-
// It's a wrapper around the `primary` rule, with added `{}`.
|
|
1332
|
-
//
|
|
1333
|
-
block: function () {
|
|
1334
|
-
var content;
|
|
1335
|
-
if (parserInput.$char('{') && (content = this.primary()) && parserInput.$char('}')) {
|
|
1336
|
-
return content;
|
|
1337
|
-
}
|
|
1338
|
-
},
|
|
1339
|
-
blockRuleset: function () {
|
|
1340
|
-
var block = this.block();
|
|
1341
|
-
if (block) {
|
|
1342
|
-
block = new tree_1.default.Ruleset(null, block);
|
|
1343
|
-
}
|
|
1344
|
-
return block;
|
|
1345
|
-
},
|
|
1346
|
-
detachedRuleset: function () {
|
|
1347
|
-
var argInfo;
|
|
1348
|
-
var params;
|
|
1349
|
-
var variadic;
|
|
1350
|
-
parserInput.save();
|
|
1351
|
-
if (parserInput.$re(/^[.#]\(/)) {
|
|
1352
|
-
/**
|
|
1353
|
-
* DR args currently only implemented for each() function, and not
|
|
1354
|
-
* yet settable as `@dr: #(@arg) {}`
|
|
1355
|
-
* This should be done when DRs are merged with mixins.
|
|
1356
|
-
* See: https://github.com/less/less-meta/issues/16
|
|
1357
|
-
*/
|
|
1358
|
-
argInfo = this.mixin.args(false);
|
|
1359
|
-
params = argInfo.args;
|
|
1360
|
-
variadic = argInfo.variadic;
|
|
1361
|
-
if (!parserInput.$char(')')) {
|
|
1362
|
-
parserInput.restore();
|
|
1363
|
-
return;
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
var blockRuleset = this.blockRuleset();
|
|
1367
|
-
if (blockRuleset) {
|
|
1368
|
-
parserInput.forget();
|
|
1369
|
-
if (params) {
|
|
1370
|
-
return new tree_1.default.mixin.Definition(null, params, blockRuleset, null, variadic);
|
|
1371
|
-
}
|
|
1372
|
-
return new tree_1.default.DetachedRuleset(blockRuleset);
|
|
1373
|
-
}
|
|
1374
|
-
parserInput.restore();
|
|
1375
|
-
},
|
|
1376
|
-
//
|
|
1377
|
-
// div, .class, body > p {...}
|
|
1378
|
-
//
|
|
1379
|
-
ruleset: function () {
|
|
1380
|
-
var selectors;
|
|
1381
|
-
var rules;
|
|
1382
|
-
var debugInfo;
|
|
1383
|
-
parserInput.save();
|
|
1384
|
-
if (context.dumpLineNumbers) {
|
|
1385
|
-
debugInfo = getDebugInfo(parserInput.i);
|
|
1386
|
-
}
|
|
1387
|
-
selectors = this.selectors();
|
|
1388
|
-
if (selectors && (rules = this.block())) {
|
|
1389
|
-
parserInput.forget();
|
|
1390
|
-
var ruleset = new (tree_1.default.Ruleset)(selectors, rules, context.strictImports);
|
|
1391
|
-
if (context.dumpLineNumbers) {
|
|
1392
|
-
ruleset.debugInfo = debugInfo;
|
|
1393
|
-
}
|
|
1394
|
-
return ruleset;
|
|
1395
|
-
}
|
|
1396
|
-
else {
|
|
1397
|
-
parserInput.restore();
|
|
1398
|
-
}
|
|
1399
|
-
},
|
|
1400
|
-
declaration: function () {
|
|
1401
|
-
var name;
|
|
1402
|
-
var value;
|
|
1403
|
-
var index = parserInput.i;
|
|
1404
|
-
var hasDR;
|
|
1405
|
-
var c = parserInput.currentChar();
|
|
1406
|
-
var important;
|
|
1407
|
-
var merge;
|
|
1408
|
-
var isVariable;
|
|
1409
|
-
if (c === '.' || c === '#' || c === '&' || c === ':') {
|
|
1410
|
-
return;
|
|
1411
|
-
}
|
|
1412
|
-
parserInput.save();
|
|
1413
|
-
name = this.variable() || this.ruleProperty();
|
|
1414
|
-
if (name) {
|
|
1415
|
-
isVariable = typeof name === 'string';
|
|
1416
|
-
if (isVariable) {
|
|
1417
|
-
value = this.detachedRuleset();
|
|
1418
|
-
if (value) {
|
|
1419
|
-
hasDR = true;
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
parserInput.commentStore.length = 0;
|
|
1423
|
-
if (!value) {
|
|
1424
|
-
// a name returned by this.ruleProperty() is always an array of the form:
|
|
1425
|
-
// [string-1, ..., string-n, ""] or [string-1, ..., string-n, "+"]
|
|
1426
|
-
// where each item is a tree.Keyword or tree.Variable
|
|
1427
|
-
merge = !isVariable && name.length > 1 && name.pop().value;
|
|
1428
|
-
// Custom property values get permissive parsing
|
|
1429
|
-
if (name[0].value && name[0].value.slice(0, 2) === '--') {
|
|
1430
|
-
value = this.permissiveValue();
|
|
1431
|
-
}
|
|
1432
|
-
// Try to store values as anonymous
|
|
1433
|
-
// If we need the value later we'll re-parse it in ruleset.parseValue
|
|
1434
|
-
else {
|
|
1435
|
-
value = this.anonymousValue();
|
|
1436
|
-
}
|
|
1437
|
-
if (value) {
|
|
1438
|
-
parserInput.forget();
|
|
1439
|
-
// anonymous values absorb the end ';' which is required for them to work
|
|
1440
|
-
return new (tree_1.default.Declaration)(name, value, false, merge, index, fileInfo);
|
|
1441
|
-
}
|
|
1442
|
-
if (!value) {
|
|
1443
|
-
value = this.value();
|
|
1444
|
-
}
|
|
1445
|
-
if (value) {
|
|
1446
|
-
important = this.important();
|
|
1447
|
-
}
|
|
1448
|
-
else if (isVariable) {
|
|
1449
|
-
// As a last resort, try permissiveValue
|
|
1450
|
-
value = this.permissiveValue();
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
if (value && (this.end() || hasDR)) {
|
|
1454
|
-
parserInput.forget();
|
|
1455
|
-
return new (tree_1.default.Declaration)(name, value, important, merge, index, fileInfo);
|
|
1456
|
-
}
|
|
1457
|
-
else {
|
|
1458
|
-
parserInput.restore();
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
else {
|
|
1462
|
-
parserInput.restore();
|
|
1463
|
-
}
|
|
1464
|
-
},
|
|
1465
|
-
anonymousValue: function () {
|
|
1466
|
-
var index = parserInput.i;
|
|
1467
|
-
var match = parserInput.$re(/^([^.#@\$+\/'"*`(;{}-]*);/);
|
|
1468
|
-
if (match) {
|
|
1469
|
-
return new (tree_1.default.Anonymous)(match[1], index);
|
|
1470
|
-
}
|
|
1471
|
-
},
|
|
1472
|
-
/**
|
|
1473
|
-
* Used for custom properties, at-rules, and variables (as fallback)
|
|
1474
|
-
* Parses almost anything inside of {} [] () "" blocks
|
|
1475
|
-
* until it reaches outer-most tokens.
|
|
1476
|
-
*
|
|
1477
|
-
* First, it will try to parse comments and entities to reach
|
|
1478
|
-
* the end. This is mostly like the Expression parser except no
|
|
1479
|
-
* math is allowed.
|
|
1480
|
-
*/
|
|
1481
|
-
permissiveValue: function (untilTokens) {
|
|
1482
|
-
var i;
|
|
1483
|
-
var e;
|
|
1484
|
-
var done;
|
|
1485
|
-
var value;
|
|
1486
|
-
var tok = untilTokens || ';';
|
|
1487
|
-
var index = parserInput.i;
|
|
1488
|
-
var result = [];
|
|
1489
|
-
function testCurrentChar() {
|
|
1490
|
-
var char = parserInput.currentChar();
|
|
1491
|
-
if (typeof tok === 'string') {
|
|
1492
|
-
return char === tok;
|
|
1493
|
-
}
|
|
1494
|
-
else {
|
|
1495
|
-
return tok.test(char);
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
if (testCurrentChar()) {
|
|
1499
|
-
return;
|
|
1500
|
-
}
|
|
1501
|
-
value = [];
|
|
1502
|
-
do {
|
|
1503
|
-
e = this.comment();
|
|
1504
|
-
if (e) {
|
|
1505
|
-
value.push(e);
|
|
1506
|
-
continue;
|
|
1507
|
-
}
|
|
1508
|
-
e = this.entity();
|
|
1509
|
-
if (e) {
|
|
1510
|
-
value.push(e);
|
|
1511
|
-
}
|
|
1512
|
-
} while (e);
|
|
1513
|
-
done = testCurrentChar();
|
|
1514
|
-
if (value.length > 0) {
|
|
1515
|
-
value = new (tree_1.default.Expression)(value);
|
|
1516
|
-
if (done) {
|
|
1517
|
-
return value;
|
|
1518
|
-
}
|
|
1519
|
-
else {
|
|
1520
|
-
result.push(value);
|
|
1521
|
-
}
|
|
1522
|
-
// Preserve space before $parseUntil as it will not
|
|
1523
|
-
if (parserInput.prevChar() === ' ') {
|
|
1524
|
-
result.push(new tree_1.default.Anonymous(' ', index));
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
parserInput.save();
|
|
1528
|
-
value = parserInput.$parseUntil(tok);
|
|
1529
|
-
if (value) {
|
|
1530
|
-
if (typeof value === 'string') {
|
|
1531
|
-
error("Expected '" + value + "'", 'Parse');
|
|
1532
|
-
}
|
|
1533
|
-
if (value.length === 1 && value[0] === ' ') {
|
|
1534
|
-
parserInput.forget();
|
|
1535
|
-
return new tree_1.default.Anonymous('', index);
|
|
1536
|
-
}
|
|
1537
|
-
var item = void 0;
|
|
1538
|
-
for (i = 0; i < value.length; i++) {
|
|
1539
|
-
item = value[i];
|
|
1540
|
-
if (Array.isArray(item)) {
|
|
1541
|
-
// Treat actual quotes as normal quoted values
|
|
1542
|
-
result.push(new tree_1.default.Quoted(item[0], item[1], true, index, fileInfo));
|
|
1543
|
-
}
|
|
1544
|
-
else {
|
|
1545
|
-
if (i === value.length - 1) {
|
|
1546
|
-
item = item.trim();
|
|
1547
|
-
}
|
|
1548
|
-
// Treat like quoted values, but replace vars like unquoted expressions
|
|
1549
|
-
var quote = new tree_1.default.Quoted('\'', item, true, index, fileInfo);
|
|
1550
|
-
quote.variableRegex = /@([\w-]+)/g;
|
|
1551
|
-
quote.propRegex = /\$([\w-]+)/g;
|
|
1552
|
-
result.push(quote);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
parserInput.forget();
|
|
1556
|
-
return new tree_1.default.Expression(result, true);
|
|
1557
|
-
}
|
|
1558
|
-
parserInput.restore();
|
|
1559
|
-
},
|
|
1560
|
-
//
|
|
1561
|
-
// An @import atrule
|
|
1562
|
-
//
|
|
1563
|
-
// @import "lib";
|
|
1564
|
-
//
|
|
1565
|
-
// Depending on our environment, importing is done differently:
|
|
1566
|
-
// In the browser, it's an XHR request, in Node, it would be a
|
|
1567
|
-
// file-system operation. The function used for importing is
|
|
1568
|
-
// stored in `import`, which we pass to the Import constructor.
|
|
1569
|
-
//
|
|
1570
|
-
'import': function () {
|
|
1571
|
-
var path;
|
|
1572
|
-
var features;
|
|
1573
|
-
var index = parserInput.i;
|
|
1574
|
-
var dir = parserInput.$re(/^@import?\s+/);
|
|
1575
|
-
if (dir) {
|
|
1576
|
-
var options = (dir ? this.importOptions() : null) || {};
|
|
1577
|
-
if ((path = this.entities.quoted() || this.entities.url())) {
|
|
1578
|
-
features = this.mediaFeatures();
|
|
1579
|
-
if (!parserInput.$char(';')) {
|
|
1580
|
-
parserInput.i = index;
|
|
1581
|
-
error('missing semi-colon or unrecognised media features on import');
|
|
1582
|
-
}
|
|
1583
|
-
features = features && new (tree_1.default.Value)(features);
|
|
1584
|
-
return new (tree_1.default.Import)(path, features, options, index, fileInfo);
|
|
1585
|
-
}
|
|
1586
|
-
else {
|
|
1587
|
-
parserInput.i = index;
|
|
1588
|
-
error('malformed import statement');
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
},
|
|
1592
|
-
importOptions: function () {
|
|
1593
|
-
var o;
|
|
1594
|
-
var options = {};
|
|
1595
|
-
var optionName;
|
|
1596
|
-
var value;
|
|
1597
|
-
// list of options, surrounded by parens
|
|
1598
|
-
if (!parserInput.$char('(')) {
|
|
1599
|
-
return null;
|
|
1600
|
-
}
|
|
1601
|
-
do {
|
|
1602
|
-
o = this.importOption();
|
|
1603
|
-
if (o) {
|
|
1604
|
-
optionName = o;
|
|
1605
|
-
value = true;
|
|
1606
|
-
switch (optionName) {
|
|
1607
|
-
case 'css':
|
|
1608
|
-
optionName = 'less';
|
|
1609
|
-
value = false;
|
|
1610
|
-
break;
|
|
1611
|
-
case 'once':
|
|
1612
|
-
optionName = 'multiple';
|
|
1613
|
-
value = false;
|
|
1614
|
-
break;
|
|
1615
|
-
}
|
|
1616
|
-
options[optionName] = value;
|
|
1617
|
-
if (!parserInput.$char(',')) {
|
|
1618
|
-
break;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
} while (o);
|
|
1622
|
-
expectChar(')');
|
|
1623
|
-
return options;
|
|
1624
|
-
},
|
|
1625
|
-
importOption: function () {
|
|
1626
|
-
var opt = parserInput.$re(/^(less|css|multiple|once|inline|reference|optional)/);
|
|
1627
|
-
if (opt) {
|
|
1628
|
-
return opt[1];
|
|
1629
|
-
}
|
|
1630
|
-
},
|
|
1631
|
-
mediaFeature: function () {
|
|
1632
|
-
var entities = this.entities;
|
|
1633
|
-
var nodes = [];
|
|
1634
|
-
var e;
|
|
1635
|
-
var p;
|
|
1636
|
-
parserInput.save();
|
|
1637
|
-
do {
|
|
1638
|
-
e = entities.keyword() || entities.variable() || entities.mixinLookup();
|
|
1639
|
-
if (e) {
|
|
1640
|
-
nodes.push(e);
|
|
1641
|
-
}
|
|
1642
|
-
else if (parserInput.$char('(')) {
|
|
1643
|
-
p = this.property();
|
|
1644
|
-
e = this.value();
|
|
1645
|
-
if (parserInput.$char(')')) {
|
|
1646
|
-
if (p && e) {
|
|
1647
|
-
nodes.push(new (tree_1.default.Paren)(new (tree_1.default.Declaration)(p, e, null, null, parserInput.i, fileInfo, true)));
|
|
1648
|
-
}
|
|
1649
|
-
else if (e) {
|
|
1650
|
-
nodes.push(new (tree_1.default.Paren)(e));
|
|
1651
|
-
}
|
|
1652
|
-
else {
|
|
1653
|
-
error('badly formed media feature definition');
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
else {
|
|
1657
|
-
error('Missing closing \')\'', 'Parse');
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
} while (e);
|
|
1661
|
-
parserInput.forget();
|
|
1662
|
-
if (nodes.length > 0) {
|
|
1663
|
-
return new (tree_1.default.Expression)(nodes);
|
|
1664
|
-
}
|
|
1665
|
-
},
|
|
1666
|
-
mediaFeatures: function () {
|
|
1667
|
-
var entities = this.entities;
|
|
1668
|
-
var features = [];
|
|
1669
|
-
var e;
|
|
1670
|
-
do {
|
|
1671
|
-
e = this.mediaFeature();
|
|
1672
|
-
if (e) {
|
|
1673
|
-
features.push(e);
|
|
1674
|
-
if (!parserInput.$char(',')) {
|
|
1675
|
-
break;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
else {
|
|
1679
|
-
e = entities.variable() || entities.mixinLookup();
|
|
1680
|
-
if (e) {
|
|
1681
|
-
features.push(e);
|
|
1682
|
-
if (!parserInput.$char(',')) {
|
|
1683
|
-
break;
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
} while (e);
|
|
1688
|
-
return features.length > 0 ? features : null;
|
|
1689
|
-
},
|
|
1690
|
-
media: function () {
|
|
1691
|
-
var features;
|
|
1692
|
-
var rules;
|
|
1693
|
-
var media;
|
|
1694
|
-
var debugInfo;
|
|
1695
|
-
var index = parserInput.i;
|
|
1696
|
-
if (context.dumpLineNumbers) {
|
|
1697
|
-
debugInfo = getDebugInfo(index);
|
|
1698
|
-
}
|
|
1699
|
-
parserInput.save();
|
|
1700
|
-
if (parserInput.$str('@media')) {
|
|
1701
|
-
features = this.mediaFeatures();
|
|
1702
|
-
rules = this.block();
|
|
1703
|
-
if (!rules) {
|
|
1704
|
-
error('media definitions require block statements after any features');
|
|
1705
|
-
}
|
|
1706
|
-
parserInput.forget();
|
|
1707
|
-
media = new (tree_1.default.Media)(rules, features, index, fileInfo);
|
|
1708
|
-
if (context.dumpLineNumbers) {
|
|
1709
|
-
media.debugInfo = debugInfo;
|
|
1710
|
-
}
|
|
1711
|
-
return media;
|
|
1712
|
-
}
|
|
1713
|
-
parserInput.restore();
|
|
1714
|
-
},
|
|
1715
|
-
//
|
|
1716
|
-
// A @plugin directive, used to import plugins dynamically.
|
|
1717
|
-
//
|
|
1718
|
-
// @plugin (args) "lib";
|
|
1719
|
-
//
|
|
1720
|
-
plugin: function () {
|
|
1721
|
-
var path;
|
|
1722
|
-
var args;
|
|
1723
|
-
var options;
|
|
1724
|
-
var index = parserInput.i;
|
|
1725
|
-
var dir = parserInput.$re(/^@plugin?\s+/);
|
|
1726
|
-
if (dir) {
|
|
1727
|
-
args = this.pluginArgs();
|
|
1728
|
-
if (args) {
|
|
1729
|
-
options = {
|
|
1730
|
-
pluginArgs: args,
|
|
1731
|
-
isPlugin: true
|
|
1732
|
-
};
|
|
1733
|
-
}
|
|
1734
|
-
else {
|
|
1735
|
-
options = { isPlugin: true };
|
|
1736
|
-
}
|
|
1737
|
-
if ((path = this.entities.quoted() || this.entities.url())) {
|
|
1738
|
-
if (!parserInput.$char(';')) {
|
|
1739
|
-
parserInput.i = index;
|
|
1740
|
-
error('missing semi-colon on @plugin');
|
|
1741
|
-
}
|
|
1742
|
-
return new (tree_1.default.Import)(path, null, options, index, fileInfo);
|
|
1743
|
-
}
|
|
1744
|
-
else {
|
|
1745
|
-
parserInput.i = index;
|
|
1746
|
-
error('malformed @plugin statement');
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
},
|
|
1750
|
-
pluginArgs: function () {
|
|
1751
|
-
// list of options, surrounded by parens
|
|
1752
|
-
parserInput.save();
|
|
1753
|
-
if (!parserInput.$char('(')) {
|
|
1754
|
-
parserInput.restore();
|
|
1755
|
-
return null;
|
|
1756
|
-
}
|
|
1757
|
-
var args = parserInput.$re(/^\s*([^\);]+)\)\s*/);
|
|
1758
|
-
if (args[1]) {
|
|
1759
|
-
parserInput.forget();
|
|
1760
|
-
return args[1].trim();
|
|
1761
|
-
}
|
|
1762
|
-
else {
|
|
1763
|
-
parserInput.restore();
|
|
1764
|
-
return null;
|
|
1765
|
-
}
|
|
1766
|
-
},
|
|
1767
|
-
//
|
|
1768
|
-
// A CSS AtRule
|
|
1769
|
-
//
|
|
1770
|
-
// @charset "utf-8";
|
|
1771
|
-
//
|
|
1772
|
-
atrule: function () {
|
|
1773
|
-
var index = parserInput.i;
|
|
1774
|
-
var name;
|
|
1775
|
-
var value;
|
|
1776
|
-
var rules;
|
|
1777
|
-
var nonVendorSpecificName;
|
|
1778
|
-
var hasIdentifier;
|
|
1779
|
-
var hasExpression;
|
|
1780
|
-
var hasUnknown;
|
|
1781
|
-
var hasBlock = true;
|
|
1782
|
-
var isRooted = true;
|
|
1783
|
-
if (parserInput.currentChar() !== '@') {
|
|
1784
|
-
return;
|
|
1785
|
-
}
|
|
1786
|
-
value = this['import']() || this.plugin() || this.media();
|
|
1787
|
-
if (value) {
|
|
1788
|
-
return value;
|
|
1789
|
-
}
|
|
1790
|
-
parserInput.save();
|
|
1791
|
-
name = parserInput.$re(/^@[a-z-]+/);
|
|
1792
|
-
if (!name) {
|
|
1793
|
-
return;
|
|
1794
|
-
}
|
|
1795
|
-
nonVendorSpecificName = name;
|
|
1796
|
-
if (name.charAt(1) == '-' && name.indexOf('-', 2) > 0) {
|
|
1797
|
-
nonVendorSpecificName = "@" + name.slice(name.indexOf('-', 2) + 1);
|
|
1798
|
-
}
|
|
1799
|
-
switch (nonVendorSpecificName) {
|
|
1800
|
-
case '@charset':
|
|
1801
|
-
hasIdentifier = true;
|
|
1802
|
-
hasBlock = false;
|
|
1803
|
-
break;
|
|
1804
|
-
case '@namespace':
|
|
1805
|
-
hasExpression = true;
|
|
1806
|
-
hasBlock = false;
|
|
1807
|
-
break;
|
|
1808
|
-
case '@keyframes':
|
|
1809
|
-
case '@counter-style':
|
|
1810
|
-
hasIdentifier = true;
|
|
1811
|
-
break;
|
|
1812
|
-
case '@document':
|
|
1813
|
-
case '@supports':
|
|
1814
|
-
hasUnknown = true;
|
|
1815
|
-
isRooted = false;
|
|
1816
|
-
break;
|
|
1817
|
-
default:
|
|
1818
|
-
hasUnknown = true;
|
|
1819
|
-
break;
|
|
1820
|
-
}
|
|
1821
|
-
parserInput.commentStore.length = 0;
|
|
1822
|
-
if (hasIdentifier) {
|
|
1823
|
-
value = this.entity();
|
|
1824
|
-
if (!value) {
|
|
1825
|
-
error("expected " + name + " identifier");
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
else if (hasExpression) {
|
|
1829
|
-
value = this.expression();
|
|
1830
|
-
if (!value) {
|
|
1831
|
-
error("expected " + name + " expression");
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
else if (hasUnknown) {
|
|
1835
|
-
value = this.permissiveValue(/^[{;]/);
|
|
1836
|
-
hasBlock = (parserInput.currentChar() === '{');
|
|
1837
|
-
if (!value) {
|
|
1838
|
-
if (!hasBlock && parserInput.currentChar() !== ';') {
|
|
1839
|
-
error(name + " rule is missing block or ending semi-colon");
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
else if (!value.value) {
|
|
1843
|
-
value = null;
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
if (hasBlock) {
|
|
1847
|
-
rules = this.blockRuleset();
|
|
1848
|
-
}
|
|
1849
|
-
if (rules || (!hasBlock && value && parserInput.$char(';'))) {
|
|
1850
|
-
parserInput.forget();
|
|
1851
|
-
return new (tree_1.default.AtRule)(name, value, rules, index, fileInfo, context.dumpLineNumbers ? getDebugInfo(index) : null, isRooted);
|
|
1852
|
-
}
|
|
1853
|
-
parserInput.restore('at-rule options not recognised');
|
|
1854
|
-
},
|
|
1855
|
-
//
|
|
1856
|
-
// A Value is a comma-delimited list of Expressions
|
|
1857
|
-
//
|
|
1858
|
-
// font-family: Baskerville, Georgia, serif;
|
|
1859
|
-
//
|
|
1860
|
-
// In a Rule, a Value represents everything after the `:`,
|
|
1861
|
-
// and before the `;`.
|
|
1862
|
-
//
|
|
1863
|
-
value: function () {
|
|
1864
|
-
var e;
|
|
1865
|
-
var expressions = [];
|
|
1866
|
-
var index = parserInput.i;
|
|
1867
|
-
do {
|
|
1868
|
-
e = this.expression();
|
|
1869
|
-
if (e) {
|
|
1870
|
-
expressions.push(e);
|
|
1871
|
-
if (!parserInput.$char(',')) {
|
|
1872
|
-
break;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
} while (e);
|
|
1876
|
-
if (expressions.length > 0) {
|
|
1877
|
-
return new (tree_1.default.Value)(expressions, index);
|
|
1878
|
-
}
|
|
1879
|
-
},
|
|
1880
|
-
important: function () {
|
|
1881
|
-
if (parserInput.currentChar() === '!') {
|
|
1882
|
-
return parserInput.$re(/^! *important/);
|
|
1883
|
-
}
|
|
1884
|
-
},
|
|
1885
|
-
sub: function () {
|
|
1886
|
-
var a;
|
|
1887
|
-
var e;
|
|
1888
|
-
parserInput.save();
|
|
1889
|
-
if (parserInput.$char('(')) {
|
|
1890
|
-
a = this.addition();
|
|
1891
|
-
if (a && parserInput.$char(')')) {
|
|
1892
|
-
parserInput.forget();
|
|
1893
|
-
e = new (tree_1.default.Expression)([a]);
|
|
1894
|
-
e.parens = true;
|
|
1895
|
-
return e;
|
|
1896
|
-
}
|
|
1897
|
-
parserInput.restore('Expected \')\'');
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
|
-
parserInput.restore();
|
|
1901
|
-
},
|
|
1902
|
-
multiplication: function () {
|
|
1903
|
-
var m;
|
|
1904
|
-
var a;
|
|
1905
|
-
var op;
|
|
1906
|
-
var operation;
|
|
1907
|
-
var isSpaced;
|
|
1908
|
-
m = this.operand();
|
|
1909
|
-
if (m) {
|
|
1910
|
-
isSpaced = parserInput.isWhitespace(-1);
|
|
1911
|
-
while (true) {
|
|
1912
|
-
if (parserInput.peek(/^\/[*\/]/)) {
|
|
1913
|
-
break;
|
|
1914
|
-
}
|
|
1915
|
-
parserInput.save();
|
|
1916
|
-
op = parserInput.$char('/') || parserInput.$char('*') || parserInput.$str('./');
|
|
1917
|
-
if (!op) {
|
|
1918
|
-
parserInput.forget();
|
|
1919
|
-
break;
|
|
1920
|
-
}
|
|
1921
|
-
a = this.operand();
|
|
1922
|
-
if (!a) {
|
|
1923
|
-
parserInput.restore();
|
|
1924
|
-
break;
|
|
1925
|
-
}
|
|
1926
|
-
parserInput.forget();
|
|
1927
|
-
m.parensInOp = true;
|
|
1928
|
-
a.parensInOp = true;
|
|
1929
|
-
operation = new (tree_1.default.Operation)(op, [operation || m, a], isSpaced);
|
|
1930
|
-
isSpaced = parserInput.isWhitespace(-1);
|
|
1931
|
-
}
|
|
1932
|
-
return operation || m;
|
|
1933
|
-
}
|
|
1934
|
-
},
|
|
1935
|
-
addition: function () {
|
|
1936
|
-
var m;
|
|
1937
|
-
var a;
|
|
1938
|
-
var op;
|
|
1939
|
-
var operation;
|
|
1940
|
-
var isSpaced;
|
|
1941
|
-
m = this.multiplication();
|
|
1942
|
-
if (m) {
|
|
1943
|
-
isSpaced = parserInput.isWhitespace(-1);
|
|
1944
|
-
while (true) {
|
|
1945
|
-
op = parserInput.$re(/^[-+]\s+/) || (!isSpaced && (parserInput.$char('+') || parserInput.$char('-')));
|
|
1946
|
-
if (!op) {
|
|
1947
|
-
break;
|
|
1948
|
-
}
|
|
1949
|
-
a = this.multiplication();
|
|
1950
|
-
if (!a) {
|
|
1951
|
-
break;
|
|
1952
|
-
}
|
|
1953
|
-
m.parensInOp = true;
|
|
1954
|
-
a.parensInOp = true;
|
|
1955
|
-
operation = new (tree_1.default.Operation)(op, [operation || m, a], isSpaced);
|
|
1956
|
-
isSpaced = parserInput.isWhitespace(-1);
|
|
1957
|
-
}
|
|
1958
|
-
return operation || m;
|
|
1959
|
-
}
|
|
1960
|
-
},
|
|
1961
|
-
conditions: function () {
|
|
1962
|
-
var a;
|
|
1963
|
-
var b;
|
|
1964
|
-
var index = parserInput.i;
|
|
1965
|
-
var condition;
|
|
1966
|
-
a = this.condition(true);
|
|
1967
|
-
if (a) {
|
|
1968
|
-
while (true) {
|
|
1969
|
-
if (!parserInput.peek(/^,\s*(not\s*)?\(/) || !parserInput.$char(',')) {
|
|
1970
|
-
break;
|
|
1971
|
-
}
|
|
1972
|
-
b = this.condition(true);
|
|
1973
|
-
if (!b) {
|
|
1974
|
-
break;
|
|
1975
|
-
}
|
|
1976
|
-
condition = new (tree_1.default.Condition)('or', condition || a, b, index);
|
|
1977
|
-
}
|
|
1978
|
-
return condition || a;
|
|
1979
|
-
}
|
|
1980
|
-
},
|
|
1981
|
-
condition: function (needsParens) {
|
|
1982
|
-
var result;
|
|
1983
|
-
var logical;
|
|
1984
|
-
var next;
|
|
1985
|
-
function or() {
|
|
1986
|
-
return parserInput.$str('or');
|
|
1987
|
-
}
|
|
1988
|
-
result = this.conditionAnd(needsParens);
|
|
1989
|
-
if (!result) {
|
|
1990
|
-
return;
|
|
1991
|
-
}
|
|
1992
|
-
logical = or();
|
|
1993
|
-
if (logical) {
|
|
1994
|
-
next = this.condition(needsParens);
|
|
1995
|
-
if (next) {
|
|
1996
|
-
result = new (tree_1.default.Condition)(logical, result, next);
|
|
1997
|
-
}
|
|
1998
|
-
else {
|
|
1999
|
-
return;
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
return result;
|
|
2003
|
-
},
|
|
2004
|
-
conditionAnd: function (needsParens) {
|
|
2005
|
-
var result;
|
|
2006
|
-
var logical;
|
|
2007
|
-
var next;
|
|
2008
|
-
var self = this;
|
|
2009
|
-
function insideCondition() {
|
|
2010
|
-
var cond = self.negatedCondition(needsParens) || self.parenthesisCondition(needsParens);
|
|
2011
|
-
if (!cond && !needsParens) {
|
|
2012
|
-
return self.atomicCondition(needsParens);
|
|
2013
|
-
}
|
|
2014
|
-
return cond;
|
|
2015
|
-
}
|
|
2016
|
-
function and() {
|
|
2017
|
-
return parserInput.$str('and');
|
|
2018
|
-
}
|
|
2019
|
-
result = insideCondition();
|
|
2020
|
-
if (!result) {
|
|
2021
|
-
return;
|
|
2022
|
-
}
|
|
2023
|
-
logical = and();
|
|
2024
|
-
if (logical) {
|
|
2025
|
-
next = this.conditionAnd(needsParens);
|
|
2026
|
-
if (next) {
|
|
2027
|
-
result = new (tree_1.default.Condition)(logical, result, next);
|
|
2028
|
-
}
|
|
2029
|
-
else {
|
|
2030
|
-
return;
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
return result;
|
|
2034
|
-
},
|
|
2035
|
-
negatedCondition: function (needsParens) {
|
|
2036
|
-
if (parserInput.$str('not')) {
|
|
2037
|
-
var result = this.parenthesisCondition(needsParens);
|
|
2038
|
-
if (result) {
|
|
2039
|
-
result.negate = !result.negate;
|
|
2040
|
-
}
|
|
2041
|
-
return result;
|
|
2042
|
-
}
|
|
2043
|
-
},
|
|
2044
|
-
parenthesisCondition: function (needsParens) {
|
|
2045
|
-
function tryConditionFollowedByParenthesis(me) {
|
|
2046
|
-
var body;
|
|
2047
|
-
parserInput.save();
|
|
2048
|
-
body = me.condition(needsParens);
|
|
2049
|
-
if (!body) {
|
|
2050
|
-
parserInput.restore();
|
|
2051
|
-
return;
|
|
2052
|
-
}
|
|
2053
|
-
if (!parserInput.$char(')')) {
|
|
2054
|
-
parserInput.restore();
|
|
2055
|
-
return;
|
|
2056
|
-
}
|
|
2057
|
-
parserInput.forget();
|
|
2058
|
-
return body;
|
|
2059
|
-
}
|
|
2060
|
-
var body;
|
|
2061
|
-
parserInput.save();
|
|
2062
|
-
if (!parserInput.$str('(')) {
|
|
2063
|
-
parserInput.restore();
|
|
2064
|
-
return;
|
|
2065
|
-
}
|
|
2066
|
-
body = tryConditionFollowedByParenthesis(this);
|
|
2067
|
-
if (body) {
|
|
2068
|
-
parserInput.forget();
|
|
2069
|
-
return body;
|
|
2070
|
-
}
|
|
2071
|
-
body = this.atomicCondition(needsParens);
|
|
2072
|
-
if (!body) {
|
|
2073
|
-
parserInput.restore();
|
|
2074
|
-
return;
|
|
2075
|
-
}
|
|
2076
|
-
if (!parserInput.$char(')')) {
|
|
2077
|
-
parserInput.restore("expected ')' got '" + parserInput.currentChar() + "'");
|
|
2078
|
-
return;
|
|
2079
|
-
}
|
|
2080
|
-
parserInput.forget();
|
|
2081
|
-
return body;
|
|
2082
|
-
},
|
|
2083
|
-
atomicCondition: function (needsParens) {
|
|
2084
|
-
var entities = this.entities;
|
|
2085
|
-
var index = parserInput.i;
|
|
2086
|
-
var a;
|
|
2087
|
-
var b;
|
|
2088
|
-
var c;
|
|
2089
|
-
var op;
|
|
2090
|
-
function cond() {
|
|
2091
|
-
return this.addition() || entities.keyword() || entities.quoted() || entities.mixinLookup();
|
|
2092
|
-
}
|
|
2093
|
-
cond = cond.bind(this);
|
|
2094
|
-
a = cond();
|
|
2095
|
-
if (a) {
|
|
2096
|
-
if (parserInput.$char('>')) {
|
|
2097
|
-
if (parserInput.$char('=')) {
|
|
2098
|
-
op = '>=';
|
|
2099
|
-
}
|
|
2100
|
-
else {
|
|
2101
|
-
op = '>';
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
else if (parserInput.$char('<')) {
|
|
2105
|
-
if (parserInput.$char('=')) {
|
|
2106
|
-
op = '<=';
|
|
2107
|
-
}
|
|
2108
|
-
else {
|
|
2109
|
-
op = '<';
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
else if (parserInput.$char('=')) {
|
|
2113
|
-
if (parserInput.$char('>')) {
|
|
2114
|
-
op = '=>';
|
|
2115
|
-
}
|
|
2116
|
-
else if (parserInput.$char('<')) {
|
|
2117
|
-
op = '=<';
|
|
2118
|
-
}
|
|
2119
|
-
else {
|
|
2120
|
-
op = '=';
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
if (op) {
|
|
2124
|
-
b = cond();
|
|
2125
|
-
if (b) {
|
|
2126
|
-
c = new (tree_1.default.Condition)(op, a, b, index, false);
|
|
2127
|
-
}
|
|
2128
|
-
else {
|
|
2129
|
-
error('expected expression');
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
else {
|
|
2133
|
-
c = new (tree_1.default.Condition)('=', a, new (tree_1.default.Keyword)('true'), index, false);
|
|
2134
|
-
}
|
|
2135
|
-
return c;
|
|
2136
|
-
}
|
|
2137
|
-
},
|
|
2138
|
-
//
|
|
2139
|
-
// An operand is anything that can be part of an operation,
|
|
2140
|
-
// such as a Color, or a Variable
|
|
2141
|
-
//
|
|
2142
|
-
operand: function () {
|
|
2143
|
-
var entities = this.entities;
|
|
2144
|
-
var negate;
|
|
2145
|
-
if (parserInput.peek(/^-[@\$\(]/)) {
|
|
2146
|
-
negate = parserInput.$char('-');
|
|
2147
|
-
}
|
|
2148
|
-
var o = this.sub() || entities.dimension() ||
|
|
2149
|
-
entities.color() || entities.variable() ||
|
|
2150
|
-
entities.property() || entities.call() ||
|
|
2151
|
-
entities.quoted(true) || entities.colorKeyword() ||
|
|
2152
|
-
entities.mixinLookup();
|
|
2153
|
-
if (negate) {
|
|
2154
|
-
o.parensInOp = true;
|
|
2155
|
-
o = new (tree_1.default.Negative)(o);
|
|
2156
|
-
}
|
|
2157
|
-
return o;
|
|
2158
|
-
},
|
|
2159
|
-
//
|
|
2160
|
-
// Expressions either represent mathematical operations,
|
|
2161
|
-
// or white-space delimited Entities.
|
|
2162
|
-
//
|
|
2163
|
-
// 1px solid black
|
|
2164
|
-
// @var * 2
|
|
2165
|
-
//
|
|
2166
|
-
expression: function () {
|
|
2167
|
-
var entities = [];
|
|
2168
|
-
var e;
|
|
2169
|
-
var delim;
|
|
2170
|
-
var index = parserInput.i;
|
|
2171
|
-
do {
|
|
2172
|
-
e = this.comment();
|
|
2173
|
-
if (e) {
|
|
2174
|
-
entities.push(e);
|
|
2175
|
-
continue;
|
|
2176
|
-
}
|
|
2177
|
-
e = this.addition() || this.entity();
|
|
2178
|
-
if (e instanceof tree_1.default.Comment) {
|
|
2179
|
-
e = null;
|
|
2180
|
-
}
|
|
2181
|
-
if (e) {
|
|
2182
|
-
entities.push(e);
|
|
2183
|
-
// operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here
|
|
2184
|
-
if (!parserInput.peek(/^\/[\/*]/)) {
|
|
2185
|
-
delim = parserInput.$char('/');
|
|
2186
|
-
if (delim) {
|
|
2187
|
-
entities.push(new (tree_1.default.Anonymous)(delim, index));
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
} while (e);
|
|
2192
|
-
if (entities.length > 0) {
|
|
2193
|
-
return new (tree_1.default.Expression)(entities);
|
|
2194
|
-
}
|
|
2195
|
-
},
|
|
2196
|
-
property: function () {
|
|
2197
|
-
var name = parserInput.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);
|
|
2198
|
-
if (name) {
|
|
2199
|
-
return name[1];
|
|
2200
|
-
}
|
|
2201
|
-
},
|
|
2202
|
-
ruleProperty: function () {
|
|
2203
|
-
var name = [];
|
|
2204
|
-
var index = [];
|
|
2205
|
-
var s;
|
|
2206
|
-
var k;
|
|
2207
|
-
parserInput.save();
|
|
2208
|
-
var simpleProperty = parserInput.$re(/^([_a-zA-Z0-9-]+)\s*:/);
|
|
2209
|
-
if (simpleProperty) {
|
|
2210
|
-
name = [new (tree_1.default.Keyword)(simpleProperty[1])];
|
|
2211
|
-
parserInput.forget();
|
|
2212
|
-
return name;
|
|
2213
|
-
}
|
|
2214
|
-
function match(re) {
|
|
2215
|
-
var i = parserInput.i;
|
|
2216
|
-
var chunk = parserInput.$re(re);
|
|
2217
|
-
if (chunk) {
|
|
2218
|
-
index.push(i);
|
|
2219
|
-
return name.push(chunk[1]);
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
match(/^(\*?)/);
|
|
2223
|
-
while (true) {
|
|
2224
|
-
if (!match(/^((?:[\w-]+)|(?:[@\$]\{[\w-]+\}))/)) {
|
|
2225
|
-
break;
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
if ((name.length > 1) && match(/^((?:\+_|\+)?)\s*:/)) {
|
|
2229
|
-
parserInput.forget();
|
|
2230
|
-
// at last, we have the complete match now. move forward,
|
|
2231
|
-
// convert name particles to tree objects and return:
|
|
2232
|
-
if (name[0] === '') {
|
|
2233
|
-
name.shift();
|
|
2234
|
-
index.shift();
|
|
2235
|
-
}
|
|
2236
|
-
for (k = 0; k < name.length; k++) {
|
|
2237
|
-
s = name[k];
|
|
2238
|
-
name[k] = (s.charAt(0) !== '@' && s.charAt(0) !== '$') ?
|
|
2239
|
-
new (tree_1.default.Keyword)(s) :
|
|
2240
|
-
(s.charAt(0) === '@' ?
|
|
2241
|
-
new (tree_1.default.Variable)("@" + s.slice(2, -1), index[k], fileInfo) :
|
|
2242
|
-
new (tree_1.default.Property)("$" + s.slice(2, -1), index[k], fileInfo));
|
|
2243
|
-
}
|
|
2244
|
-
return name;
|
|
2245
|
-
}
|
|
2246
|
-
parserInput.restore();
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
};
|
|
2251
|
-
Parser.serializeVars = function (vars) {
|
|
2252
|
-
var s = '';
|
|
2253
|
-
for (var name_1 in vars) {
|
|
2254
|
-
if (Object.hasOwnProperty.call(vars, name_1)) {
|
|
2255
|
-
var value = vars[name_1];
|
|
2256
|
-
s += ((name_1[0] === '@') ? '' : '@') + name_1 + ": " + value + ((String(value).slice(-1) === ';') ? '' : ';');
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
return s;
|
|
2260
|
-
};
|
|
2261
|
-
exports.default = Parser;
|
|
2262
|
-
//# sourceMappingURL=parser.js.map
|