From 2b65d3722a755a96a1a1c4fa79cdc5d8a2d1fb95 Mon Sep 17 00:00:00 2001 From: Julia Gustafsson Date: Thu, 16 Feb 2023 15:17:37 +0100 Subject: [PATCH] Bump version to 1.1.3 --- analytics/pom.xml | 2 +- announcer/pom.xml | 2 +- appinfo/pom.xml | 2 +- application/pom.xml | 2 +- autoclose/pom.xml | 2 +- builder/pom.xml | 2 +- core/pom.xml | 2 +- criteria/pom.xml | 2 +- docs/antora.yml | 2 +- exception/pom.xml | 2 +- field/pom.xml | 2 +- .../fieldgenerator-component/pom.xml | 2 +- .../fieldgenerator-standard/pom.xml | 2 +- .../fieldgenerator-test-package/pom.xml | 2 +- fieldgenerator/fieldgenerator-test/pom.xml | 2 +- fieldgenerator/pom.xml | 2 +- integration/cdi/cdi-jpastreamer/pom.xml | 2 +- integration/cdi/pom.xml | 2 +- integration/pom.xml | 2 +- integration/spring/pom.xml | 2 +- .../pom.xml | 2 +- interopoptimizer/pom.xml | 2 +- javanine/pom.xml | 2 +- merger/pom.xml | 2 +- node_modules/.package-lock.json | 212 + node_modules/antora-lunr/LICENSE | 21 + node_modules/antora-lunr/README.md | 117 + .../antora-lunr/lib/generate-index.js | 161 + node_modules/antora-lunr/lib/index.js | 20 + node_modules/antora-lunr/package.json | 41 + .../supplemental_ui/css/search.css | 127 + .../supplemental_ui/js/vendor/lunr.js | 3481 ++++ .../supplemental_ui/js/vendor/search.js | 227 + .../partials/footer-scripts.hbs | 7 + .../supplemental_ui/partials/head-meta.hbs | 1 + .../partials/header-content.hbs | 35 + node_modules/boolbase/README.md | 10 + node_modules/boolbase/index.js | 20 + node_modules/boolbase/package.json | 23 + node_modules/cheerio-select/LICENSE | 11 + node_modules/cheerio-select/README.md | 18 + .../cheerio-select/lib/esm/helpers.d.ts | 18 + .../cheerio-select/lib/esm/helpers.d.ts.map | 1 + .../cheerio-select/lib/esm/helpers.js | 32 + .../cheerio-select/lib/esm/helpers.js.map | 1 + .../cheerio-select/lib/esm/index.d.ts | 25 + .../cheerio-select/lib/esm/index.d.ts.map | 1 + node_modules/cheerio-select/lib/esm/index.js | 253 + .../cheerio-select/lib/esm/index.js.map | 1 + .../cheerio-select/lib/esm/package.json | 1 + .../cheerio-select/lib/esm/positionals.d.ts | 23 + .../lib/esm/positionals.d.ts.map | 1 + .../cheerio-select/lib/esm/positionals.js | 59 + .../cheerio-select/lib/esm/positionals.js.map | 1 + node_modules/cheerio-select/lib/helpers.d.ts | 18 + .../cheerio-select/lib/helpers.d.ts.map | 1 + node_modules/cheerio-select/lib/helpers.js | 38 + .../cheerio-select/lib/helpers.js.map | 1 + node_modules/cheerio-select/lib/index.d.ts | 25 + .../cheerio-select/lib/index.d.ts.map | 1 + node_modules/cheerio-select/lib/index.js | 314 + node_modules/cheerio-select/lib/index.js.map | 1 + .../cheerio-select/lib/positionals.d.ts | 23 + .../cheerio-select/lib/positionals.d.ts.map | 1 + .../cheerio-select/lib/positionals.js | 64 + .../cheerio-select/lib/positionals.js.map | 1 + node_modules/cheerio-select/package.json | 76 + node_modules/cheerio/LICENSE | 21 + node_modules/cheerio/Readme.md | 357 + node_modules/cheerio/lib/api/attributes.d.ts | 345 + .../cheerio/lib/api/attributes.d.ts.map | 1 + node_modules/cheerio/lib/api/attributes.js | 634 + .../cheerio/lib/api/attributes.js.map | 1 + node_modules/cheerio/lib/api/css.d.ts | 53 + node_modules/cheerio/lib/api/css.d.ts.map | 1 + node_modules/cheerio/lib/api/css.js | 130 + node_modules/cheerio/lib/api/css.js.map | 1 + node_modules/cheerio/lib/api/forms.d.ts | 51 + node_modules/cheerio/lib/api/forms.d.ts.map | 1 + node_modules/cheerio/lib/api/forms.js | 104 + node_modules/cheerio/lib/api/forms.js.map | 1 + .../cheerio/lib/api/manipulation.d.ts | 535 + .../cheerio/lib/api/manipulation.d.ts.map | 1 + node_modules/cheerio/lib/api/manipulation.js | 873 + .../cheerio/lib/api/manipulation.js.map | 1 + node_modules/cheerio/lib/api/traversing.d.ts | 657 + .../cheerio/lib/api/traversing.d.ts.map | 1 + node_modules/cheerio/lib/api/traversing.js | 919 + .../cheerio/lib/api/traversing.js.map | 1 + node_modules/cheerio/lib/cheerio.d.ts | 82 + node_modules/cheerio/lib/cheerio.d.ts.map | 1 + node_modules/cheerio/lib/cheerio.js | 78 + node_modules/cheerio/lib/cheerio.js.map | 1 + .../cheerio/lib/esm/api/attributes.d.ts | 345 + .../cheerio/lib/esm/api/attributes.d.ts.map | 1 + .../cheerio/lib/esm/api/attributes.js | 613 + .../cheerio/lib/esm/api/attributes.js.map | 1 + node_modules/cheerio/lib/esm/api/css.d.ts | 53 + node_modules/cheerio/lib/esm/api/css.d.ts.map | 1 + node_modules/cheerio/lib/esm/api/css.js | 125 + node_modules/cheerio/lib/esm/api/css.js.map | 1 + node_modules/cheerio/lib/esm/api/forms.d.ts | 51 + .../cheerio/lib/esm/api/forms.d.ts.map | 1 + node_modules/cheerio/lib/esm/api/forms.js | 95 + node_modules/cheerio/lib/esm/api/forms.js.map | 1 + .../cheerio/lib/esm/api/manipulation.d.ts | 535 + .../cheerio/lib/esm/api/manipulation.d.ts.map | 1 + .../cheerio/lib/esm/api/manipulation.js | 822 + .../cheerio/lib/esm/api/manipulation.js.map | 1 + .../cheerio/lib/esm/api/traversing.d.ts | 657 + .../cheerio/lib/esm/api/traversing.d.ts.map | 1 + .../cheerio/lib/esm/api/traversing.js | 843 + .../cheerio/lib/esm/api/traversing.js.map | 1 + node_modules/cheerio/lib/esm/cheerio.d.ts | 82 + node_modules/cheerio/lib/esm/cheerio.d.ts.map | 1 + node_modules/cheerio/lib/esm/cheerio.js | 50 + node_modules/cheerio/lib/esm/cheerio.js.map | 1 + node_modules/cheerio/lib/esm/index.d.ts | 120 + node_modules/cheerio/lib/esm/index.d.ts.map | 1 + node_modules/cheerio/lib/esm/index.js | 114 + node_modules/cheerio/lib/esm/index.js.map | 1 + node_modules/cheerio/lib/esm/load.d.ts | 73 + node_modules/cheerio/lib/esm/load.d.ts.map | 1 + node_modules/cheerio/lib/esm/load.js | 134 + node_modules/cheerio/lib/esm/load.js.map | 1 + node_modules/cheerio/lib/esm/options.d.ts | 103 + node_modules/cheerio/lib/esm/options.d.ts.map | 1 + node_modules/cheerio/lib/esm/options.js | 38 + node_modules/cheerio/lib/esm/options.js.map | 1 + node_modules/cheerio/lib/esm/package.json | 1 + node_modules/cheerio/lib/esm/parse.d.ts | 32 + node_modules/cheerio/lib/esm/parse.d.ts.map | 1 + node_modules/cheerio/lib/esm/parse.js | 85 + node_modules/cheerio/lib/esm/parse.js.map | 1 + .../lib/esm/parsers/parse5-adapter.d.ts | 33 + .../lib/esm/parsers/parse5-adapter.d.ts.map | 1 + .../cheerio/lib/esm/parsers/parse5-adapter.js | 64 + .../lib/esm/parsers/parse5-adapter.js.map | 1 + node_modules/cheerio/lib/esm/slim.d.ts | 33 + node_modules/cheerio/lib/esm/slim.d.ts.map | 1 + node_modules/cheerio/lib/esm/slim.js | 34 + node_modules/cheerio/lib/esm/slim.js.map | 1 + node_modules/cheerio/lib/esm/static.d.ts | 106 + node_modules/cheerio/lib/esm/static.d.ts.map | 1 + node_modules/cheerio/lib/esm/static.js | 197 + node_modules/cheerio/lib/esm/static.js.map | 1 + node_modules/cheerio/lib/esm/types.d.ts | 33 + node_modules/cheerio/lib/esm/types.d.ts.map | 1 + node_modules/cheerio/lib/esm/types.js | 14 + node_modules/cheerio/lib/esm/types.js.map | 1 + node_modules/cheerio/lib/esm/utils.d.ts | 88 + node_modules/cheerio/lib/esm/utils.d.ts.map | 1 + node_modules/cheerio/lib/esm/utils.js | 124 + node_modules/cheerio/lib/esm/utils.js.map | 1 + node_modules/cheerio/lib/index.d.ts | 120 + node_modules/cheerio/lib/index.d.ts.map | 1 + node_modules/cheerio/lib/index.js | 153 + node_modules/cheerio/lib/index.js.map | 1 + node_modules/cheerio/lib/load.d.ts | 73 + node_modules/cheerio/lib/load.d.ts.map | 1 + node_modules/cheerio/lib/load.js | 191 + node_modules/cheerio/lib/load.js.map | 1 + node_modules/cheerio/lib/options.d.ts | 103 + node_modules/cheerio/lib/options.d.ts.map | 1 + node_modules/cheerio/lib/options.js | 53 + node_modules/cheerio/lib/options.js.map | 1 + node_modules/cheerio/lib/parse.d.ts | 32 + node_modules/cheerio/lib/parse.d.ts.map | 1 + node_modules/cheerio/lib/parse.js | 90 + node_modules/cheerio/lib/parse.js.map | 1 + .../cheerio/lib/parsers/parse5-adapter.d.ts | 33 + .../lib/parsers/parse5-adapter.d.ts.map | 1 + .../cheerio/lib/parsers/parse5-adapter.js | 79 + .../cheerio/lib/parsers/parse5-adapter.js.map | 1 + node_modules/cheerio/lib/slim.d.ts | 33 + node_modules/cheerio/lib/slim.d.ts.map | 1 + node_modules/cheerio/lib/slim.js | 54 + node_modules/cheerio/lib/slim.js.map | 1 + node_modules/cheerio/lib/static.d.ts | 106 + node_modules/cheerio/lib/static.d.ts.map | 1 + node_modules/cheerio/lib/static.js | 238 + node_modules/cheerio/lib/static.js.map | 1 + node_modules/cheerio/lib/types.d.ts | 33 + node_modules/cheerio/lib/types.d.ts.map | 1 + node_modules/cheerio/lib/types.js | 15 + node_modules/cheerio/lib/types.js.map | 1 + node_modules/cheerio/lib/utils.d.ts | 88 + node_modules/cheerio/lib/utils.d.ts.map | 1 + node_modules/cheerio/lib/utils.js | 134 + node_modules/cheerio/lib/utils.js.map | 1 + node_modules/cheerio/package.json | 134 + node_modules/css-select/LICENSE | 11 + node_modules/css-select/README.md | 264 + node_modules/css-select/lib/attributes.d.ts | 20 + .../css-select/lib/attributes.d.ts.map | 1 + node_modules/css-select/lib/attributes.js | 248 + node_modules/css-select/lib/attributes.js.map | 1 + node_modules/css-select/lib/compile.d.ts | 26 + node_modules/css-select/lib/compile.d.ts.map | 1 + node_modules/css-select/lib/compile.js | 163 + node_modules/css-select/lib/compile.js.map | 1 + .../css-select/lib/esm/attributes.d.ts | 20 + .../css-select/lib/esm/attributes.d.ts.map | 1 + node_modules/css-select/lib/esm/attributes.js | 234 + .../css-select/lib/esm/attributes.js.map | 1 + node_modules/css-select/lib/esm/compile.d.ts | 26 + .../css-select/lib/esm/compile.d.ts.map | 1 + node_modules/css-select/lib/esm/compile.js | 127 + .../css-select/lib/esm/compile.js.map | 1 + node_modules/css-select/lib/esm/general.d.ts | 16 + .../css-select/lib/esm/general.d.ts.map | 1 + node_modules/css-select/lib/esm/general.js | 156 + .../css-select/lib/esm/general.js.map | 1 + node_modules/css-select/lib/esm/index.d.ts | 63 + .../css-select/lib/esm/index.d.ts.map | 1 + node_modules/css-select/lib/esm/index.js | 127 + node_modules/css-select/lib/esm/index.js.map | 1 + node_modules/css-select/lib/esm/package.json | 1 + .../lib/esm/pseudo-selectors/aliases.d.ts | 18 + .../lib/esm/pseudo-selectors/aliases.d.ts.map | 1 + .../lib/esm/pseudo-selectors/aliases.js | 47 + .../lib/esm/pseudo-selectors/aliases.js.map | 1 + .../lib/esm/pseudo-selectors/filters.d.ts | 17 + .../lib/esm/pseudo-selectors/filters.d.ts.map | 1 + .../lib/esm/pseudo-selectors/filters.js | 155 + .../lib/esm/pseudo-selectors/filters.js.map | 1 + .../lib/esm/pseudo-selectors/index.d.ts | 21 + .../lib/esm/pseudo-selectors/index.d.ts.map | 1 + .../lib/esm/pseudo-selectors/index.js | 52 + .../lib/esm/pseudo-selectors/index.js.map | 1 + .../lib/esm/pseudo-selectors/pseudos.d.ts | 19 + .../lib/esm/pseudo-selectors/pseudos.d.ts.map | 1 + .../lib/esm/pseudo-selectors/pseudos.js | 91 + .../lib/esm/pseudo-selectors/pseudos.js.map | 1 + .../lib/esm/pseudo-selectors/subselects.d.ts | 22 + .../esm/pseudo-selectors/subselects.d.ts.map | 1 + .../lib/esm/pseudo-selectors/subselects.js | 106 + .../esm/pseudo-selectors/subselects.js.map | 1 + node_modules/css-select/lib/esm/sort.d.ts | 25 + node_modules/css-select/lib/esm/sort.d.ts.map | 1 + node_modules/css-select/lib/esm/sort.js | 91 + node_modules/css-select/lib/esm/sort.js.map | 1 + node_modules/css-select/lib/esm/types.d.ts | 180 + .../css-select/lib/esm/types.d.ts.map | 1 + node_modules/css-select/lib/esm/types.js | 14 + node_modules/css-select/lib/esm/types.js.map | 1 + node_modules/css-select/lib/general.d.ts | 16 + node_modules/css-select/lib/general.d.ts.map | 1 + node_modules/css-select/lib/general.js | 160 + node_modules/css-select/lib/general.js.map | 1 + node_modules/css-select/lib/index.d.ts | 63 + node_modules/css-select/lib/index.d.ts.map | 1 + node_modules/css-select/lib/index.js | 166 + node_modules/css-select/lib/index.js.map | 1 + .../lib/pseudo-selectors/aliases.d.ts | 18 + .../lib/pseudo-selectors/aliases.d.ts.map | 1 + .../lib/pseudo-selectors/aliases.js | 46 + .../lib/pseudo-selectors/aliases.js.map | 1 + .../lib/pseudo-selectors/filters.d.ts | 17 + .../lib/pseudo-selectors/filters.d.ts.map | 1 + .../lib/pseudo-selectors/filters.js | 169 + .../lib/pseudo-selectors/filters.js.map | 1 + .../lib/pseudo-selectors/index.d.ts | 21 + .../lib/pseudo-selectors/index.d.ts.map | 1 + .../css-select/lib/pseudo-selectors/index.js | 58 + .../lib/pseudo-selectors/index.js.map | 1 + .../lib/pseudo-selectors/pseudos.d.ts | 19 + .../lib/pseudo-selectors/pseudos.d.ts.map | 1 + .../lib/pseudo-selectors/pseudos.js | 105 + .../lib/pseudo-selectors/pseudos.js.map | 1 + .../lib/pseudo-selectors/subselects.d.ts | 22 + .../lib/pseudo-selectors/subselects.d.ts.map | 1 + .../lib/pseudo-selectors/subselects.js | 124 + .../lib/pseudo-selectors/subselects.js.map | 1 + node_modules/css-select/lib/sort.d.ts | 25 + node_modules/css-select/lib/sort.d.ts.map | 1 + node_modules/css-select/lib/sort.js | 96 + node_modules/css-select/lib/sort.js.map | 1 + node_modules/css-select/lib/types.d.ts | 180 + node_modules/css-select/lib/types.d.ts.map | 1 + node_modules/css-select/lib/types.js | 15 + node_modules/css-select/lib/types.js.map | 1 + node_modules/css-select/package.json | 81 + node_modules/css-what/LICENSE | 11 + node_modules/css-what/lib/commonjs/index.d.ts | 17 + .../css-what/lib/commonjs/index.d.ts.map | 1 + node_modules/css-what/lib/commonjs/index.js | 35 + node_modules/css-what/lib/commonjs/parse.d.ts | 33 + .../css-what/lib/commonjs/parse.d.ts.map | 1 + node_modules/css-what/lib/commonjs/parse.js | 437 + .../css-what/lib/commonjs/stringify.d.ts | 21 + .../css-what/lib/commonjs/stringify.d.ts.map | 1 + .../css-what/lib/commonjs/stringify.js | 150 + node_modules/css-what/lib/commonjs/types.d.ts | 83 + .../css-what/lib/commonjs/types.d.ts.map | 1 + node_modules/css-what/lib/commonjs/types.js | 54 + node_modules/css-what/lib/es/index.d.ts | 17 + node_modules/css-what/lib/es/index.d.ts.map | 1 + node_modules/css-what/lib/es/index.js | 15 + node_modules/css-what/lib/es/parse.d.ts | 33 + node_modules/css-what/lib/es/parse.d.ts.map | 1 + node_modules/css-what/lib/es/parse.js | 432 + node_modules/css-what/lib/es/stringify.d.ts | 21 + .../css-what/lib/es/stringify.d.ts.map | 1 + node_modules/css-what/lib/es/stringify.js | 138 + node_modules/css-what/lib/es/types.d.ts | 83 + node_modules/css-what/lib/es/types.d.ts.map | 1 + node_modules/css-what/lib/es/types.js | 51 + node_modules/css-what/package.json | 59 + node_modules/css-what/readme.md | 69 + node_modules/dom-serializer/LICENSE | 11 + node_modules/dom-serializer/README.md | 109 + .../dom-serializer/lib/esm/foreignNames.d.ts | 16 + .../lib/esm/foreignNames.d.ts.map | 1 + .../dom-serializer/lib/esm/foreignNames.js | 112 + .../dom-serializer/lib/esm/index.d.ts | 65 + .../dom-serializer/lib/esm/index.d.ts.map | 1 + node_modules/dom-serializer/lib/esm/index.js | 202 + .../dom-serializer/lib/esm/package.json | 1 + .../dom-serializer/lib/foreignNames.d.ts | 16 + .../dom-serializer/lib/foreignNames.d.ts.map | 1 + .../dom-serializer/lib/foreignNames.js | 115 + node_modules/dom-serializer/lib/index.d.ts | 65 + .../dom-serializer/lib/index.d.ts.map | 1 + node_modules/dom-serializer/lib/index.js | 241 + node_modules/dom-serializer/package.json | 69 + node_modules/domelementtype/LICENSE | 11 + .../domelementtype/lib/esm/index.d.ts | 61 + .../domelementtype/lib/esm/index.d.ts.map | 1 + node_modules/domelementtype/lib/esm/index.js | 63 + .../domelementtype/lib/esm/package.json | 1 + node_modules/domelementtype/lib/index.d.ts | 61 + .../domelementtype/lib/index.d.ts.map | 1 + node_modules/domelementtype/lib/index.js | 67 + node_modules/domelementtype/package.json | 54 + node_modules/domelementtype/readme.md | 1 + node_modules/domhandler/LICENSE | 11 + node_modules/domhandler/lib/esm/index.d.ts | 89 + .../domhandler/lib/esm/index.d.ts.map | 1 + node_modules/domhandler/lib/esm/index.js | 158 + node_modules/domhandler/lib/esm/node.d.ts | 258 + node_modules/domhandler/lib/esm/node.d.ts.map | 1 + node_modules/domhandler/lib/esm/node.js | 350 + node_modules/domhandler/lib/esm/package.json | 1 + node_modules/domhandler/lib/index.d.ts | 89 + node_modules/domhandler/lib/index.d.ts.map | 1 + node_modules/domhandler/lib/index.js | 177 + node_modules/domhandler/lib/node.d.ts | 258 + node_modules/domhandler/lib/node.d.ts.map | 1 + node_modules/domhandler/lib/node.js | 486 + node_modules/domhandler/package.json | 73 + node_modules/domhandler/readme.md | 92 + node_modules/domutils/LICENSE | 11 + node_modules/domutils/lib/esm/feeds.d.ts | 84 + node_modules/domutils/lib/esm/feeds.d.ts.map | 1 + node_modules/domutils/lib/esm/feeds.js | 195 + node_modules/domutils/lib/esm/feeds.js.map | 1 + node_modules/domutils/lib/esm/helpers.d.ts | 71 + .../domutils/lib/esm/helpers.d.ts.map | 1 + node_modules/domutils/lib/esm/helpers.js | 147 + node_modules/domutils/lib/esm/helpers.js.map | 1 + node_modules/domutils/lib/esm/index.d.ts | 23 + node_modules/domutils/lib/esm/index.d.ts.map | 1 + node_modules/domutils/lib/esm/index.js | 22 + node_modules/domutils/lib/esm/index.js.map | 1 + node_modules/domutils/lib/esm/legacy.d.ts | 71 + node_modules/domutils/lib/esm/legacy.d.ts.map | 1 + node_modules/domutils/lib/esm/legacy.js | 129 + node_modules/domutils/lib/esm/legacy.js.map | 1 + .../domutils/lib/esm/manipulation.d.ts | 62 + .../domutils/lib/esm/manipulation.d.ts.map | 1 + node_modules/domutils/lib/esm/manipulation.js | 140 + .../domutils/lib/esm/manipulation.js.map | 1 + node_modules/domutils/lib/esm/package.json | 1 + node_modules/domutils/lib/esm/querying.d.ts | 75 + .../domutils/lib/esm/querying.d.ts.map | 1 + node_modules/domutils/lib/esm/querying.js | 131 + node_modules/domutils/lib/esm/querying.js.map | 1 + node_modules/domutils/lib/esm/stringify.d.ts | 59 + .../domutils/lib/esm/stringify.d.ts.map | 1 + node_modules/domutils/lib/esm/stringify.js | 93 + .../domutils/lib/esm/stringify.js.map | 1 + node_modules/domutils/lib/esm/traversal.d.ts | 78 + .../domutils/lib/esm/traversal.d.ts.map | 1 + node_modules/domutils/lib/esm/traversal.js | 122 + .../domutils/lib/esm/traversal.js.map | 1 + node_modules/domutils/lib/feeds.d.ts | 84 + node_modules/domutils/lib/feeds.d.ts.map | 1 + node_modules/domutils/lib/feeds.js | 203 + node_modules/domutils/lib/feeds.js.map | 1 + node_modules/domutils/lib/helpers.d.ts | 71 + node_modules/domutils/lib/helpers.d.ts.map | 1 + node_modules/domutils/lib/helpers.js | 153 + node_modules/domutils/lib/helpers.js.map | 1 + node_modules/domutils/lib/index.d.ts | 23 + node_modules/domutils/lib/index.d.ts.map | 1 + node_modules/domutils/lib/index.js | 45 + node_modules/domutils/lib/index.js.map | 1 + node_modules/domutils/lib/legacy.d.ts | 71 + node_modules/domutils/lib/legacy.d.ts.map | 1 + node_modules/domutils/lib/legacy.js | 143 + node_modules/domutils/lib/legacy.js.map | 1 + node_modules/domutils/lib/manipulation.d.ts | 62 + .../domutils/lib/manipulation.d.ts.map | 1 + node_modules/domutils/lib/manipulation.js | 149 + node_modules/domutils/lib/manipulation.js.map | 1 + node_modules/domutils/lib/querying.d.ts | 75 + node_modules/domutils/lib/querying.d.ts.map | 1 + node_modules/domutils/lib/querying.js | 146 + node_modules/domutils/lib/querying.js.map | 1 + node_modules/domutils/lib/stringify.d.ts | 59 + node_modules/domutils/lib/stringify.d.ts.map | 1 + node_modules/domutils/lib/stringify.js | 104 + node_modules/domutils/lib/stringify.js.map | 1 + node_modules/domutils/lib/traversal.d.ts | 78 + node_modules/domutils/lib/traversal.d.ts.map | 1 + node_modules/domutils/lib/traversal.js | 136 + node_modules/domutils/lib/traversal.js.map | 1 + node_modules/domutils/package.json | 76 + node_modules/domutils/readme.md | 31 + node_modules/entities/LICENSE | 11 + node_modules/entities/lib/decode.d.ts | 46 + node_modules/entities/lib/decode.d.ts.map | 1 + node_modules/entities/lib/decode.js | 191 + node_modules/entities/lib/decode.js.map | 1 + .../entities/lib/decode_codepoint.d.ts | 17 + .../entities/lib/decode_codepoint.d.ts.map | 1 + node_modules/entities/lib/decode_codepoint.js | 72 + .../entities/lib/decode_codepoint.js.map | 1 + node_modules/entities/lib/encode.d.ts | 35 + node_modules/entities/lib/encode.d.ts.map | 1 + node_modules/entities/lib/encode.js | 89 + node_modules/entities/lib/encode.js.map | 1 + node_modules/entities/lib/escape.d.ts | 56 + node_modules/entities/lib/escape.d.ts.map | 1 + node_modules/entities/lib/escape.js | 124 + node_modules/entities/lib/escape.js.map | 1 + node_modules/entities/lib/esm/decode.d.ts | 46 + node_modules/entities/lib/esm/decode.d.ts.map | 1 + node_modules/entities/lib/esm/decode.js | 178 + node_modules/entities/lib/esm/decode.js.map | 1 + .../entities/lib/esm/decode_codepoint.d.ts | 17 + .../lib/esm/decode_codepoint.d.ts.map | 1 + .../entities/lib/esm/decode_codepoint.js | 67 + .../entities/lib/esm/decode_codepoint.js.map | 1 + node_modules/entities/lib/esm/encode.d.ts | 35 + node_modules/entities/lib/esm/encode.d.ts.map | 1 + node_modules/entities/lib/esm/encode.js | 81 + node_modules/entities/lib/esm/encode.js.map | 1 + node_modules/entities/lib/esm/escape.d.ts | 56 + node_modules/entities/lib/esm/escape.d.ts.map | 1 + node_modules/entities/lib/esm/escape.js | 118 + node_modules/entities/lib/esm/escape.js.map | 1 + .../lib/esm/generated/decode-data-html.d.ts | 16 + .../esm/generated/decode-data-html.d.ts.map | 1 + .../lib/esm/generated/decode-data-html.js | 19 + .../lib/esm/generated/decode-data-html.js.map | 1 + .../lib/esm/generated/decode-data-xml.d.ts | 16 + .../esm/generated/decode-data-xml.d.ts.map | 1 + .../lib/esm/generated/decode-data-xml.js | 19 + .../lib/esm/generated/decode-data-xml.js.map | 1 + .../lib/esm/generated/encode-html.d.ts | 21 + .../lib/esm/generated/encode-html.d.ts.map | 1 + .../entities/lib/esm/generated/encode-html.js | 22 + .../lib/esm/generated/encode-html.js.map | 1 + node_modules/entities/lib/esm/index.d.ts | 115 + node_modules/entities/lib/esm/index.d.ts.map | 1 + node_modules/entities/lib/esm/index.js | 125 + node_modules/entities/lib/esm/index.js.map | 1 + node_modules/entities/lib/esm/package.json | 1 + .../lib/generated/decode-data-html.d.ts | 16 + .../lib/generated/decode-data-html.d.ts.map | 1 + .../lib/generated/decode-data-html.js | 21 + .../lib/generated/decode-data-html.js.map | 1 + .../lib/generated/decode-data-xml.d.ts | 16 + .../lib/generated/decode-data-xml.d.ts.map | 1 + .../entities/lib/generated/decode-data-xml.js | 21 + .../lib/generated/decode-data-xml.js.map | 1 + .../entities/lib/generated/encode-html.d.ts | 21 + .../lib/generated/encode-html.d.ts.map | 1 + .../entities/lib/generated/encode-html.js | 24 + .../entities/lib/generated/encode-html.js.map | 1 + node_modules/entities/lib/index.d.ts | 115 + node_modules/entities/lib/index.d.ts.map | 1 + node_modules/entities/lib/index.js | 149 + node_modules/entities/lib/index.js.map | 1 + node_modules/entities/package.json | 90 + node_modules/entities/readme.md | 122 + node_modules/html-entities/LICENSE | 19 + node_modules/html-entities/README.md | 63 + .../html-entities/lib/html4-entities.d.ts | 23 + .../html-entities/lib/html4-entities.js | 140 + .../html-entities/lib/html5-entities.d.ts | 23 + .../html-entities/lib/html5-entities.js | 179 + node_modules/html-entities/lib/index.d.ts | 16 + node_modules/html-entities/lib/index.js | 21 + .../html-entities/lib/surrogate-pairs.d.ts | 17 + .../html-entities/lib/surrogate-pairs.js | 27 + .../html-entities/lib/xml-entities.d.ts | 23 + .../html-entities/lib/xml-entities.js | 144 + node_modules/html-entities/package.json | 53 + node_modules/htmlparser2/LICENSE | 18 + node_modules/htmlparser2/README.md | 168 + node_modules/htmlparser2/lib/Parser.d.ts | 203 + node_modules/htmlparser2/lib/Parser.d.ts.map | 1 + node_modules/htmlparser2/lib/Parser.js | 530 + node_modules/htmlparser2/lib/Parser.js.map | 1 + node_modules/htmlparser2/lib/Tokenizer.d.ts | 156 + .../htmlparser2/lib/Tokenizer.d.ts.map | 1 + node_modules/htmlparser2/lib/Tokenizer.js | 916 + node_modules/htmlparser2/lib/Tokenizer.js.map | 1 + .../htmlparser2/lib/WritableStream.d.ts | 29 + .../htmlparser2/lib/WritableStream.d.ts.map | 1 + .../htmlparser2/lib/WritableStream.js | 66 + .../htmlparser2/lib/WritableStream.js.map | 1 + node_modules/htmlparser2/lib/esm/Parser.d.ts | 203 + .../htmlparser2/lib/esm/Parser.d.ts.map | 1 + node_modules/htmlparser2/lib/esm/Parser.js | 501 + .../htmlparser2/lib/esm/Parser.js.map | 1 + .../htmlparser2/lib/esm/Tokenizer.d.ts | 156 + .../htmlparser2/lib/esm/Tokenizer.d.ts.map | 1 + node_modules/htmlparser2/lib/esm/Tokenizer.js | 910 + .../htmlparser2/lib/esm/Tokenizer.js.map | 1 + .../htmlparser2/lib/esm/WritableStream.d.ts | 29 + .../lib/esm/WritableStream.d.ts.map | 1 + .../htmlparser2/lib/esm/WritableStream.js | 44 + .../htmlparser2/lib/esm/WritableStream.js.map | 1 + node_modules/htmlparser2/lib/esm/index.d.ts | 59 + .../htmlparser2/lib/esm/index.d.ts.map | 1 + node_modules/htmlparser2/lib/esm/index.js | 74 + node_modules/htmlparser2/lib/esm/index.js.map | 1 + node_modules/htmlparser2/lib/esm/package.json | 1 + node_modules/htmlparser2/lib/index.d.ts | 59 + node_modules/htmlparser2/lib/index.d.ts.map | 1 + node_modules/htmlparser2/lib/index.js | 108 + node_modules/htmlparser2/lib/index.js.map | 1 + node_modules/htmlparser2/package.json | 92 + node_modules/lunr/.eslintrc.json | 86 + node_modules/lunr/.npmignore | 3 + node_modules/lunr/.travis.yml | 14 + node_modules/lunr/CHANGELOG.md | 266 + node_modules/lunr/CNAME | 1 + node_modules/lunr/CONTRIBUTING.md | 20 + node_modules/lunr/LICENSE | 19 + node_modules/lunr/Makefile | 90 + node_modules/lunr/README.md | 78 + node_modules/lunr/VERSION | 1 + node_modules/lunr/bower.json | 11 + node_modules/lunr/component.json | 9 + node_modules/lunr/index.html | 319 + node_modules/lunr/lib/builder.js | 367 + node_modules/lunr/lib/field_ref.js | 40 + node_modules/lunr/lib/idf.js | 33 + node_modules/lunr/lib/index.js | 499 + node_modules/lunr/lib/lunr.js | 61 + node_modules/lunr/lib/match_data.js | 119 + node_modules/lunr/lib/pipeline.js | 274 + node_modules/lunr/lib/query.js | 200 + node_modules/lunr/lib/query_lexer.js | 221 + node_modules/lunr/lib/query_parse_error.js | 20 + node_modules/lunr/lib/query_parser.js | 267 + node_modules/lunr/lib/set.js | 140 + node_modules/lunr/lib/stemmer.js | 235 + node_modules/lunr/lib/stop_word_filter.js | 172 + node_modules/lunr/lib/token.js | 70 + node_modules/lunr/lib/token_set.js | 422 + node_modules/lunr/lib/token_set_builder.js | 81 + node_modules/lunr/lib/tokenizer.js | 83 + node_modules/lunr/lib/trimmer.js | 34 + node_modules/lunr/lib/utils.js | 99 + node_modules/lunr/lib/vector.js | 203 + node_modules/lunr/lunr.js | 3481 ++++ node_modules/lunr/lunr.min.js | 13 + node_modules/lunr/notes | 47 + node_modules/lunr/package.json | 30 + node_modules/lunr/perf/builder_perf.js | 42 + node_modules/lunr/perf/perf_helper.js | 38 + node_modules/lunr/perf/pipeline_perf.js | 55 + node_modules/lunr/perf/query_parser_perf.js | 36 + node_modules/lunr/perf/search_perf.js | 84 + node_modules/lunr/perf/stemmer_perf.js | 19 + node_modules/lunr/perf/token_set_perf.js | 54 + node_modules/lunr/perf/tokenizer_perf.js | 19 + node_modules/lunr/perf/vector_perf.js | 43 + node_modules/lunr/styles.css | 145 + node_modules/lunr/test/builder_test.js | 237 + node_modules/lunr/test/env/chai.js | 6154 +++++++ node_modules/lunr/test/env/index.mustache | 55 + node_modules/lunr/test/env/mocha.css | 338 + node_modules/lunr/test/env/mocha.js | 15186 ++++++++++++++++ node_modules/lunr/test/field_ref_test.js | 47 + .../lunr/test/fixtures/stemming_vocab.json | 1 + node_modules/lunr/test/index.html | 72 + node_modules/lunr/test/match_data_test.js | 53 + node_modules/lunr/test/pipeline_test.js | 292 + node_modules/lunr/test/query_lexer_test.js | 585 + node_modules/lunr/test/query_parser_test.js | 564 + node_modules/lunr/test/query_test.js | 256 + node_modules/lunr/test/search_test.js | 1112 ++ node_modules/lunr/test/serialization_test.js | 65 + node_modules/lunr/test/set_test.js | 155 + node_modules/lunr/test/stemmer_test.js | 38 + .../lunr/test/stop_word_filter_test.js | 42 + node_modules/lunr/test/test_helper.js | 25 + node_modules/lunr/test/token_set_test.js | 339 + node_modules/lunr/test/token_test.js | 72 + node_modules/lunr/test/tokenizer_test.js | 126 + node_modules/lunr/test/trimmer_test.js | 41 + node_modules/lunr/test/utils_test.js | 89 + node_modules/lunr/test/vector_test.js | 166 + node_modules/nth-check/LICENSE | 11 + node_modules/nth-check/README.md | 136 + node_modules/nth-check/lib/compile.d.ts | 68 + node_modules/nth-check/lib/compile.d.ts.map | 1 + node_modules/nth-check/lib/compile.js | 133 + node_modules/nth-check/lib/compile.js.map | 1 + node_modules/nth-check/lib/esm/compile.d.ts | 68 + .../nth-check/lib/esm/compile.d.ts.map | 1 + node_modules/nth-check/lib/esm/compile.js | 125 + node_modules/nth-check/lib/esm/compile.js.map | 1 + node_modules/nth-check/lib/esm/index.d.ts | 72 + node_modules/nth-check/lib/esm/index.d.ts.map | 1 + node_modules/nth-check/lib/esm/index.js | 75 + node_modules/nth-check/lib/esm/index.js.map | 1 + node_modules/nth-check/lib/esm/package.json | 1 + node_modules/nth-check/lib/esm/parse.d.ts | 22 + node_modules/nth-check/lib/esm/parse.d.ts.map | 1 + node_modules/nth-check/lib/esm/parse.js | 85 + node_modules/nth-check/lib/esm/parse.js.map | 1 + node_modules/nth-check/lib/index.d.ts | 72 + node_modules/nth-check/lib/index.d.ts.map | 1 + node_modules/nth-check/lib/index.js | 82 + node_modules/nth-check/lib/index.js.map | 1 + node_modules/nth-check/lib/parse.d.ts | 22 + node_modules/nth-check/lib/parse.d.ts.map | 1 + node_modules/nth-check/lib/parse.js | 89 + node_modules/nth-check/lib/parse.js.map | 1 + node_modules/nth-check/package.json | 78 + .../parse5-htmlparser2-tree-adapter/LICENSE | 19 + .../parse5-htmlparser2-tree-adapter/README.md | 34 + .../dist/cjs/index.d.ts | 20 + .../dist/cjs/index.js | 227 + .../dist/cjs/package.json | 1 + .../dist/index.d.ts | 20 + .../dist/index.js | 226 + .../package.json | 39 + node_modules/parse5/LICENSE | 19 + node_modules/parse5/README.md | 38 + .../parse5/dist/cjs/common/doctype.d.ts | 18 + .../parse5/dist/cjs/common/doctype.js | 132 + .../parse5/dist/cjs/common/error-codes.d.ts | 81 + .../parse5/dist/cjs/common/error-codes.js | 79 + .../dist/cjs/common/foreign-content.d.ts | 23 + .../parse5/dist/cjs/common/foreign-content.js | 251 + node_modules/parse5/dist/cjs/common/html.d.ts | 301 + node_modules/parse5/dist/cjs/common/html.js | 541 + .../parse5/dist/cjs/common/token.d.ts | 98 + node_modules/parse5/dist/cjs/common/token.js | 37 + .../parse5/dist/cjs/common/unicode.d.ts | 62 + .../parse5/dist/cjs/common/unicode.js | 89 + node_modules/parse5/dist/cjs/index.d.ts | 73 + node_modules/parse5/dist/cjs/index.js | 69 + node_modules/parse5/dist/cjs/package.json | 1 + .../cjs/parser/formatting-element-list.d.ts | 50 + .../cjs/parser/formatting-element-list.js | 127 + .../parse5/dist/cjs/parser/index.d.ts | 170 + node_modules/parse5/dist/cjs/parser/index.js | 3175 ++++ .../dist/cjs/parser/open-element-stack.d.ts | 66 + .../dist/cjs/parser/open-element-stack.js | 328 + .../parse5/dist/cjs/serializer/index.d.ts | 74 + .../parse5/dist/cjs/serializer/index.js | 185 + .../parse5/dist/cjs/tokenizer/index.d.ts | 261 + .../parse5/dist/cjs/tokenizer/index.js | 2920 +++ .../dist/cjs/tokenizer/preprocessor.d.ts | 50 + .../parse5/dist/cjs/tokenizer/preprocessor.js | 211 + .../dist/cjs/tree-adapters/default.d.ts | 98 + .../parse5/dist/cjs/tree-adapters/default.js | 189 + .../dist/cjs/tree-adapters/interface.d.ts | 263 + .../dist/cjs/tree-adapters/interface.js | 15 + node_modules/parse5/dist/common/doctype.d.ts | 18 + node_modules/parse5/dist/common/doctype.js | 127 + .../parse5/dist/common/error-codes.d.ts | 81 + .../parse5/dist/common/error-codes.js | 76 + .../parse5/dist/common/foreign-content.d.ts | 23 + .../parse5/dist/common/foreign-content.js | 242 + node_modules/parse5/dist/common/html.d.ts | 301 + node_modules/parse5/dist/common/html.js | 535 + node_modules/parse5/dist/common/token.d.ts | 98 + node_modules/parse5/dist/common/token.js | 33 + node_modules/parse5/dist/common/unicode.d.ts | 62 + node_modules/parse5/dist/common/unicode.js | 81 + node_modules/parse5/dist/index.d.ts | 73 + node_modules/parse5/dist/index.js | 57 + .../dist/parser/formatting-element-list.d.ts | 50 + .../dist/parser/formatting-element-list.js | 123 + node_modules/parse5/dist/parser/index.d.ts | 170 + node_modules/parse5/dist/parser/index.js | 3180 ++++ .../dist/parser/open-element-stack.d.ts | 66 + .../parse5/dist/parser/open-element-stack.js | 324 + .../parse5/dist/serializer/index.d.ts | 74 + node_modules/parse5/dist/serializer/index.js | 180 + node_modules/parse5/dist/tokenizer/index.d.ts | 261 + node_modules/parse5/dist/tokenizer/index.js | 2916 +++ .../parse5/dist/tokenizer/preprocessor.d.ts | 50 + .../parse5/dist/tokenizer/preprocessor.js | 207 + .../parse5/dist/tree-adapters/default.d.ts | 98 + .../parse5/dist/tree-adapters/default.js | 186 + .../parse5/dist/tree-adapters/interface.d.ts | 263 + .../parse5/dist/tree-adapters/interface.js | 14 + node_modules/parse5/package.json | 50 + package-lock.json | 362 + package.json | 5 + pipeline/pom.xml | 2 +- pom.xml | 2 +- projection/pom.xml | 2 +- provider/analytics-standard/pom.xml | 2 +- provider/appinfo-standard/pom.xml | 2 +- provider/application-standard/pom.xml | 2 +- provider/autoclose-standard/pom.xml | 2 +- provider/builder-standard/pom.xml | 2 +- provider/criteria-standard/pom.xml | 2 +- provider/interopoptimizer-standard/pom.xml | 2 +- provider/merger-standard/pom.xml | 2 +- provider/pipeline-standard/pom.xml | 2 +- provider/pom.xml | 2 +- provider/renderer-standard/pom.xml | 2 +- provider/streamconfiguration-standard/pom.xml | 2 +- provider/termopmodifier-standard/pom.xml | 2 +- provider/termopoptimizer-standard/pom.xml | 2 +- renderer/pom.xml | 2 +- rootfactory/pom.xml | 2 +- streamconfiguration/pom.xml | 2 +- termopmodifier/pom.xml | 2 +- termopoptimizer/pom.xml | 2 +- 734 files changed, 94433 insertions(+), 46 deletions(-) create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/antora-lunr/LICENSE create mode 100644 node_modules/antora-lunr/README.md create mode 100644 node_modules/antora-lunr/lib/generate-index.js create mode 100644 node_modules/antora-lunr/lib/index.js create mode 100644 node_modules/antora-lunr/package.json create mode 100644 node_modules/antora-lunr/supplemental_ui/css/search.css create mode 100644 node_modules/antora-lunr/supplemental_ui/js/vendor/lunr.js create mode 100644 node_modules/antora-lunr/supplemental_ui/js/vendor/search.js create mode 100644 node_modules/antora-lunr/supplemental_ui/partials/footer-scripts.hbs create mode 100644 node_modules/antora-lunr/supplemental_ui/partials/head-meta.hbs create mode 100644 node_modules/antora-lunr/supplemental_ui/partials/header-content.hbs create mode 100644 node_modules/boolbase/README.md create mode 100644 node_modules/boolbase/index.js create mode 100644 node_modules/boolbase/package.json create mode 100644 node_modules/cheerio-select/LICENSE create mode 100644 node_modules/cheerio-select/README.md create mode 100644 node_modules/cheerio-select/lib/esm/helpers.d.ts create mode 100644 node_modules/cheerio-select/lib/esm/helpers.d.ts.map create mode 100644 node_modules/cheerio-select/lib/esm/helpers.js create mode 100644 node_modules/cheerio-select/lib/esm/helpers.js.map create mode 100644 node_modules/cheerio-select/lib/esm/index.d.ts create mode 100644 node_modules/cheerio-select/lib/esm/index.d.ts.map create mode 100644 node_modules/cheerio-select/lib/esm/index.js create mode 100644 node_modules/cheerio-select/lib/esm/index.js.map create mode 100644 node_modules/cheerio-select/lib/esm/package.json create mode 100644 node_modules/cheerio-select/lib/esm/positionals.d.ts create mode 100644 node_modules/cheerio-select/lib/esm/positionals.d.ts.map create mode 100644 node_modules/cheerio-select/lib/esm/positionals.js create mode 100644 node_modules/cheerio-select/lib/esm/positionals.js.map create mode 100644 node_modules/cheerio-select/lib/helpers.d.ts create mode 100644 node_modules/cheerio-select/lib/helpers.d.ts.map create mode 100644 node_modules/cheerio-select/lib/helpers.js create mode 100644 node_modules/cheerio-select/lib/helpers.js.map create mode 100644 node_modules/cheerio-select/lib/index.d.ts create mode 100644 node_modules/cheerio-select/lib/index.d.ts.map create mode 100644 node_modules/cheerio-select/lib/index.js create mode 100644 node_modules/cheerio-select/lib/index.js.map create mode 100644 node_modules/cheerio-select/lib/positionals.d.ts create mode 100644 node_modules/cheerio-select/lib/positionals.d.ts.map create mode 100644 node_modules/cheerio-select/lib/positionals.js create mode 100644 node_modules/cheerio-select/lib/positionals.js.map create mode 100644 node_modules/cheerio-select/package.json create mode 100644 node_modules/cheerio/LICENSE create mode 100644 node_modules/cheerio/Readme.md create mode 100644 node_modules/cheerio/lib/api/attributes.d.ts create mode 100644 node_modules/cheerio/lib/api/attributes.d.ts.map create mode 100644 node_modules/cheerio/lib/api/attributes.js create mode 100644 node_modules/cheerio/lib/api/attributes.js.map create mode 100644 node_modules/cheerio/lib/api/css.d.ts create mode 100644 node_modules/cheerio/lib/api/css.d.ts.map create mode 100644 node_modules/cheerio/lib/api/css.js create mode 100644 node_modules/cheerio/lib/api/css.js.map create mode 100644 node_modules/cheerio/lib/api/forms.d.ts create mode 100644 node_modules/cheerio/lib/api/forms.d.ts.map create mode 100644 node_modules/cheerio/lib/api/forms.js create mode 100644 node_modules/cheerio/lib/api/forms.js.map create mode 100644 node_modules/cheerio/lib/api/manipulation.d.ts create mode 100644 node_modules/cheerio/lib/api/manipulation.d.ts.map create mode 100644 node_modules/cheerio/lib/api/manipulation.js create mode 100644 node_modules/cheerio/lib/api/manipulation.js.map create mode 100644 node_modules/cheerio/lib/api/traversing.d.ts create mode 100644 node_modules/cheerio/lib/api/traversing.d.ts.map create mode 100644 node_modules/cheerio/lib/api/traversing.js create mode 100644 node_modules/cheerio/lib/api/traversing.js.map create mode 100644 node_modules/cheerio/lib/cheerio.d.ts create mode 100644 node_modules/cheerio/lib/cheerio.d.ts.map create mode 100644 node_modules/cheerio/lib/cheerio.js create mode 100644 node_modules/cheerio/lib/cheerio.js.map create mode 100644 node_modules/cheerio/lib/esm/api/attributes.d.ts create mode 100644 node_modules/cheerio/lib/esm/api/attributes.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/api/attributes.js create mode 100644 node_modules/cheerio/lib/esm/api/attributes.js.map create mode 100644 node_modules/cheerio/lib/esm/api/css.d.ts create mode 100644 node_modules/cheerio/lib/esm/api/css.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/api/css.js create mode 100644 node_modules/cheerio/lib/esm/api/css.js.map create mode 100644 node_modules/cheerio/lib/esm/api/forms.d.ts create mode 100644 node_modules/cheerio/lib/esm/api/forms.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/api/forms.js create mode 100644 node_modules/cheerio/lib/esm/api/forms.js.map create mode 100644 node_modules/cheerio/lib/esm/api/manipulation.d.ts create mode 100644 node_modules/cheerio/lib/esm/api/manipulation.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/api/manipulation.js create mode 100644 node_modules/cheerio/lib/esm/api/manipulation.js.map create mode 100644 node_modules/cheerio/lib/esm/api/traversing.d.ts create mode 100644 node_modules/cheerio/lib/esm/api/traversing.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/api/traversing.js create mode 100644 node_modules/cheerio/lib/esm/api/traversing.js.map create mode 100644 node_modules/cheerio/lib/esm/cheerio.d.ts create mode 100644 node_modules/cheerio/lib/esm/cheerio.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/cheerio.js create mode 100644 node_modules/cheerio/lib/esm/cheerio.js.map create mode 100644 node_modules/cheerio/lib/esm/index.d.ts create mode 100644 node_modules/cheerio/lib/esm/index.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/index.js create mode 100644 node_modules/cheerio/lib/esm/index.js.map create mode 100644 node_modules/cheerio/lib/esm/load.d.ts create mode 100644 node_modules/cheerio/lib/esm/load.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/load.js create mode 100644 node_modules/cheerio/lib/esm/load.js.map create mode 100644 node_modules/cheerio/lib/esm/options.d.ts create mode 100644 node_modules/cheerio/lib/esm/options.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/options.js create mode 100644 node_modules/cheerio/lib/esm/options.js.map create mode 100644 node_modules/cheerio/lib/esm/package.json create mode 100644 node_modules/cheerio/lib/esm/parse.d.ts create mode 100644 node_modules/cheerio/lib/esm/parse.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/parse.js create mode 100644 node_modules/cheerio/lib/esm/parse.js.map create mode 100644 node_modules/cheerio/lib/esm/parsers/parse5-adapter.d.ts create mode 100644 node_modules/cheerio/lib/esm/parsers/parse5-adapter.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/parsers/parse5-adapter.js create mode 100644 node_modules/cheerio/lib/esm/parsers/parse5-adapter.js.map create mode 100644 node_modules/cheerio/lib/esm/slim.d.ts create mode 100644 node_modules/cheerio/lib/esm/slim.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/slim.js create mode 100644 node_modules/cheerio/lib/esm/slim.js.map create mode 100644 node_modules/cheerio/lib/esm/static.d.ts create mode 100644 node_modules/cheerio/lib/esm/static.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/static.js create mode 100644 node_modules/cheerio/lib/esm/static.js.map create mode 100644 node_modules/cheerio/lib/esm/types.d.ts create mode 100644 node_modules/cheerio/lib/esm/types.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/types.js create mode 100644 node_modules/cheerio/lib/esm/types.js.map create mode 100644 node_modules/cheerio/lib/esm/utils.d.ts create mode 100644 node_modules/cheerio/lib/esm/utils.d.ts.map create mode 100644 node_modules/cheerio/lib/esm/utils.js create mode 100644 node_modules/cheerio/lib/esm/utils.js.map create mode 100644 node_modules/cheerio/lib/index.d.ts create mode 100644 node_modules/cheerio/lib/index.d.ts.map create mode 100644 node_modules/cheerio/lib/index.js create mode 100644 node_modules/cheerio/lib/index.js.map create mode 100644 node_modules/cheerio/lib/load.d.ts create mode 100644 node_modules/cheerio/lib/load.d.ts.map create mode 100644 node_modules/cheerio/lib/load.js create mode 100644 node_modules/cheerio/lib/load.js.map create mode 100644 node_modules/cheerio/lib/options.d.ts create mode 100644 node_modules/cheerio/lib/options.d.ts.map create mode 100644 node_modules/cheerio/lib/options.js create mode 100644 node_modules/cheerio/lib/options.js.map create mode 100644 node_modules/cheerio/lib/parse.d.ts create mode 100644 node_modules/cheerio/lib/parse.d.ts.map create mode 100644 node_modules/cheerio/lib/parse.js create mode 100644 node_modules/cheerio/lib/parse.js.map create mode 100644 node_modules/cheerio/lib/parsers/parse5-adapter.d.ts create mode 100644 node_modules/cheerio/lib/parsers/parse5-adapter.d.ts.map create mode 100644 node_modules/cheerio/lib/parsers/parse5-adapter.js create mode 100644 node_modules/cheerio/lib/parsers/parse5-adapter.js.map create mode 100644 node_modules/cheerio/lib/slim.d.ts create mode 100644 node_modules/cheerio/lib/slim.d.ts.map create mode 100644 node_modules/cheerio/lib/slim.js create mode 100644 node_modules/cheerio/lib/slim.js.map create mode 100644 node_modules/cheerio/lib/static.d.ts create mode 100644 node_modules/cheerio/lib/static.d.ts.map create mode 100644 node_modules/cheerio/lib/static.js create mode 100644 node_modules/cheerio/lib/static.js.map create mode 100644 node_modules/cheerio/lib/types.d.ts create mode 100644 node_modules/cheerio/lib/types.d.ts.map create mode 100644 node_modules/cheerio/lib/types.js create mode 100644 node_modules/cheerio/lib/types.js.map create mode 100644 node_modules/cheerio/lib/utils.d.ts create mode 100644 node_modules/cheerio/lib/utils.d.ts.map create mode 100644 node_modules/cheerio/lib/utils.js create mode 100644 node_modules/cheerio/lib/utils.js.map create mode 100644 node_modules/cheerio/package.json create mode 100644 node_modules/css-select/LICENSE create mode 100644 node_modules/css-select/README.md create mode 100644 node_modules/css-select/lib/attributes.d.ts create mode 100644 node_modules/css-select/lib/attributes.d.ts.map create mode 100644 node_modules/css-select/lib/attributes.js create mode 100644 node_modules/css-select/lib/attributes.js.map create mode 100644 node_modules/css-select/lib/compile.d.ts create mode 100644 node_modules/css-select/lib/compile.d.ts.map create mode 100644 node_modules/css-select/lib/compile.js create mode 100644 node_modules/css-select/lib/compile.js.map create mode 100644 node_modules/css-select/lib/esm/attributes.d.ts create mode 100644 node_modules/css-select/lib/esm/attributes.d.ts.map create mode 100644 node_modules/css-select/lib/esm/attributes.js create mode 100644 node_modules/css-select/lib/esm/attributes.js.map create mode 100644 node_modules/css-select/lib/esm/compile.d.ts create mode 100644 node_modules/css-select/lib/esm/compile.d.ts.map create mode 100644 node_modules/css-select/lib/esm/compile.js create mode 100644 node_modules/css-select/lib/esm/compile.js.map create mode 100644 node_modules/css-select/lib/esm/general.d.ts create mode 100644 node_modules/css-select/lib/esm/general.d.ts.map create mode 100644 node_modules/css-select/lib/esm/general.js create mode 100644 node_modules/css-select/lib/esm/general.js.map create mode 100644 node_modules/css-select/lib/esm/index.d.ts create mode 100644 node_modules/css-select/lib/esm/index.d.ts.map create mode 100644 node_modules/css-select/lib/esm/index.js create mode 100644 node_modules/css-select/lib/esm/index.js.map create mode 100644 node_modules/css-select/lib/esm/package.json create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.js create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.js create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.js create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.js.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.js create mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map create mode 100644 node_modules/css-select/lib/esm/sort.d.ts create mode 100644 node_modules/css-select/lib/esm/sort.d.ts.map create mode 100644 node_modules/css-select/lib/esm/sort.js create mode 100644 node_modules/css-select/lib/esm/sort.js.map create mode 100644 node_modules/css-select/lib/esm/types.d.ts create mode 100644 node_modules/css-select/lib/esm/types.d.ts.map create mode 100644 node_modules/css-select/lib/esm/types.js create mode 100644 node_modules/css-select/lib/esm/types.js.map create mode 100644 node_modules/css-select/lib/general.d.ts create mode 100644 node_modules/css-select/lib/general.d.ts.map create mode 100644 node_modules/css-select/lib/general.js create mode 100644 node_modules/css-select/lib/general.js.map create mode 100644 node_modules/css-select/lib/index.d.ts create mode 100644 node_modules/css-select/lib/index.d.ts.map create mode 100644 node_modules/css-select/lib/index.js create mode 100644 node_modules/css-select/lib/index.js.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.d.ts create mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.js create mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.js.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.d.ts create mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.js create mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.js.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/index.d.ts create mode 100644 node_modules/css-select/lib/pseudo-selectors/index.d.ts.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/index.js create mode 100644 node_modules/css-select/lib/pseudo-selectors/index.js.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts create mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.js create mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.js.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.d.ts create mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map create mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.js create mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.js.map create mode 100644 node_modules/css-select/lib/sort.d.ts create mode 100644 node_modules/css-select/lib/sort.d.ts.map create mode 100644 node_modules/css-select/lib/sort.js create mode 100644 node_modules/css-select/lib/sort.js.map create mode 100644 node_modules/css-select/lib/types.d.ts create mode 100644 node_modules/css-select/lib/types.d.ts.map create mode 100644 node_modules/css-select/lib/types.js create mode 100644 node_modules/css-select/lib/types.js.map create mode 100644 node_modules/css-select/package.json create mode 100644 node_modules/css-what/LICENSE create mode 100644 node_modules/css-what/lib/commonjs/index.d.ts create mode 100644 node_modules/css-what/lib/commonjs/index.d.ts.map create mode 100644 node_modules/css-what/lib/commonjs/index.js create mode 100644 node_modules/css-what/lib/commonjs/parse.d.ts create mode 100644 node_modules/css-what/lib/commonjs/parse.d.ts.map create mode 100644 node_modules/css-what/lib/commonjs/parse.js create mode 100644 node_modules/css-what/lib/commonjs/stringify.d.ts create mode 100644 node_modules/css-what/lib/commonjs/stringify.d.ts.map create mode 100644 node_modules/css-what/lib/commonjs/stringify.js create mode 100644 node_modules/css-what/lib/commonjs/types.d.ts create mode 100644 node_modules/css-what/lib/commonjs/types.d.ts.map create mode 100644 node_modules/css-what/lib/commonjs/types.js create mode 100644 node_modules/css-what/lib/es/index.d.ts create mode 100644 node_modules/css-what/lib/es/index.d.ts.map create mode 100644 node_modules/css-what/lib/es/index.js create mode 100644 node_modules/css-what/lib/es/parse.d.ts create mode 100644 node_modules/css-what/lib/es/parse.d.ts.map create mode 100644 node_modules/css-what/lib/es/parse.js create mode 100644 node_modules/css-what/lib/es/stringify.d.ts create mode 100644 node_modules/css-what/lib/es/stringify.d.ts.map create mode 100644 node_modules/css-what/lib/es/stringify.js create mode 100644 node_modules/css-what/lib/es/types.d.ts create mode 100644 node_modules/css-what/lib/es/types.d.ts.map create mode 100644 node_modules/css-what/lib/es/types.js create mode 100644 node_modules/css-what/package.json create mode 100644 node_modules/css-what/readme.md create mode 100644 node_modules/dom-serializer/LICENSE create mode 100644 node_modules/dom-serializer/README.md create mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.d.ts create mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map create mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.js create mode 100644 node_modules/dom-serializer/lib/esm/index.d.ts create mode 100644 node_modules/dom-serializer/lib/esm/index.d.ts.map create mode 100644 node_modules/dom-serializer/lib/esm/index.js create mode 100644 node_modules/dom-serializer/lib/esm/package.json create mode 100644 node_modules/dom-serializer/lib/foreignNames.d.ts create mode 100644 node_modules/dom-serializer/lib/foreignNames.d.ts.map create mode 100644 node_modules/dom-serializer/lib/foreignNames.js create mode 100644 node_modules/dom-serializer/lib/index.d.ts create mode 100644 node_modules/dom-serializer/lib/index.d.ts.map create mode 100644 node_modules/dom-serializer/lib/index.js create mode 100644 node_modules/dom-serializer/package.json create mode 100644 node_modules/domelementtype/LICENSE create mode 100644 node_modules/domelementtype/lib/esm/index.d.ts create mode 100644 node_modules/domelementtype/lib/esm/index.d.ts.map create mode 100644 node_modules/domelementtype/lib/esm/index.js create mode 100644 node_modules/domelementtype/lib/esm/package.json create mode 100644 node_modules/domelementtype/lib/index.d.ts create mode 100644 node_modules/domelementtype/lib/index.d.ts.map create mode 100644 node_modules/domelementtype/lib/index.js create mode 100644 node_modules/domelementtype/package.json create mode 100644 node_modules/domelementtype/readme.md create mode 100644 node_modules/domhandler/LICENSE create mode 100644 node_modules/domhandler/lib/esm/index.d.ts create mode 100644 node_modules/domhandler/lib/esm/index.d.ts.map create mode 100644 node_modules/domhandler/lib/esm/index.js create mode 100644 node_modules/domhandler/lib/esm/node.d.ts create mode 100644 node_modules/domhandler/lib/esm/node.d.ts.map create mode 100644 node_modules/domhandler/lib/esm/node.js create mode 100644 node_modules/domhandler/lib/esm/package.json create mode 100644 node_modules/domhandler/lib/index.d.ts create mode 100644 node_modules/domhandler/lib/index.d.ts.map create mode 100644 node_modules/domhandler/lib/index.js create mode 100644 node_modules/domhandler/lib/node.d.ts create mode 100644 node_modules/domhandler/lib/node.d.ts.map create mode 100644 node_modules/domhandler/lib/node.js create mode 100644 node_modules/domhandler/package.json create mode 100644 node_modules/domhandler/readme.md create mode 100644 node_modules/domutils/LICENSE create mode 100644 node_modules/domutils/lib/esm/feeds.d.ts create mode 100644 node_modules/domutils/lib/esm/feeds.d.ts.map create mode 100644 node_modules/domutils/lib/esm/feeds.js create mode 100644 node_modules/domutils/lib/esm/feeds.js.map create mode 100644 node_modules/domutils/lib/esm/helpers.d.ts create mode 100644 node_modules/domutils/lib/esm/helpers.d.ts.map create mode 100644 node_modules/domutils/lib/esm/helpers.js create mode 100644 node_modules/domutils/lib/esm/helpers.js.map create mode 100644 node_modules/domutils/lib/esm/index.d.ts create mode 100644 node_modules/domutils/lib/esm/index.d.ts.map create mode 100644 node_modules/domutils/lib/esm/index.js create mode 100644 node_modules/domutils/lib/esm/index.js.map create mode 100644 node_modules/domutils/lib/esm/legacy.d.ts create mode 100644 node_modules/domutils/lib/esm/legacy.d.ts.map create mode 100644 node_modules/domutils/lib/esm/legacy.js create mode 100644 node_modules/domutils/lib/esm/legacy.js.map create mode 100644 node_modules/domutils/lib/esm/manipulation.d.ts create mode 100644 node_modules/domutils/lib/esm/manipulation.d.ts.map create mode 100644 node_modules/domutils/lib/esm/manipulation.js create mode 100644 node_modules/domutils/lib/esm/manipulation.js.map create mode 100644 node_modules/domutils/lib/esm/package.json create mode 100644 node_modules/domutils/lib/esm/querying.d.ts create mode 100644 node_modules/domutils/lib/esm/querying.d.ts.map create mode 100644 node_modules/domutils/lib/esm/querying.js create mode 100644 node_modules/domutils/lib/esm/querying.js.map create mode 100644 node_modules/domutils/lib/esm/stringify.d.ts create mode 100644 node_modules/domutils/lib/esm/stringify.d.ts.map create mode 100644 node_modules/domutils/lib/esm/stringify.js create mode 100644 node_modules/domutils/lib/esm/stringify.js.map create mode 100644 node_modules/domutils/lib/esm/traversal.d.ts create mode 100644 node_modules/domutils/lib/esm/traversal.d.ts.map create mode 100644 node_modules/domutils/lib/esm/traversal.js create mode 100644 node_modules/domutils/lib/esm/traversal.js.map create mode 100644 node_modules/domutils/lib/feeds.d.ts create mode 100644 node_modules/domutils/lib/feeds.d.ts.map create mode 100644 node_modules/domutils/lib/feeds.js create mode 100644 node_modules/domutils/lib/feeds.js.map create mode 100644 node_modules/domutils/lib/helpers.d.ts create mode 100644 node_modules/domutils/lib/helpers.d.ts.map create mode 100644 node_modules/domutils/lib/helpers.js create mode 100644 node_modules/domutils/lib/helpers.js.map create mode 100644 node_modules/domutils/lib/index.d.ts create mode 100644 node_modules/domutils/lib/index.d.ts.map create mode 100644 node_modules/domutils/lib/index.js create mode 100644 node_modules/domutils/lib/index.js.map create mode 100644 node_modules/domutils/lib/legacy.d.ts create mode 100644 node_modules/domutils/lib/legacy.d.ts.map create mode 100644 node_modules/domutils/lib/legacy.js create mode 100644 node_modules/domutils/lib/legacy.js.map create mode 100644 node_modules/domutils/lib/manipulation.d.ts create mode 100644 node_modules/domutils/lib/manipulation.d.ts.map create mode 100644 node_modules/domutils/lib/manipulation.js create mode 100644 node_modules/domutils/lib/manipulation.js.map create mode 100644 node_modules/domutils/lib/querying.d.ts create mode 100644 node_modules/domutils/lib/querying.d.ts.map create mode 100644 node_modules/domutils/lib/querying.js create mode 100644 node_modules/domutils/lib/querying.js.map create mode 100644 node_modules/domutils/lib/stringify.d.ts create mode 100644 node_modules/domutils/lib/stringify.d.ts.map create mode 100644 node_modules/domutils/lib/stringify.js create mode 100644 node_modules/domutils/lib/stringify.js.map create mode 100644 node_modules/domutils/lib/traversal.d.ts create mode 100644 node_modules/domutils/lib/traversal.d.ts.map create mode 100644 node_modules/domutils/lib/traversal.js create mode 100644 node_modules/domutils/lib/traversal.js.map create mode 100644 node_modules/domutils/package.json create mode 100644 node_modules/domutils/readme.md create mode 100644 node_modules/entities/LICENSE create mode 100644 node_modules/entities/lib/decode.d.ts create mode 100644 node_modules/entities/lib/decode.d.ts.map create mode 100644 node_modules/entities/lib/decode.js create mode 100644 node_modules/entities/lib/decode.js.map create mode 100644 node_modules/entities/lib/decode_codepoint.d.ts create mode 100644 node_modules/entities/lib/decode_codepoint.d.ts.map create mode 100644 node_modules/entities/lib/decode_codepoint.js create mode 100644 node_modules/entities/lib/decode_codepoint.js.map create mode 100644 node_modules/entities/lib/encode.d.ts create mode 100644 node_modules/entities/lib/encode.d.ts.map create mode 100644 node_modules/entities/lib/encode.js create mode 100644 node_modules/entities/lib/encode.js.map create mode 100644 node_modules/entities/lib/escape.d.ts create mode 100644 node_modules/entities/lib/escape.d.ts.map create mode 100644 node_modules/entities/lib/escape.js create mode 100644 node_modules/entities/lib/escape.js.map create mode 100644 node_modules/entities/lib/esm/decode.d.ts create mode 100644 node_modules/entities/lib/esm/decode.d.ts.map create mode 100644 node_modules/entities/lib/esm/decode.js create mode 100644 node_modules/entities/lib/esm/decode.js.map create mode 100644 node_modules/entities/lib/esm/decode_codepoint.d.ts create mode 100644 node_modules/entities/lib/esm/decode_codepoint.d.ts.map create mode 100644 node_modules/entities/lib/esm/decode_codepoint.js create mode 100644 node_modules/entities/lib/esm/decode_codepoint.js.map create mode 100644 node_modules/entities/lib/esm/encode.d.ts create mode 100644 node_modules/entities/lib/esm/encode.d.ts.map create mode 100644 node_modules/entities/lib/esm/encode.js create mode 100644 node_modules/entities/lib/esm/encode.js.map create mode 100644 node_modules/entities/lib/esm/escape.d.ts create mode 100644 node_modules/entities/lib/esm/escape.d.ts.map create mode 100644 node_modules/entities/lib/esm/escape.js create mode 100644 node_modules/entities/lib/esm/escape.js.map create mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.d.ts create mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map create mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.js create mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.js.map create mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.d.ts create mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map create mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.js create mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.js.map create mode 100644 node_modules/entities/lib/esm/generated/encode-html.d.ts create mode 100644 node_modules/entities/lib/esm/generated/encode-html.d.ts.map create mode 100644 node_modules/entities/lib/esm/generated/encode-html.js create mode 100644 node_modules/entities/lib/esm/generated/encode-html.js.map create mode 100644 node_modules/entities/lib/esm/index.d.ts create mode 100644 node_modules/entities/lib/esm/index.d.ts.map create mode 100644 node_modules/entities/lib/esm/index.js create mode 100644 node_modules/entities/lib/esm/index.js.map create mode 100644 node_modules/entities/lib/esm/package.json create mode 100644 node_modules/entities/lib/generated/decode-data-html.d.ts create mode 100644 node_modules/entities/lib/generated/decode-data-html.d.ts.map create mode 100644 node_modules/entities/lib/generated/decode-data-html.js create mode 100644 node_modules/entities/lib/generated/decode-data-html.js.map create mode 100644 node_modules/entities/lib/generated/decode-data-xml.d.ts create mode 100644 node_modules/entities/lib/generated/decode-data-xml.d.ts.map create mode 100644 node_modules/entities/lib/generated/decode-data-xml.js create mode 100644 node_modules/entities/lib/generated/decode-data-xml.js.map create mode 100644 node_modules/entities/lib/generated/encode-html.d.ts create mode 100644 node_modules/entities/lib/generated/encode-html.d.ts.map create mode 100644 node_modules/entities/lib/generated/encode-html.js create mode 100644 node_modules/entities/lib/generated/encode-html.js.map create mode 100644 node_modules/entities/lib/index.d.ts create mode 100644 node_modules/entities/lib/index.d.ts.map create mode 100644 node_modules/entities/lib/index.js create mode 100644 node_modules/entities/lib/index.js.map create mode 100644 node_modules/entities/package.json create mode 100644 node_modules/entities/readme.md create mode 100644 node_modules/html-entities/LICENSE create mode 100644 node_modules/html-entities/README.md create mode 100644 node_modules/html-entities/lib/html4-entities.d.ts create mode 100644 node_modules/html-entities/lib/html4-entities.js create mode 100644 node_modules/html-entities/lib/html5-entities.d.ts create mode 100644 node_modules/html-entities/lib/html5-entities.js create mode 100644 node_modules/html-entities/lib/index.d.ts create mode 100644 node_modules/html-entities/lib/index.js create mode 100644 node_modules/html-entities/lib/surrogate-pairs.d.ts create mode 100644 node_modules/html-entities/lib/surrogate-pairs.js create mode 100644 node_modules/html-entities/lib/xml-entities.d.ts create mode 100644 node_modules/html-entities/lib/xml-entities.js create mode 100644 node_modules/html-entities/package.json create mode 100644 node_modules/htmlparser2/LICENSE create mode 100644 node_modules/htmlparser2/README.md create mode 100644 node_modules/htmlparser2/lib/Parser.d.ts create mode 100644 node_modules/htmlparser2/lib/Parser.d.ts.map create mode 100644 node_modules/htmlparser2/lib/Parser.js create mode 100644 node_modules/htmlparser2/lib/Parser.js.map create mode 100644 node_modules/htmlparser2/lib/Tokenizer.d.ts create mode 100644 node_modules/htmlparser2/lib/Tokenizer.d.ts.map create mode 100644 node_modules/htmlparser2/lib/Tokenizer.js create mode 100644 node_modules/htmlparser2/lib/Tokenizer.js.map create mode 100644 node_modules/htmlparser2/lib/WritableStream.d.ts create mode 100644 node_modules/htmlparser2/lib/WritableStream.d.ts.map create mode 100644 node_modules/htmlparser2/lib/WritableStream.js create mode 100644 node_modules/htmlparser2/lib/WritableStream.js.map create mode 100644 node_modules/htmlparser2/lib/esm/Parser.d.ts create mode 100644 node_modules/htmlparser2/lib/esm/Parser.d.ts.map create mode 100644 node_modules/htmlparser2/lib/esm/Parser.js create mode 100644 node_modules/htmlparser2/lib/esm/Parser.js.map create mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.d.ts create mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.d.ts.map create mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.js create mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.js.map create mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.d.ts create mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.d.ts.map create mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.js create mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.js.map create mode 100644 node_modules/htmlparser2/lib/esm/index.d.ts create mode 100644 node_modules/htmlparser2/lib/esm/index.d.ts.map create mode 100644 node_modules/htmlparser2/lib/esm/index.js create mode 100644 node_modules/htmlparser2/lib/esm/index.js.map create mode 100644 node_modules/htmlparser2/lib/esm/package.json create mode 100644 node_modules/htmlparser2/lib/index.d.ts create mode 100644 node_modules/htmlparser2/lib/index.d.ts.map create mode 100644 node_modules/htmlparser2/lib/index.js create mode 100644 node_modules/htmlparser2/lib/index.js.map create mode 100644 node_modules/htmlparser2/package.json create mode 100644 node_modules/lunr/.eslintrc.json create mode 100644 node_modules/lunr/.npmignore create mode 100644 node_modules/lunr/.travis.yml create mode 100644 node_modules/lunr/CHANGELOG.md create mode 100644 node_modules/lunr/CNAME create mode 100644 node_modules/lunr/CONTRIBUTING.md create mode 100644 node_modules/lunr/LICENSE create mode 100644 node_modules/lunr/Makefile create mode 100644 node_modules/lunr/README.md create mode 100644 node_modules/lunr/VERSION create mode 100644 node_modules/lunr/bower.json create mode 100644 node_modules/lunr/component.json create mode 100644 node_modules/lunr/index.html create mode 100644 node_modules/lunr/lib/builder.js create mode 100644 node_modules/lunr/lib/field_ref.js create mode 100644 node_modules/lunr/lib/idf.js create mode 100644 node_modules/lunr/lib/index.js create mode 100644 node_modules/lunr/lib/lunr.js create mode 100644 node_modules/lunr/lib/match_data.js create mode 100644 node_modules/lunr/lib/pipeline.js create mode 100644 node_modules/lunr/lib/query.js create mode 100644 node_modules/lunr/lib/query_lexer.js create mode 100644 node_modules/lunr/lib/query_parse_error.js create mode 100644 node_modules/lunr/lib/query_parser.js create mode 100644 node_modules/lunr/lib/set.js create mode 100644 node_modules/lunr/lib/stemmer.js create mode 100644 node_modules/lunr/lib/stop_word_filter.js create mode 100644 node_modules/lunr/lib/token.js create mode 100644 node_modules/lunr/lib/token_set.js create mode 100644 node_modules/lunr/lib/token_set_builder.js create mode 100644 node_modules/lunr/lib/tokenizer.js create mode 100644 node_modules/lunr/lib/trimmer.js create mode 100644 node_modules/lunr/lib/utils.js create mode 100644 node_modules/lunr/lib/vector.js create mode 100644 node_modules/lunr/lunr.js create mode 100644 node_modules/lunr/lunr.min.js create mode 100644 node_modules/lunr/notes create mode 100644 node_modules/lunr/package.json create mode 100644 node_modules/lunr/perf/builder_perf.js create mode 100644 node_modules/lunr/perf/perf_helper.js create mode 100644 node_modules/lunr/perf/pipeline_perf.js create mode 100644 node_modules/lunr/perf/query_parser_perf.js create mode 100644 node_modules/lunr/perf/search_perf.js create mode 100644 node_modules/lunr/perf/stemmer_perf.js create mode 100644 node_modules/lunr/perf/token_set_perf.js create mode 100644 node_modules/lunr/perf/tokenizer_perf.js create mode 100644 node_modules/lunr/perf/vector_perf.js create mode 100644 node_modules/lunr/styles.css create mode 100644 node_modules/lunr/test/builder_test.js create mode 100644 node_modules/lunr/test/env/chai.js create mode 100644 node_modules/lunr/test/env/index.mustache create mode 100644 node_modules/lunr/test/env/mocha.css create mode 100644 node_modules/lunr/test/env/mocha.js create mode 100644 node_modules/lunr/test/field_ref_test.js create mode 100644 node_modules/lunr/test/fixtures/stemming_vocab.json create mode 100644 node_modules/lunr/test/index.html create mode 100644 node_modules/lunr/test/match_data_test.js create mode 100644 node_modules/lunr/test/pipeline_test.js create mode 100644 node_modules/lunr/test/query_lexer_test.js create mode 100644 node_modules/lunr/test/query_parser_test.js create mode 100644 node_modules/lunr/test/query_test.js create mode 100644 node_modules/lunr/test/search_test.js create mode 100644 node_modules/lunr/test/serialization_test.js create mode 100644 node_modules/lunr/test/set_test.js create mode 100644 node_modules/lunr/test/stemmer_test.js create mode 100644 node_modules/lunr/test/stop_word_filter_test.js create mode 100644 node_modules/lunr/test/test_helper.js create mode 100644 node_modules/lunr/test/token_set_test.js create mode 100644 node_modules/lunr/test/token_test.js create mode 100644 node_modules/lunr/test/tokenizer_test.js create mode 100644 node_modules/lunr/test/trimmer_test.js create mode 100644 node_modules/lunr/test/utils_test.js create mode 100644 node_modules/lunr/test/vector_test.js create mode 100644 node_modules/nth-check/LICENSE create mode 100644 node_modules/nth-check/README.md create mode 100644 node_modules/nth-check/lib/compile.d.ts create mode 100644 node_modules/nth-check/lib/compile.d.ts.map create mode 100644 node_modules/nth-check/lib/compile.js create mode 100644 node_modules/nth-check/lib/compile.js.map create mode 100644 node_modules/nth-check/lib/esm/compile.d.ts create mode 100644 node_modules/nth-check/lib/esm/compile.d.ts.map create mode 100644 node_modules/nth-check/lib/esm/compile.js create mode 100644 node_modules/nth-check/lib/esm/compile.js.map create mode 100644 node_modules/nth-check/lib/esm/index.d.ts create mode 100644 node_modules/nth-check/lib/esm/index.d.ts.map create mode 100644 node_modules/nth-check/lib/esm/index.js create mode 100644 node_modules/nth-check/lib/esm/index.js.map create mode 100644 node_modules/nth-check/lib/esm/package.json create mode 100644 node_modules/nth-check/lib/esm/parse.d.ts create mode 100644 node_modules/nth-check/lib/esm/parse.d.ts.map create mode 100644 node_modules/nth-check/lib/esm/parse.js create mode 100644 node_modules/nth-check/lib/esm/parse.js.map create mode 100644 node_modules/nth-check/lib/index.d.ts create mode 100644 node_modules/nth-check/lib/index.d.ts.map create mode 100644 node_modules/nth-check/lib/index.js create mode 100644 node_modules/nth-check/lib/index.js.map create mode 100644 node_modules/nth-check/lib/parse.d.ts create mode 100644 node_modules/nth-check/lib/parse.d.ts.map create mode 100644 node_modules/nth-check/lib/parse.js create mode 100644 node_modules/nth-check/lib/parse.js.map create mode 100644 node_modules/nth-check/package.json create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/LICENSE create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/README.md create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/index.js create mode 100644 node_modules/parse5-htmlparser2-tree-adapter/package.json create mode 100644 node_modules/parse5/LICENSE create mode 100644 node_modules/parse5/README.md create mode 100644 node_modules/parse5/dist/cjs/common/doctype.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/doctype.js create mode 100644 node_modules/parse5/dist/cjs/common/error-codes.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/error-codes.js create mode 100644 node_modules/parse5/dist/cjs/common/foreign-content.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/foreign-content.js create mode 100644 node_modules/parse5/dist/cjs/common/html.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/html.js create mode 100644 node_modules/parse5/dist/cjs/common/token.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/token.js create mode 100644 node_modules/parse5/dist/cjs/common/unicode.d.ts create mode 100644 node_modules/parse5/dist/cjs/common/unicode.js create mode 100644 node_modules/parse5/dist/cjs/index.d.ts create mode 100644 node_modules/parse5/dist/cjs/index.js create mode 100644 node_modules/parse5/dist/cjs/package.json create mode 100644 node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts create mode 100644 node_modules/parse5/dist/cjs/parser/formatting-element-list.js create mode 100644 node_modules/parse5/dist/cjs/parser/index.d.ts create mode 100644 node_modules/parse5/dist/cjs/parser/index.js create mode 100644 node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts create mode 100644 node_modules/parse5/dist/cjs/parser/open-element-stack.js create mode 100644 node_modules/parse5/dist/cjs/serializer/index.d.ts create mode 100644 node_modules/parse5/dist/cjs/serializer/index.js create mode 100644 node_modules/parse5/dist/cjs/tokenizer/index.d.ts create mode 100644 node_modules/parse5/dist/cjs/tokenizer/index.js create mode 100644 node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts create mode 100644 node_modules/parse5/dist/cjs/tokenizer/preprocessor.js create mode 100644 node_modules/parse5/dist/cjs/tree-adapters/default.d.ts create mode 100644 node_modules/parse5/dist/cjs/tree-adapters/default.js create mode 100644 node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts create mode 100644 node_modules/parse5/dist/cjs/tree-adapters/interface.js create mode 100644 node_modules/parse5/dist/common/doctype.d.ts create mode 100644 node_modules/parse5/dist/common/doctype.js create mode 100644 node_modules/parse5/dist/common/error-codes.d.ts create mode 100644 node_modules/parse5/dist/common/error-codes.js create mode 100644 node_modules/parse5/dist/common/foreign-content.d.ts create mode 100644 node_modules/parse5/dist/common/foreign-content.js create mode 100644 node_modules/parse5/dist/common/html.d.ts create mode 100644 node_modules/parse5/dist/common/html.js create mode 100644 node_modules/parse5/dist/common/token.d.ts create mode 100644 node_modules/parse5/dist/common/token.js create mode 100644 node_modules/parse5/dist/common/unicode.d.ts create mode 100644 node_modules/parse5/dist/common/unicode.js create mode 100644 node_modules/parse5/dist/index.d.ts create mode 100644 node_modules/parse5/dist/index.js create mode 100644 node_modules/parse5/dist/parser/formatting-element-list.d.ts create mode 100644 node_modules/parse5/dist/parser/formatting-element-list.js create mode 100644 node_modules/parse5/dist/parser/index.d.ts create mode 100644 node_modules/parse5/dist/parser/index.js create mode 100644 node_modules/parse5/dist/parser/open-element-stack.d.ts create mode 100644 node_modules/parse5/dist/parser/open-element-stack.js create mode 100644 node_modules/parse5/dist/serializer/index.d.ts create mode 100644 node_modules/parse5/dist/serializer/index.js create mode 100644 node_modules/parse5/dist/tokenizer/index.d.ts create mode 100644 node_modules/parse5/dist/tokenizer/index.js create mode 100644 node_modules/parse5/dist/tokenizer/preprocessor.d.ts create mode 100644 node_modules/parse5/dist/tokenizer/preprocessor.js create mode 100644 node_modules/parse5/dist/tree-adapters/default.d.ts create mode 100644 node_modules/parse5/dist/tree-adapters/default.js create mode 100644 node_modules/parse5/dist/tree-adapters/interface.d.ts create mode 100644 node_modules/parse5/dist/tree-adapters/interface.js create mode 100644 node_modules/parse5/package.json create mode 100644 package-lock.json create mode 100644 package.json diff --git a/analytics/pom.xml b/analytics/pom.xml index 369b13e3..e9e22850 100644 --- a/analytics/pom.xml +++ b/analytics/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/announcer/pom.xml b/announcer/pom.xml index 38819657..c0bdbb99 100644 --- a/announcer/pom.xml +++ b/announcer/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/appinfo/pom.xml b/appinfo/pom.xml index 00684f05..ee89e0d1 100644 --- a/appinfo/pom.xml +++ b/appinfo/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/application/pom.xml b/application/pom.xml index 9e954fcd..57da6fce 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/autoclose/pom.xml b/autoclose/pom.xml index 0dbefc6c..527643ad 100644 --- a/autoclose/pom.xml +++ b/autoclose/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/builder/pom.xml b/builder/pom.xml index 9d62fea9..7aaf0d41 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/core/pom.xml b/core/pom.xml index 68751b8c..7ddfaf1b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/criteria/pom.xml b/criteria/pom.xml index e7e13761..d8a2a0e7 100644 --- a/criteria/pom.xml +++ b/criteria/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/docs/antora.yml b/docs/antora.yml index 20b160d1..12fa15da 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -13,7 +13,7 @@ name: jpa-streamer title: JPAStreamer Docs -version: 1.1.3-SNAPSHOT +version: 1.1.3 start_page: introduction:introduction.adoc nav: - modules/ROOT/nav.adoc diff --git a/exception/pom.xml b/exception/pom.xml index d2d5e0e2..49caf4ab 100644 --- a/exception/pom.xml +++ b/exception/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/field/pom.xml b/field/pom.xml index c6492d51..a37d35ba 100644 --- a/field/pom.xml +++ b/field/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/fieldgenerator/fieldgenerator-component/pom.xml b/fieldgenerator/fieldgenerator-component/pom.xml index 71e2f438..a5dc2a67 100644 --- a/fieldgenerator/fieldgenerator-component/pom.xml +++ b/fieldgenerator/fieldgenerator-component/pom.xml @@ -19,7 +19,7 @@ fieldgenerator com.speedment.jpastreamer - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/fieldgenerator/fieldgenerator-standard/pom.xml b/fieldgenerator/fieldgenerator-standard/pom.xml index 07a55251..235e5768 100644 --- a/fieldgenerator/fieldgenerator-standard/pom.xml +++ b/fieldgenerator/fieldgenerator-standard/pom.xml @@ -19,7 +19,7 @@ fieldgenerator com.speedment.jpastreamer - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/fieldgenerator/fieldgenerator-test-package/pom.xml b/fieldgenerator/fieldgenerator-test-package/pom.xml index be1ca206..7fe1eba0 100644 --- a/fieldgenerator/fieldgenerator-test-package/pom.xml +++ b/fieldgenerator/fieldgenerator-test-package/pom.xml @@ -19,7 +19,7 @@ fieldgenerator com.speedment.jpastreamer - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/fieldgenerator/fieldgenerator-test/pom.xml b/fieldgenerator/fieldgenerator-test/pom.xml index 73696107..f25943ce 100644 --- a/fieldgenerator/fieldgenerator-test/pom.xml +++ b/fieldgenerator/fieldgenerator-test/pom.xml @@ -19,7 +19,7 @@ fieldgenerator com.speedment.jpastreamer - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/fieldgenerator/pom.xml b/fieldgenerator/pom.xml index dc9c1de9..c6fc7938 100644 --- a/fieldgenerator/pom.xml +++ b/fieldgenerator/pom.xml @@ -19,7 +19,7 @@ jpastreamer-parent com.speedment.jpastreamer - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/integration/cdi/cdi-jpastreamer/pom.xml b/integration/cdi/cdi-jpastreamer/pom.xml index 7f03f9bc..f5a7f19c 100644 --- a/integration/cdi/cdi-jpastreamer/pom.xml +++ b/integration/cdi/cdi-jpastreamer/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer.integration.cdi cdi-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/integration/cdi/pom.xml b/integration/cdi/pom.xml index b62085f5..7e28a3a5 100644 --- a/integration/cdi/pom.xml +++ b/integration/cdi/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer.integration integration-parent - 1.1.3-SNAPSHOT + 1.1.3 diff --git a/integration/pom.xml b/integration/pom.xml index 45415338..eedf2dfc 100644 --- a/integration/pom.xml +++ b/integration/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/integration/spring/pom.xml b/integration/spring/pom.xml index 008ff572..169cd81e 100644 --- a/integration/spring/pom.xml +++ b/integration/spring/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer.integration integration-parent - 1.1.3-SNAPSHOT + 1.1.3 diff --git a/integration/spring/spring-boot-jpastreamer-autoconfigure/pom.xml b/integration/spring/spring-boot-jpastreamer-autoconfigure/pom.xml index 9539c980..cc5fe5d6 100644 --- a/integration/spring/spring-boot-jpastreamer-autoconfigure/pom.xml +++ b/integration/spring/spring-boot-jpastreamer-autoconfigure/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer.integration.spring spring-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/interopoptimizer/pom.xml b/interopoptimizer/pom.xml index 03411901..0de7aaa0 100644 --- a/interopoptimizer/pom.xml +++ b/interopoptimizer/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/javanine/pom.xml b/javanine/pom.xml index 10c2feac..21c62299 100644 --- a/javanine/pom.xml +++ b/javanine/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/merger/pom.xml b/merger/pom.xml index 19cabe6f..8047c426 100644 --- a/merger/pom.xml +++ b/merger/pom.xml @@ -19,7 +19,7 @@ com.speedment.jpastreamer jpastreamer-parent - 1.1.3-SNAPSHOT + 1.1.3 4.0.0 diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..cc586e37 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,212 @@ +{ + "name": "jpa-streamer", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/antora-lunr": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/antora-lunr/-/antora-lunr-0.8.0.tgz", + "integrity": "sha512-gFInioWxn/D0pqjx+2pnRP0xkUomb2NGZMDlNC8O4Xph2LqMnBXILYmhfR8VXOXBiNEF7bGpkF8PmZwEIqWnBw==", + "deprecated": "Package no longer supported. Replaced by @antora/lunr-extension", + "dependencies": { + "cheerio": "^1.0.0-rc.2", + "html-entities": "^1.2.1", + "lunr": "2.3.8" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==" + }, + "node_modules/htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "node_modules/lunr": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", + "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==" + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + } + } +} diff --git a/node_modules/antora-lunr/LICENSE b/node_modules/antora-lunr/LICENSE new file mode 100644 index 00000000..c1765a8b --- /dev/null +++ b/node_modules/antora-lunr/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Guillaume Grossetie + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/antora-lunr/README.md b/node_modules/antora-lunr/README.md new file mode 100644 index 00000000..b349c084 --- /dev/null +++ b/node_modules/antora-lunr/README.md @@ -0,0 +1,117 @@ +# Integration of Lunr in Antora + +[![Build Status](https://travis-ci.org/Mogztter/antora-lunr.svg?branch=master)](https://travis-ci.org/Mogztter/antora-lunr) +[![npm](https://img.shields.io/npm/v/antora-lunr.svg)](https://www.npmjs.org/package/antora-lunr) + +[Lunr](https://lunrjs.com/) provides a great search experience without the need for external, server-side, search services. +It makes it possible to add an *offline* search engine in your Antora's documentation site. + +## Usage + +### Generate an index file + +To integrate Lunr in Antora, we can either use a custom site generator pipeline that includes Lunr or modify your current site generator pipeline. + +**TIP:** +To make things easier, we provide a copy of the default site generator that in addition produces a Lunr index. Learn how to [install and use this generator](https://github.com/Mogztter/antora-site-generator-lunr). + +**NOTE:** +The following instructions only apply if you are using the default pipeline. +If you are using a custom pipeline, the logic remains the same but you will have to find yourself where the `generateSite` function should be added. + +Antora provides a default pipeline named `@antora/site-generator-default`. +Make sure that it's installed using the command `npm list --depth 0`. +If you don't find the module in the result then it's probably installed globally. +Add the `-g` flag and execute the command again: + +``` +npm list -g --depth 0 +/usr/local/lib +├── @antora/cli@2.0.0 +├── @antora/site-generator-default@2.0.0 +└── npm@6.5.0 +``` + +As you can see in the example above, the module is installed globally in _/usr/local/lib_. +The `node_modules` folder will be either at the root of your project or in your global libraries folder: _/usr/local/lib/node_modules_. + +Once you've located the module, edit the file `node_modules/@antora/site-generator-default/lib/generate-site.js` adding after `use strict`: + +```js +const generateIndex = require('antora-lunr') +``` + +In the `generateSite` function add the following two lines after `const siteFiles = mapSite(playbook, pages).concat(produceRedirects(playbook, contentCatalog))`: + +```js +const index = generateIndex(playbook, pages, contentCatalog, env) +siteFiles.push(generateIndex.createIndexFile(index)) +``` + +Install this module: + +```console +$ npm i antora-lunr +``` + +**NOTE**: +If Antora is installed globally, you should also add this module globally using the `-g` flag: + +```console +$ npm i -g antora-lunr +``` + +When generating your documentation site again, an index file will be created at the root of your output directory, +which depends on the value of `output.dir` in your playbook. +For the [default output dir](https://docs.antora.org/antora/2.0/playbook/configure-output/#default-output-dir), +that will be `build/site/search-index.js`. + +### Enable the search component in the UI + +Now that we have a `search-index.js`, we need to enable the search component in the UI. + +Copy the `supplemental_ui` directory from the npm package *node_modules/antora-lunr/supplemental_ui* in your Antora playbook repository and configure a `supplemental_files`: + +```yml +ui: + bundle: + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable + snapshot: true + supplemental_files: ./supplemental_ui +``` + +**NOTE:** For this to function correctly you must provide the `site.url` key in your playbook file. +See the Antora docs on the [playbook schema](https://docs.antora.org/antora/1.1/playbook/playbook-schema/). +If using the site locally (not serving from a web server) then you can set your `site.url` to a `file://` reference, e.g. `file:///home/documents/antora/website/public/`. + +**TIP:** If you are using [serve](https://www.npmjs.com/package/serve) HTTP server to view your site locally, +set the `site.url` to `http://localhost:5000`. + +### Generate the site + +Generate your documentation site with the following environment variables: + +* `DOCSEARCH_ENABLED=true` +* `DOCSEARCH_ENGINE=lunr` + +For instance, as a command line: + +```console +$ DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr antora site.yml +``` + +### Configuration + +To index only the latest (released) version, set the following environment variable: + +* `DOCSEARCH_INDEX_VERSION=latest` + +For instance, as a command line: + +```console +$ DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr DOCSEARCH_INDEX_VERSION=latest antora site.yml +``` + +### Testing this module + +In the root of the repository, run `npm t`. diff --git a/node_modules/antora-lunr/lib/generate-index.js b/node_modules/antora-lunr/lib/generate-index.js new file mode 100644 index 00000000..16eeb9e9 --- /dev/null +++ b/node_modules/antora-lunr/lib/generate-index.js @@ -0,0 +1,161 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +'use strict' + +const lunr = require('lunr') +const cheerio = require('cheerio') +const Entities = require('html-entities').AllHtmlEntities +const entities = new Entities() + +/** + * Generate a Lunr index. + * + * Iterates over the specified pages and creates a Lunr index. + * + * @memberof generate-index + * + * @param {Object} playbook - The configuration object for Antora. + * @param {Array} pages - The publishable pages to map. + * @param {Object} contentCatalog - the Antora content catalog (allows access to page metadata). + * @param {Object} env - command line environment variables. + * @returns {Object} A JSON object with a Lunr index and a documents store. + */ +function generateIndex (playbook, pages, contentCatalog, env) { + let siteUrl = playbook.site.url + if (!siteUrl) { + // Uses relative links when site URL is not set + siteUrl = '' + } + if (siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) + if (!pages.length) return {} + // Map of Lunr ref to document + const documentsStore = {} + const documents = pages + .map((page) => { + const html = page.contents.toString() + const $ = cheerio.load(html) + return { page, $ } + }) + // Exclude pages marked as "noindex" + .filter(({ page, $ }) => { + const $metaRobots = $('meta[name=robots]') + + const metaRobotNoIndex = $metaRobots && $metaRobots.attr('content') === 'noindex' + const pageNoIndex = page.asciidoc && page.asciidoc.attributes && page.asciidoc.attributes.noindex === '' + const noIndex = metaRobotNoIndex || pageNoIndex + const indexOnlyLatest = env.DOCSEARCH_INDEX_VERSION && + env.DOCSEARCH_INDEX_VERSION === 'latest' + if (indexOnlyLatest) { + const component = contentCatalog.getComponent(page.src.component) + const thisVersion = contentCatalog.getComponentVersion(component, page.src.version) + const latestVersion = contentCatalog.getComponent(page.src.component).latest + const notLatest = thisVersion !== latestVersion + return !(noIndex || notLatest) + } + return !noIndex + }) + .map(({ page, $ }) => { + // Fetch just the article content, so we don't index the TOC and other on-page text + // Remove any found headings, to improve search results + const article = $('article.doc') + const $h1 = $('h1', article) + const documentTitle = $h1.first().text() + $h1.remove() + const titles = [] + $('h2,h3,h4,h5,h6', article).each(function () { + const $title = $(this) + // If the title does not have an Id then Lunr will throw a TypeError + // cannot read property 'text' of undefined. + if ($title.attr('id')) { + titles.push({ + text: $title.text(), + id: $title.attr('id') + }) + } + $title.remove() + }) + + // don't index navigation elements for pagination on each page + // as these are the titles of other pages and it would otherwise pollute the index. + $('nav.pagination', article).each(function () { + $(this).remove() + }) + + // Pull the text from the article, and convert entities + let text = article.text() + // Decode HTML + text = entities.decode(text) + // Strip HTML tags + text = text.replace(/(<([^>]+)>)/ig, '') + .replace(/\n/g, ' ') + .replace(/\r/g, ' ') + .replace(/\s+/g, ' ') + .trim() + + // Return the indexable content, organized by type + return { + text: text, + title: documentTitle, + component: page.src.component, + version: page.src.version, + name: page.src.stem, + url: page.pub.url, + titles: titles // TODO get title id to be able to use fragment identifier + } + }) + + // Construct the lunr index from the composed content + const lunrIndex = lunr(function () { + const self = this + self.ref('url') + self.field('title', { boost: 10 }) + self.field('name') + self.field('text') + self.field('component') + self.metadataWhitelist = ['position'] + documents.forEach(function (doc) { + self.add(doc) + doc.titles.forEach(function (title) { + self.add({ + title: title.text, + url: `${doc.url}#${title.id}` + }) + }, self) + }, self) + }) + + // Place all indexed documents into the store + documents.forEach(function (doc) { + documentsStore[doc.url] = doc + }) + + // Return the completed index, store, and component map + return { + index: lunrIndex, + store: documentsStore + } +} + +// Helper function allowing Antora to create a site asset containing the index +function createIndexFile (index) { + return { + mediaType: 'text/javascript', + contents: Buffer.from(`window.antoraLunr.init(${JSON.stringify(index)})`), + src: { stem: 'search-index' }, + out: { path: 'search-index.js' }, + pub: { url: '/search-index.js', rootPath: '' } + } +} + +module.exports = generateIndex +module.exports.createIndexFile = createIndexFile diff --git a/node_modules/antora-lunr/lib/index.js b/node_modules/antora-lunr/lib/index.js new file mode 100644 index 00000000..5f344788 --- /dev/null +++ b/node_modules/antora-lunr/lib/index.js @@ -0,0 +1,20 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +'use strict' + +/** + * Lunr component for Antora + * + * @module lunr + */ +module.exports = require('./generate-index') diff --git a/node_modules/antora-lunr/package.json b/node_modules/antora-lunr/package.json new file mode 100644 index 00000000..0e702349 --- /dev/null +++ b/node_modules/antora-lunr/package.json @@ -0,0 +1,41 @@ +{ + "name": "antora-lunr", + "version": "0.8.0", + "description": "Generate a Lunr index from a catalog.", + "license": "MIT", + "author": "Guillaume Grossetie ", + "homepage": "https://antora.org", + "repository": "https://github.com/Mogztter/antora-lunr", + "bugs": { + "url": "https://github.com/Mogztter/antora-lunr/issues" + }, + "main": "lib/index.js", + "engines": { + "node": ">= 8.0.0" + }, + "scripts": { + "lint": "standard test/**/*.js lib/**/*.js", + "test": "mocha" + }, + "files": [ + "lib/", + "supplemental_ui" + ], + "keywords": [ + "antora", + "antora-component", + "lunr" + ], + "dependencies": { + "cheerio": "^1.0.0-rc.2", + "html-entities": "^1.2.1", + "lunr": "2.3.8" + }, + "devDependencies": { + "chai": "^4.1.2", + "dirty-chai": "^2.0.1", + "js-yaml": ">=3.13.1", + "mocha": "^8.0.1", + "standard": "^14.3.3" + } +} diff --git a/node_modules/antora-lunr/supplemental_ui/css/search.css b/node_modules/antora-lunr/supplemental_ui/css/search.css new file mode 100644 index 00000000..7ae4e7e8 --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/css/search.css @@ -0,0 +1,127 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +.navbar-brand .navbar-item + .navbar-item { + flex-grow: 1; + justify-content: flex-end; +} + +@media screen and (min-width: 1024px) { + .navbar-brand { + flex-grow: 1; + } + + .navbar-menu { + flex-grow: 0; + } +} + +#search-input { + color: #333; + font-family: inherit; + font-size: 0.95rem; + width: 150px; + border: 1px solid #dbdbdb; + border-radius: 0.1em; + line-height: 1.5; + padding: 0 0.25em; +} + +@media screen and (min-width: 769px) { + #search-input { + width: 200px; + } +} + +.search-result-dropdown-menu { + position: absolute; + z-index: 100; + display: block; + right: 0; + left: inherit; + top: 100%; + border-radius: 4px; + margin: 6px 0 0; + padding: 0; + text-align: left; + height: auto; + background: transparent; + border: none; + max-width: 600px; + min-width: 500px; + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2), 0 2px 3px 0 rgba(0, 0, 0, 0.1); +} + +@media screen and (max-width: 768px) { + .navbar-brand .navbar-item + .navbar-item { + padding-left: 0; + padding-right: 0; + } + + .search-result-dropdown-menu { + min-width: calc(100vw - 3.75rem); + } +} + +.search-result-dataset { + position: relative; + border: 1px solid #d9d9d9; + background: #fff; + border-radius: 4px; + overflow: auto; + padding: 0 8px 8px; + max-height: calc(100vh - 5.25rem); + color: #333; +} + +.search-result-highlight { + color: #174d8c; + background: rgba(143, 187, 237, 0.1); + padding: .1em .05em; +} + +.search-result-item { + display: flex; + font-size: 1rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; +} + +.search-result-document-title { + width: 33%; + border-right: 1px solid #ddd; + color: #a4a7ae; + font-size: 0.8rem; + padding: 0.25rem 0.5rem 0.25rem 0; + text-align: right; + position: relative; + word-wrap: break-word; +} + +.search-result-document-hit { + flex: 1; + font-size: 0.75em; + color: #02060c; + font-weight: 700; +} + +.search-result-document-hit > a { + color: inherit; + display: block; + padding: 0.5rem 0 0.5rem 1rem; + margin-bottom: 0.25rem; +} + +.search-result-document-hit > a:hover { + background-color: rgba(69, 142, 225, 0.05); +} + diff --git a/node_modules/antora-lunr/supplemental_ui/js/vendor/lunr.js b/node_modules/antora-lunr/supplemental_ui/js/vendor/lunr.js new file mode 100644 index 00000000..9c9a40ae --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/js/vendor/lunr.js @@ -0,0 +1,3481 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +;(function(){ + +/** + * A convenience function for configuring and constructing + * a new lunr Index. + * + * A lunr.Builder instance is created and the pipeline setup + * with a trimmer, stop word filter and stemmer. + * + * This builder object is yielded to the configuration function + * that is passed as a parameter, allowing the list of fields + * and other builder parameters to be customised. + * + * All documents _must_ be added within the passed config function. + * + * @example + * var idx = lunr(function () { + * this.field('title') + * this.field('body') + * this.ref('id') + * + * documents.forEach(function (doc) { + * this.add(doc) + * }, this) + * }) + * + * @see {@link lunr.Builder} + * @see {@link lunr.Pipeline} + * @see {@link lunr.trimmer} + * @see {@link lunr.stopWordFilter} + * @see {@link lunr.stemmer} + * @namespace {function} lunr + */ +var lunr = function (config) { + var builder = new lunr.Builder + + builder.pipeline.add( + lunr.trimmer, + lunr.stopWordFilter, + lunr.stemmer + ) + + builder.searchPipeline.add( + lunr.stemmer + ) + + config.call(builder, builder) + return builder.build() +} + +lunr.version = "2.3.8" +/*! + * lunr.utils + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * A namespace containing utils for the rest of the lunr library + * @namespace lunr.utils + */ +lunr.utils = {} + +/** + * Print a warning message to the console. + * + * @param {String} message The message to be printed. + * @memberOf lunr.utils + * @function + */ +lunr.utils.warn = (function (global) { + /* eslint-disable no-console */ + return function (message) { + if (global.console && console.warn) { + console.warn(message) + } + } + /* eslint-enable no-console */ +})(this) + +/** + * Convert an object to a string. + * + * In the case of `null` and `undefined` the function returns + * the empty string, in all other cases the result of calling + * `toString` on the passed object is returned. + * + * @param {Any} obj The object to convert to a string. + * @return {String} string representation of the passed object. + * @memberOf lunr.utils + */ +lunr.utils.asString = function (obj) { + if (obj === void 0 || obj === null) { + return "" + } else { + return obj.toString() + } +} + +/** + * Clones an object. + * + * Will create a copy of an existing object such that any mutations + * on the copy cannot affect the original. + * + * Only shallow objects are supported, passing a nested object to this + * function will cause a TypeError. + * + * Objects with primitives, and arrays of primitives are supported. + * + * @param {Object} obj The object to clone. + * @return {Object} a clone of the passed object. + * @throws {TypeError} when a nested object is passed. + * @memberOf Utils + */ +lunr.utils.clone = function (obj) { + if (obj === null || obj === undefined) { + return obj + } + + var clone = Object.create(null), + keys = Object.keys(obj) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i], + val = obj[key] + + if (Array.isArray(val)) { + clone[key] = val.slice() + continue + } + + if (typeof val === 'string' || + typeof val === 'number' || + typeof val === 'boolean') { + clone[key] = val + continue + } + + throw new TypeError("clone is not deep and does not support nested objects") + } + + return clone +} +lunr.FieldRef = function (docRef, fieldName, stringValue) { + this.docRef = docRef + this.fieldName = fieldName + this._stringValue = stringValue +} + +lunr.FieldRef.joiner = "/" + +lunr.FieldRef.fromString = function (s) { + var n = s.indexOf(lunr.FieldRef.joiner) + + if (n === -1) { + throw "malformed field ref string" + } + + var fieldRef = s.slice(0, n), + docRef = s.slice(n + 1) + + return new lunr.FieldRef (docRef, fieldRef, s) +} + +lunr.FieldRef.prototype.toString = function () { + if (this._stringValue == undefined) { + this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef + } + + return this._stringValue +} +/*! + * lunr.Set + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * A lunr set. + * + * @constructor + */ +lunr.Set = function (elements) { + this.elements = Object.create(null) + + if (elements) { + this.length = elements.length + + for (var i = 0; i < this.length; i++) { + this.elements[elements[i]] = true + } + } else { + this.length = 0 + } +} + +/** + * A complete set that contains all elements. + * + * @static + * @readonly + * @type {lunr.Set} + */ +lunr.Set.complete = { + intersect: function (other) { + return other + }, + + union: function (other) { + return other + }, + + contains: function () { + return true + } +} + +/** + * An empty set that contains no elements. + * + * @static + * @readonly + * @type {lunr.Set} + */ +lunr.Set.empty = { + intersect: function () { + return this + }, + + union: function (other) { + return other + }, + + contains: function () { + return false + } +} + +/** + * Returns true if this set contains the specified object. + * + * @param {object} object - Object whose presence in this set is to be tested. + * @returns {boolean} - True if this set contains the specified object. + */ +lunr.Set.prototype.contains = function (object) { + return !!this.elements[object] +} + +/** + * Returns a new set containing only the elements that are present in both + * this set and the specified set. + * + * @param {lunr.Set} other - set to intersect with this set. + * @returns {lunr.Set} a new set that is the intersection of this and the specified set. + */ + +lunr.Set.prototype.intersect = function (other) { + var a, b, elements, intersection = [] + + if (other === lunr.Set.complete) { + return this + } + + if (other === lunr.Set.empty) { + return other + } + + if (this.length < other.length) { + a = this + b = other + } else { + a = other + b = this + } + + elements = Object.keys(a.elements) + + for (var i = 0; i < elements.length; i++) { + var element = elements[i] + if (element in b.elements) { + intersection.push(element) + } + } + + return new lunr.Set (intersection) +} + +/** + * Returns a new set combining the elements of this and the specified set. + * + * @param {lunr.Set} other - set to union with this set. + * @return {lunr.Set} a new set that is the union of this and the specified set. + */ + +lunr.Set.prototype.union = function (other) { + if (other === lunr.Set.complete) { + return lunr.Set.complete + } + + if (other === lunr.Set.empty) { + return this + } + + return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements))) +} +/** + * A function to calculate the inverse document frequency for + * a posting. This is shared between the builder and the index + * + * @private + * @param {object} posting - The posting for a given term + * @param {number} documentCount - The total number of documents. + */ +lunr.idf = function (posting, documentCount) { + var documentsWithTerm = 0 + + for (var fieldName in posting) { + if (fieldName == '_index') continue // Ignore the term index, its not a field + documentsWithTerm += Object.keys(posting[fieldName]).length + } + + var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5) + + return Math.log(1 + Math.abs(x)) +} + +/** + * A token wraps a string representation of a token + * as it is passed through the text processing pipeline. + * + * @constructor + * @param {string} [str=''] - The string token being wrapped. + * @param {object} [metadata={}] - Metadata associated with this token. + */ +lunr.Token = function (str, metadata) { + this.str = str || "" + this.metadata = metadata || {} +} + +/** + * Returns the token string that is being wrapped by this object. + * + * @returns {string} + */ +lunr.Token.prototype.toString = function () { + return this.str +} + +/** + * A token update function is used when updating or optionally + * when cloning a token. + * + * @callback lunr.Token~updateFunction + * @param {string} str - The string representation of the token. + * @param {Object} metadata - All metadata associated with this token. + */ + +/** + * Applies the given function to the wrapped string token. + * + * @example + * token.update(function (str, metadata) { + * return str.toUpperCase() + * }) + * + * @param {lunr.Token~updateFunction} fn - A function to apply to the token string. + * @returns {lunr.Token} + */ +lunr.Token.prototype.update = function (fn) { + this.str = fn(this.str, this.metadata) + return this +} + +/** + * Creates a clone of this token. Optionally a function can be + * applied to the cloned token. + * + * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token. + * @returns {lunr.Token} + */ +lunr.Token.prototype.clone = function (fn) { + fn = fn || function (s) { return s } + return new lunr.Token (fn(this.str, this.metadata), this.metadata) +} +/*! + * lunr.tokenizer + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * A function for splitting a string into tokens ready to be inserted into + * the search index. Uses `lunr.tokenizer.separator` to split strings, change + * the value of this property to change how strings are split into tokens. + * + * This tokenizer will convert its parameter to a string by calling `toString` and + * then will split this string on the character in `lunr.tokenizer.separator`. + * Arrays will have their elements converted to strings and wrapped in a lunr.Token. + * + * Optional metadata can be passed to the tokenizer, this metadata will be cloned and + * added as metadata to every token that is created from the object to be tokenized. + * + * @static + * @param {?(string|object|object[])} obj - The object to convert into tokens + * @param {?object} metadata - Optional metadata to associate with every token + * @returns {lunr.Token[]} + * @see {@link lunr.Pipeline} + */ +lunr.tokenizer = function (obj, metadata) { + if (obj == null || obj == undefined) { + return [] + } + + if (Array.isArray(obj)) { + return obj.map(function (t) { + return new lunr.Token( + lunr.utils.asString(t).toLowerCase(), + lunr.utils.clone(metadata) + ) + }) + } + + var str = obj.toString().toLowerCase(), + len = str.length, + tokens = [] + + for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) { + var char = str.charAt(sliceEnd), + sliceLength = sliceEnd - sliceStart + + if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) { + + if (sliceLength > 0) { + var tokenMetadata = lunr.utils.clone(metadata) || {} + tokenMetadata["position"] = [sliceStart, sliceLength] + tokenMetadata["index"] = tokens.length + + tokens.push( + new lunr.Token ( + str.slice(sliceStart, sliceEnd), + tokenMetadata + ) + ) + } + + sliceStart = sliceEnd + 1 + } + + } + + return tokens +} + +/** + * The separator used to split a string into tokens. Override this property to change the behaviour of + * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens. + * + * @static + * @see lunr.tokenizer + */ +lunr.tokenizer.separator = /[\s\-]+/ +/*! + * lunr.Pipeline + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * lunr.Pipelines maintain an ordered list of functions to be applied to all + * tokens in documents entering the search index and queries being ran against + * the index. + * + * An instance of lunr.Index created with the lunr shortcut will contain a + * pipeline with a stop word filter and an English language stemmer. Extra + * functions can be added before or after either of these functions or these + * default functions can be removed. + * + * When run the pipeline will call each function in turn, passing a token, the + * index of that token in the original list of all tokens and finally a list of + * all the original tokens. + * + * The output of functions in the pipeline will be passed to the next function + * in the pipeline. To exclude a token from entering the index the function + * should return undefined, the rest of the pipeline will not be called with + * this token. + * + * For serialisation of pipelines to work, all functions used in an instance of + * a pipeline should be registered with lunr.Pipeline. Registered functions can + * then be loaded. If trying to load a serialised pipeline that uses functions + * that are not registered an error will be thrown. + * + * If not planning on serialising the pipeline then registering pipeline functions + * is not necessary. + * + * @constructor + */ +lunr.Pipeline = function () { + this._stack = [] +} + +lunr.Pipeline.registeredFunctions = Object.create(null) + +/** + * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token + * string as well as all known metadata. A pipeline function can mutate the token string + * or mutate (or add) metadata for a given token. + * + * A pipeline function can indicate that the passed token should be discarded by returning + * null, undefined or an empty string. This token will not be passed to any downstream pipeline + * functions and will not be added to the index. + * + * Multiple tokens can be returned by returning an array of tokens. Each token will be passed + * to any downstream pipeline functions and all will returned tokens will be added to the index. + * + * Any number of pipeline functions may be chained together using a lunr.Pipeline. + * + * @interface lunr.PipelineFunction + * @param {lunr.Token} token - A token from the document being processed. + * @param {number} i - The index of this token in the complete list of tokens for this document/field. + * @param {lunr.Token[]} tokens - All tokens for this document/field. + * @returns {(?lunr.Token|lunr.Token[])} + */ + +/** + * Register a function with the pipeline. + * + * Functions that are used in the pipeline should be registered if the pipeline + * needs to be serialised, or a serialised pipeline needs to be loaded. + * + * Registering a function does not add it to a pipeline, functions must still be + * added to instances of the pipeline for them to be used when running a pipeline. + * + * @param {lunr.PipelineFunction} fn - The function to check for. + * @param {String} label - The label to register this function with + */ +lunr.Pipeline.registerFunction = function (fn, label) { + if (label in this.registeredFunctions) { + lunr.utils.warn('Overwriting existing registered function: ' + label) + } + + fn.label = label + lunr.Pipeline.registeredFunctions[fn.label] = fn +} + +/** + * Warns if the function is not registered as a Pipeline function. + * + * @param {lunr.PipelineFunction} fn - The function to check for. + * @private + */ +lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { + var isRegistered = fn.label && (fn.label in this.registeredFunctions) + + if (!isRegistered) { + lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn) + } +} + +/** + * Loads a previously serialised pipeline. + * + * All functions to be loaded must already be registered with lunr.Pipeline. + * If any function from the serialised data has not been registered then an + * error will be thrown. + * + * @param {Object} serialised - The serialised pipeline to load. + * @returns {lunr.Pipeline} + */ +lunr.Pipeline.load = function (serialised) { + var pipeline = new lunr.Pipeline + + serialised.forEach(function (fnName) { + var fn = lunr.Pipeline.registeredFunctions[fnName] + + if (fn) { + pipeline.add(fn) + } else { + throw new Error('Cannot load unregistered function: ' + fnName) + } + }) + + return pipeline +} + +/** + * Adds new functions to the end of the pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline. + */ +lunr.Pipeline.prototype.add = function () { + var fns = Array.prototype.slice.call(arguments) + + fns.forEach(function (fn) { + lunr.Pipeline.warnIfFunctionNotRegistered(fn) + this._stack.push(fn) + }, this) +} + +/** + * Adds a single function after a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline. + */ +lunr.Pipeline.prototype.after = function (existingFn, newFn) { + lunr.Pipeline.warnIfFunctionNotRegistered(newFn) + + var pos = this._stack.indexOf(existingFn) + if (pos == -1) { + throw new Error('Cannot find existingFn') + } + + pos = pos + 1 + this._stack.splice(pos, 0, newFn) +} + +/** + * Adds a single function before a function that already exists in the + * pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline. + */ +lunr.Pipeline.prototype.before = function (existingFn, newFn) { + lunr.Pipeline.warnIfFunctionNotRegistered(newFn) + + var pos = this._stack.indexOf(existingFn) + if (pos == -1) { + throw new Error('Cannot find existingFn') + } + + this._stack.splice(pos, 0, newFn) +} + +/** + * Removes a function from the pipeline. + * + * @param {lunr.PipelineFunction} fn The function to remove from the pipeline. + */ +lunr.Pipeline.prototype.remove = function (fn) { + var pos = this._stack.indexOf(fn) + if (pos == -1) { + return + } + + this._stack.splice(pos, 1) +} + +/** + * Runs the current list of functions that make up the pipeline against the + * passed tokens. + * + * @param {Array} tokens The tokens to run through the pipeline. + * @returns {Array} + */ +lunr.Pipeline.prototype.run = function (tokens) { + var stackLength = this._stack.length + + for (var i = 0; i < stackLength; i++) { + var fn = this._stack[i] + var memo = [] + + for (var j = 0; j < tokens.length; j++) { + var result = fn(tokens[j], j, tokens) + + if (result === null || result === void 0 || result === '') continue + + if (Array.isArray(result)) { + for (var k = 0; k < result.length; k++) { + memo.push(result[k]) + } + } else { + memo.push(result) + } + } + + tokens = memo + } + + return tokens +} + +/** + * Convenience method for passing a string through a pipeline and getting + * strings out. This method takes care of wrapping the passed string in a + * token and mapping the resulting tokens back to strings. + * + * @param {string} str - The string to pass through the pipeline. + * @param {?object} metadata - Optional metadata to associate with the token + * passed to the pipeline. + * @returns {string[]} + */ +lunr.Pipeline.prototype.runString = function (str, metadata) { + var token = new lunr.Token (str, metadata) + + return this.run([token]).map(function (t) { + return t.toString() + }) +} + +/** + * Resets the pipeline by removing any existing processors. + * + */ +lunr.Pipeline.prototype.reset = function () { + this._stack = [] +} + +/** + * Returns a representation of the pipeline ready for serialisation. + * + * Logs a warning if the function has not been registered. + * + * @returns {Array} + */ +lunr.Pipeline.prototype.toJSON = function () { + return this._stack.map(function (fn) { + lunr.Pipeline.warnIfFunctionNotRegistered(fn) + + return fn.label + }) +} +/*! + * lunr.Vector + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * A vector is used to construct the vector space of documents and queries. These + * vectors support operations to determine the similarity between two documents or + * a document and a query. + * + * Normally no parameters are required for initializing a vector, but in the case of + * loading a previously dumped vector the raw elements can be provided to the constructor. + * + * For performance reasons vectors are implemented with a flat array, where an elements + * index is immediately followed by its value. E.g. [index, value, index, value]. This + * allows the underlying array to be as sparse as possible and still offer decent + * performance when being used for vector calculations. + * + * @constructor + * @param {Number[]} [elements] - The flat list of element index and element value pairs. + */ +lunr.Vector = function (elements) { + this._magnitude = 0 + this.elements = elements || [] +} + + +/** + * Calculates the position within the vector to insert a given index. + * + * This is used internally by insert and upsert. If there are duplicate indexes then + * the position is returned as if the value for that index were to be updated, but it + * is the callers responsibility to check whether there is a duplicate at that index + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @returns {Number} + */ +lunr.Vector.prototype.positionForIndex = function (index) { + // For an empty vector the tuple can be inserted at the beginning + if (this.elements.length == 0) { + return 0 + } + + var start = 0, + end = this.elements.length / 2, + sliceLength = end - start, + pivotPoint = Math.floor(sliceLength / 2), + pivotIndex = this.elements[pivotPoint * 2] + + while (sliceLength > 1) { + if (pivotIndex < index) { + start = pivotPoint + } + + if (pivotIndex > index) { + end = pivotPoint + } + + if (pivotIndex == index) { + break + } + + sliceLength = end - start + pivotPoint = start + Math.floor(sliceLength / 2) + pivotIndex = this.elements[pivotPoint * 2] + } + + if (pivotIndex == index) { + return pivotPoint * 2 + } + + if (pivotIndex > index) { + return pivotPoint * 2 + } + + if (pivotIndex < index) { + return (pivotPoint + 1) * 2 + } +} + +/** + * Inserts an element at an index within the vector. + * + * Does not allow duplicates, will throw an error if there is already an entry + * for this index. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + */ +lunr.Vector.prototype.insert = function (insertIdx, val) { + this.upsert(insertIdx, val, function () { + throw "duplicate index" + }) +} + +/** + * Inserts or updates an existing index within the vector. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + * @param {function} fn - A function that is called for updates, the existing value and the + * requested value are passed as arguments + */ +lunr.Vector.prototype.upsert = function (insertIdx, val, fn) { + this._magnitude = 0 + var position = this.positionForIndex(insertIdx) + + if (this.elements[position] == insertIdx) { + this.elements[position + 1] = fn(this.elements[position + 1], val) + } else { + this.elements.splice(position, 0, insertIdx, val) + } +} + +/** + * Calculates the magnitude of this vector. + * + * @returns {Number} + */ +lunr.Vector.prototype.magnitude = function () { + if (this._magnitude) return this._magnitude + + var sumOfSquares = 0, + elementsLength = this.elements.length + + for (var i = 1; i < elementsLength; i += 2) { + var val = this.elements[i] + sumOfSquares += val * val + } + + return this._magnitude = Math.sqrt(sumOfSquares) +} + +/** + * Calculates the dot product of this vector and another vector. + * + * @param {lunr.Vector} otherVector - The vector to compute the dot product with. + * @returns {Number} + */ +lunr.Vector.prototype.dot = function (otherVector) { + var dotProduct = 0, + a = this.elements, b = otherVector.elements, + aLen = a.length, bLen = b.length, + aVal = 0, bVal = 0, + i = 0, j = 0 + + while (i < aLen && j < bLen) { + aVal = a[i], bVal = b[j] + if (aVal < bVal) { + i += 2 + } else if (aVal > bVal) { + j += 2 + } else if (aVal == bVal) { + dotProduct += a[i + 1] * b[j + 1] + i += 2 + j += 2 + } + } + + return dotProduct +} + +/** + * Calculates the similarity between this vector and another vector. + * + * @param {lunr.Vector} otherVector - The other vector to calculate the + * similarity with. + * @returns {Number} + */ +lunr.Vector.prototype.similarity = function (otherVector) { + return this.dot(otherVector) / this.magnitude() || 0 +} + +/** + * Converts the vector to an array of the elements within the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toArray = function () { + var output = new Array (this.elements.length / 2) + + for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) { + output[j] = this.elements[i] + } + + return output +} + +/** + * A JSON serializable representation of the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toJSON = function () { + return this.elements +} +/* eslint-disable */ +/*! + * lunr.stemmer + * Copyright (C) 2019 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + +/** + * lunr.stemmer is an english language stemmer, this is a JavaScript + * implementation of the PorterStemmer taken from http://tartarus.org/~martin + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token - The string to stem + * @returns {lunr.Token} + * @see {@link lunr.Pipeline} + * @function + */ +lunr.stemmer = (function(){ + var step2list = { + "ational" : "ate", + "tional" : "tion", + "enci" : "ence", + "anci" : "ance", + "izer" : "ize", + "bli" : "ble", + "alli" : "al", + "entli" : "ent", + "eli" : "e", + "ousli" : "ous", + "ization" : "ize", + "ation" : "ate", + "ator" : "ate", + "alism" : "al", + "iveness" : "ive", + "fulness" : "ful", + "ousness" : "ous", + "aliti" : "al", + "iviti" : "ive", + "biliti" : "ble", + "logi" : "log" + }, + + step3list = { + "icate" : "ic", + "ative" : "", + "alize" : "al", + "iciti" : "ic", + "ical" : "ic", + "ful" : "", + "ness" : "" + }, + + c = "[^aeiou]", // consonant + v = "[aeiouy]", // vowel + C = c + "[^aeiouy]*", // consonant sequence + V = v + "[aeiou]*", // vowel sequence + + mgr0 = "^(" + C + ")?" + V + C, // [C]VC... is m>0 + meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$", // [C]VC[V] is m=1 + mgr1 = "^(" + C + ")?" + V + C + V + C, // [C]VCVC... is m>1 + s_v = "^(" + C + ")?" + v; // vowel in stem + + var re_mgr0 = new RegExp(mgr0); + var re_mgr1 = new RegExp(mgr1); + var re_meq1 = new RegExp(meq1); + var re_s_v = new RegExp(s_v); + + var re_1a = /^(.+?)(ss|i)es$/; + var re2_1a = /^(.+?)([^s])s$/; + var re_1b = /^(.+?)eed$/; + var re2_1b = /^(.+?)(ed|ing)$/; + var re_1b_2 = /.$/; + var re2_1b_2 = /(at|bl|iz)$/; + var re3_1b_2 = new RegExp("([^aeiouylsz])\\1$"); + var re4_1b_2 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + + var re_1c = /^(.+?[^aeiou])y$/; + var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + + var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + + var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + var re2_4 = /^(.+?)(s|t)(ion)$/; + + var re_5 = /^(.+?)e$/; + var re_5_1 = /ll$/; + var re3_5 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + + var porterStemmer = function porterStemmer(w) { + var stem, + suffix, + firstch, + re, + re2, + re3, + re4; + + if (w.length < 3) { return w; } + + firstch = w.substr(0,1); + if (firstch == "y") { + w = firstch.toUpperCase() + w.substr(1); + } + + // Step 1a + re = re_1a + re2 = re2_1a; + + if (re.test(w)) { w = w.replace(re,"$1$2"); } + else if (re2.test(w)) { w = w.replace(re2,"$1$2"); } + + // Step 1b + re = re_1b; + re2 = re2_1b; + if (re.test(w)) { + var fp = re.exec(w); + re = re_mgr0; + if (re.test(fp[1])) { + re = re_1b_2; + w = w.replace(re,""); + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = re_s_v; + if (re2.test(stem)) { + w = stem; + re2 = re2_1b_2; + re3 = re3_1b_2; + re4 = re4_1b_2; + if (re2.test(w)) { w = w + "e"; } + else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,""); } + else if (re4.test(w)) { w = w + "e"; } + } + } + + // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say) + re = re_1c; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem + "i"; + } + + // Step 2 + re = re_2; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step2list[suffix]; + } + } + + // Step 3 + re = re_3; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = re_mgr0; + if (re.test(stem)) { + w = stem + step3list[suffix]; + } + } + + // Step 4 + re = re_4; + re2 = re2_4; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + if (re.test(stem)) { + w = stem; + } + } else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = re_mgr1; + if (re2.test(stem)) { + w = stem; + } + } + + // Step 5 + re = re_5; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = re_mgr1; + re2 = re_meq1; + re3 = re3_5; + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) { + w = stem; + } + } + + re = re_5_1; + re2 = re_mgr1; + if (re.test(w) && re2.test(w)) { + re = re_1b_2; + w = w.replace(re,""); + } + + // and turn initial Y back to y + + if (firstch == "y") { + w = firstch.toLowerCase() + w.substr(1); + } + + return w; + }; + + return function (token) { + return token.update(porterStemmer); + } +})(); + +lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer') +/*! + * lunr.stopWordFilter + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * lunr.generateStopWordFilter builds a stopWordFilter function from the provided + * list of stop words. + * + * The built in lunr.stopWordFilter is built using this generator and can be used + * to generate custom stopWordFilters for applications or non English languages. + * + * @function + * @param {Array} token The token to pass through the filter + * @returns {lunr.PipelineFunction} + * @see lunr.Pipeline + * @see lunr.stopWordFilter + */ +lunr.generateStopWordFilter = function (stopWords) { + var words = stopWords.reduce(function (memo, stopWord) { + memo[stopWord] = stopWord + return memo + }, {}) + + return function (token) { + if (token && words[token.toString()] !== token.toString()) return token + } +} + +/** + * lunr.stopWordFilter is an English language stop word list filter, any words + * contained in the list will not be passed through the filter. + * + * This is intended to be used in the Pipeline. If the token does not pass the + * filter then undefined will be returned. + * + * @function + * @implements {lunr.PipelineFunction} + * @params {lunr.Token} token - A token to check for being a stop word. + * @returns {lunr.Token} + * @see {@link lunr.Pipeline} + */ +lunr.stopWordFilter = lunr.generateStopWordFilter([ + 'a', + 'able', + 'about', + 'across', + 'after', + 'all', + 'almost', + 'also', + 'am', + 'among', + 'an', + 'and', + 'any', + 'are', + 'as', + 'at', + 'be', + 'because', + 'been', + 'but', + 'by', + 'can', + 'cannot', + 'could', + 'dear', + 'did', + 'do', + 'does', + 'either', + 'else', + 'ever', + 'every', + 'for', + 'from', + 'get', + 'got', + 'had', + 'has', + 'have', + 'he', + 'her', + 'hers', + 'him', + 'his', + 'how', + 'however', + 'i', + 'if', + 'in', + 'into', + 'is', + 'it', + 'its', + 'just', + 'least', + 'let', + 'like', + 'likely', + 'may', + 'me', + 'might', + 'most', + 'must', + 'my', + 'neither', + 'no', + 'nor', + 'not', + 'of', + 'off', + 'often', + 'on', + 'only', + 'or', + 'other', + 'our', + 'own', + 'rather', + 'said', + 'say', + 'says', + 'she', + 'should', + 'since', + 'so', + 'some', + 'than', + 'that', + 'the', + 'their', + 'them', + 'then', + 'there', + 'these', + 'they', + 'this', + 'tis', + 'to', + 'too', + 'twas', + 'us', + 'wants', + 'was', + 'we', + 'were', + 'what', + 'when', + 'where', + 'which', + 'while', + 'who', + 'whom', + 'why', + 'will', + 'with', + 'would', + 'yet', + 'you', + 'your' +]) + +lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter') +/*! + * lunr.trimmer + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * lunr.trimmer is a pipeline function for trimming non word + * characters from the beginning and end of tokens before they + * enter the index. + * + * This implementation may not work correctly for non latin + * characters and should either be removed or adapted for use + * with languages with non-latin characters. + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token The token to pass through the filter + * @returns {lunr.Token} + * @see lunr.Pipeline + */ +lunr.trimmer = function (token) { + return token.update(function (s) { + return s.replace(/^\W+/, '').replace(/\W+$/, '') + }) +} + +lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer') +/*! + * lunr.TokenSet + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * A token set is used to store the unique list of all tokens + * within an index. Token sets are also used to represent an + * incoming query to the index, this query token set and index + * token set are then intersected to find which tokens to look + * up in the inverted index. + * + * A token set can hold multiple tokens, as in the case of the + * index token set, or it can hold a single token as in the + * case of a simple query token set. + * + * Additionally token sets are used to perform wildcard matching. + * Leading, contained and trailing wildcards are supported, and + * from this edit distance matching can also be provided. + * + * Token sets are implemented as a minimal finite state automata, + * where both common prefixes and suffixes are shared between tokens. + * This helps to reduce the space used for storing the token set. + * + * @constructor + */ +lunr.TokenSet = function () { + this.final = false + this.edges = {} + this.id = lunr.TokenSet._nextId + lunr.TokenSet._nextId += 1 +} + +/** + * Keeps track of the next, auto increment, identifier to assign + * to a new tokenSet. + * + * TokenSets require a unique identifier to be correctly minimised. + * + * @private + */ +lunr.TokenSet._nextId = 1 + +/** + * Creates a TokenSet instance from the given sorted array of words. + * + * @param {String[]} arr - A sorted array of strings to create the set from. + * @returns {lunr.TokenSet} + * @throws Will throw an error if the input array is not sorted. + */ +lunr.TokenSet.fromArray = function (arr) { + var builder = new lunr.TokenSet.Builder + + for (var i = 0, len = arr.length; i < len; i++) { + builder.insert(arr[i]) + } + + builder.finish() + return builder.root +} + +/** + * Creates a token set from a query clause. + * + * @private + * @param {Object} clause - A single clause from lunr.Query. + * @param {string} clause.term - The query clause term. + * @param {number} [clause.editDistance] - The optional edit distance for the term. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromClause = function (clause) { + if ('editDistance' in clause) { + return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance) + } else { + return lunr.TokenSet.fromString(clause.term) + } +} + +/** + * Creates a token set representing a single string with a specified + * edit distance. + * + * Insertions, deletions, substitutions and transpositions are each + * treated as an edit distance of 1. + * + * Increasing the allowed edit distance will have a dramatic impact + * on the performance of both creating and intersecting these TokenSets. + * It is advised to keep the edit distance less than 3. + * + * @param {string} str - The string to create the token set from. + * @param {number} editDistance - The allowed edit distance to match. + * @returns {lunr.Vector} + */ +lunr.TokenSet.fromFuzzyString = function (str, editDistance) { + var root = new lunr.TokenSet + + var stack = [{ + node: root, + editsRemaining: editDistance, + str: str + }] + + while (stack.length) { + var frame = stack.pop() + + // no edit + if (frame.str.length > 0) { + var char = frame.str.charAt(0), + noEditNode + + if (char in frame.node.edges) { + noEditNode = frame.node.edges[char] + } else { + noEditNode = new lunr.TokenSet + frame.node.edges[char] = noEditNode + } + + if (frame.str.length == 1) { + noEditNode.final = true + } + + stack.push({ + node: noEditNode, + editsRemaining: frame.editsRemaining, + str: frame.str.slice(1) + }) + } + + if (frame.editsRemaining == 0) { + continue + } + + // insertion + if ("*" in frame.node.edges) { + var insertionNode = frame.node.edges["*"] + } else { + var insertionNode = new lunr.TokenSet + frame.node.edges["*"] = insertionNode + } + + if (frame.str.length == 0) { + insertionNode.final = true + } + + stack.push({ + node: insertionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str + }) + + // deletion + // can only do a deletion if we have enough edits remaining + // and if there are characters left to delete in the string + if (frame.str.length > 1) { + stack.push({ + node: frame.node, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(1) + }) + } + + // deletion + // just removing the last character from the str + if (frame.str.length == 1) { + frame.node.final = true + } + + // substitution + // can only do a substitution if we have enough edits remaining + // and if there are characters left to substitute + if (frame.str.length >= 1) { + if ("*" in frame.node.edges) { + var substitutionNode = frame.node.edges["*"] + } else { + var substitutionNode = new lunr.TokenSet + frame.node.edges["*"] = substitutionNode + } + + if (frame.str.length == 1) { + substitutionNode.final = true + } + + stack.push({ + node: substitutionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(1) + }) + } + + // transposition + // can only do a transposition if there are edits remaining + // and there are enough characters to transpose + if (frame.str.length > 1) { + var charA = frame.str.charAt(0), + charB = frame.str.charAt(1), + transposeNode + + if (charB in frame.node.edges) { + transposeNode = frame.node.edges[charB] + } else { + transposeNode = new lunr.TokenSet + frame.node.edges[charB] = transposeNode + } + + if (frame.str.length == 1) { + transposeNode.final = true + } + + stack.push({ + node: transposeNode, + editsRemaining: frame.editsRemaining - 1, + str: charA + frame.str.slice(2) + }) + } + } + + return root +} + +/** + * Creates a TokenSet from a string. + * + * The string may contain one or more wildcard characters (*) + * that will allow wildcard matching when intersecting with + * another TokenSet. + * + * @param {string} str - The string to create a TokenSet from. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromString = function (str) { + var node = new lunr.TokenSet, + root = node + + /* + * Iterates through all characters within the passed string + * appending a node for each character. + * + * When a wildcard character is found then a self + * referencing edge is introduced to continually match + * any number of any characters. + */ + for (var i = 0, len = str.length; i < len; i++) { + var char = str[i], + final = (i == len - 1) + + if (char == "*") { + node.edges[char] = node + node.final = final + + } else { + var next = new lunr.TokenSet + next.final = final + + node.edges[char] = next + node = next + } + } + + return root +} + +/** + * Converts this TokenSet into an array of strings + * contained within the TokenSet. + * + * This is not intended to be used on a TokenSet that + * contains wildcards, in these cases the results are + * undefined and are likely to cause an infinite loop. + * + * @returns {string[]} + */ +lunr.TokenSet.prototype.toArray = function () { + var words = [] + + var stack = [{ + prefix: "", + node: this + }] + + while (stack.length) { + var frame = stack.pop(), + edges = Object.keys(frame.node.edges), + len = edges.length + + if (frame.node.final) { + /* In Safari, at this point the prefix is sometimes corrupted, see: + * https://github.com/olivernn/lunr.js/issues/279 Calling any + * String.prototype method forces Safari to "cast" this string to what + * it's supposed to be, fixing the bug. */ + frame.prefix.charAt(0) + words.push(frame.prefix) + } + + for (var i = 0; i < len; i++) { + var edge = edges[i] + + stack.push({ + prefix: frame.prefix.concat(edge), + node: frame.node.edges[edge] + }) + } + } + + return words +} + +/** + * Generates a string representation of a TokenSet. + * + * This is intended to allow TokenSets to be used as keys + * in objects, largely to aid the construction and minimisation + * of a TokenSet. As such it is not designed to be a human + * friendly representation of the TokenSet. + * + * @returns {string} + */ +lunr.TokenSet.prototype.toString = function () { + // NOTE: Using Object.keys here as this.edges is very likely + // to enter 'hash-mode' with many keys being added + // + // avoiding a for-in loop here as it leads to the function + // being de-optimised (at least in V8). From some simple + // benchmarks the performance is comparable, but allowing + // V8 to optimize may mean easy performance wins in the future. + + if (this._str) { + return this._str + } + + var str = this.final ? '1' : '0', + labels = Object.keys(this.edges).sort(), + len = labels.length + + for (var i = 0; i < len; i++) { + var label = labels[i], + node = this.edges[label] + + str = str + label + node.id + } + + return str +} + +/** + * Returns a new TokenSet that is the intersection of + * this TokenSet and the passed TokenSet. + * + * This intersection will take into account any wildcards + * contained within the TokenSet. + * + * @param {lunr.TokenSet} b - An other TokenSet to intersect with. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.prototype.intersect = function (b) { + var output = new lunr.TokenSet, + frame = undefined + + var stack = [{ + qNode: b, + output: output, + node: this + }] + + while (stack.length) { + frame = stack.pop() + + // NOTE: As with the #toString method, we are using + // Object.keys and a for loop instead of a for-in loop + // as both of these objects enter 'hash' mode, causing + // the function to be de-optimised in V8 + var qEdges = Object.keys(frame.qNode.edges), + qLen = qEdges.length, + nEdges = Object.keys(frame.node.edges), + nLen = nEdges.length + + for (var q = 0; q < qLen; q++) { + var qEdge = qEdges[q] + + for (var n = 0; n < nLen; n++) { + var nEdge = nEdges[n] + + if (nEdge == qEdge || qEdge == '*') { + var node = frame.node.edges[nEdge], + qNode = frame.qNode.edges[qEdge], + final = node.final && qNode.final, + next = undefined + + if (nEdge in frame.output.edges) { + // an edge already exists for this character + // no need to create a new node, just set the finality + // bit unless this node is already final + next = frame.output.edges[nEdge] + next.final = next.final || final + + } else { + // no edge exists yet, must create one + // set the finality bit and insert it + // into the output + next = new lunr.TokenSet + next.final = final + frame.output.edges[nEdge] = next + } + + stack.push({ + qNode: qNode, + output: next, + node: node + }) + } + } + } + } + + return output +} +lunr.TokenSet.Builder = function () { + this.previousWord = "" + this.root = new lunr.TokenSet + this.uncheckedNodes = [] + this.minimizedNodes = {} +} + +lunr.TokenSet.Builder.prototype.insert = function (word) { + var node, + commonPrefix = 0 + + if (word < this.previousWord) { + throw new Error ("Out of order word insertion") + } + + for (var i = 0; i < word.length && i < this.previousWord.length; i++) { + if (word[i] != this.previousWord[i]) break + commonPrefix++ + } + + this.minimize(commonPrefix) + + if (this.uncheckedNodes.length == 0) { + node = this.root + } else { + node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child + } + + for (var i = commonPrefix; i < word.length; i++) { + var nextNode = new lunr.TokenSet, + char = word[i] + + node.edges[char] = nextNode + + this.uncheckedNodes.push({ + parent: node, + char: char, + child: nextNode + }) + + node = nextNode + } + + node.final = true + this.previousWord = word +} + +lunr.TokenSet.Builder.prototype.finish = function () { + this.minimize(0) +} + +lunr.TokenSet.Builder.prototype.minimize = function (downTo) { + for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) { + var node = this.uncheckedNodes[i], + childKey = node.child.toString() + + if (childKey in this.minimizedNodes) { + node.parent.edges[node.char] = this.minimizedNodes[childKey] + } else { + // Cache the key for this node since + // we know it can't change anymore + node.child._str = childKey + + this.minimizedNodes[childKey] = node.child + } + + this.uncheckedNodes.pop() + } +} +/*! + * lunr.Index + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * An index contains the built index of all documents and provides a query interface + * to the index. + * + * Usually instances of lunr.Index will not be created using this constructor, instead + * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be + * used to load previously built and serialized indexes. + * + * @constructor + * @param {Object} attrs - The attributes of the built search index. + * @param {Object} attrs.invertedIndex - An index of term/field to document reference. + * @param {Object} attrs.fieldVectors - Field vectors + * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens. + * @param {string[]} attrs.fields - The names of indexed document fields. + * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms. + */ +lunr.Index = function (attrs) { + this.invertedIndex = attrs.invertedIndex + this.fieldVectors = attrs.fieldVectors + this.tokenSet = attrs.tokenSet + this.fields = attrs.fields + this.pipeline = attrs.pipeline +} + +/** + * A result contains details of a document matching a search query. + * @typedef {Object} lunr.Index~Result + * @property {string} ref - The reference of the document this result represents. + * @property {number} score - A number between 0 and 1 representing how similar this document is to the query. + * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match. + */ + +/** + * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple + * query language which itself is parsed into an instance of lunr.Query. + * + * For programmatically building queries it is advised to directly use lunr.Query, the query language + * is best used for human entered text rather than program generated text. + * + * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported + * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello' + * or 'world', though those that contain both will rank higher in the results. + * + * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can + * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding + * wildcards will increase the number of documents that will be found but can also have a negative + * impact on query performance, especially with wildcards at the beginning of a term. + * + * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term + * hello in the title field will match this query. Using a field not present in the index will lead + * to an error being thrown. + * + * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term + * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported + * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2. + * Avoid large values for edit distance to improve query performance. + * + * Each term also supports a presence modifier. By default a term's presence in document is optional, however + * this can be changed to either required or prohibited. For a term's presence to be required in a document the + * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and + * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not + * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'. + * + * To escape special characters the backslash character '\' can be used, this allows searches to include + * characters that would normally be considered modifiers, e.g. `foo\~2` will search for a term "foo~2" instead + * of attempting to apply a boost of 2 to the search term "foo". + * + * @typedef {string} lunr.Index~QueryString + * @example Simple single term query + * hello + * @example Multiple term query + * hello world + * @example term scoped to a field + * title:hello + * @example term with a boost of 10 + * hello^10 + * @example term with an edit distance of 2 + * hello~2 + * @example terms with presence modifiers + * -foo +bar baz + */ + +/** + * Performs a search against the index using lunr query syntax. + * + * Results will be returned sorted by their score, the most relevant results + * will be returned first. For details on how the score is calculated, please see + * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}. + * + * For more programmatic querying use lunr.Index#query. + * + * @param {lunr.Index~QueryString} queryString - A string containing a lunr query. + * @throws {lunr.QueryParseError} If the passed query string cannot be parsed. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.search = function (queryString) { + return this.query(function (query) { + var parser = new lunr.QueryParser(queryString, query) + parser.parse() + }) +} + +/** + * A query builder callback provides a query object to be used to express + * the query to perform on the index. + * + * @callback lunr.Index~queryBuilder + * @param {lunr.Query} query - The query object to build up. + * @this lunr.Query + */ + +/** + * Performs a query against the index using the yielded lunr.Query object. + * + * If performing programmatic queries against the index, this method is preferred + * over lunr.Index#search so as to avoid the additional query parsing overhead. + * + * A query object is yielded to the supplied function which should be used to + * express the query to be run against the index. + * + * Note that although this function takes a callback parameter it is _not_ an + * asynchronous operation, the callback is just yielded a query object to be + * customized. + * + * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.query = function (fn) { + // for each query clause + // * process terms + // * expand terms from token set + // * find matching documents and metadata + // * get document vectors + // * score documents + + var query = new lunr.Query(this.fields), + matchingFields = Object.create(null), + queryVectors = Object.create(null), + termFieldCache = Object.create(null), + requiredMatches = Object.create(null), + prohibitedMatches = Object.create(null) + + /* + * To support field level boosts a query vector is created per + * field. An empty vector is eagerly created to support negated + * queries. + */ + for (var i = 0; i < this.fields.length; i++) { + queryVectors[this.fields[i]] = new lunr.Vector + } + + fn.call(query, query) + + for (var i = 0; i < query.clauses.length; i++) { + /* + * Unless the pipeline has been disabled for this term, which is + * the case for terms with wildcards, we need to pass the clause + * term through the search pipeline. A pipeline returns an array + * of processed terms. Pipeline functions may expand the passed + * term, which means we may end up performing multiple index lookups + * for a single query term. + */ + var clause = query.clauses[i], + terms = null, + clauseMatches = lunr.Set.complete + + if (clause.usePipeline) { + terms = this.pipeline.runString(clause.term, { + fields: clause.fields + }) + } else { + terms = [clause.term] + } + + for (var m = 0; m < terms.length; m++) { + var term = terms[m] + + /* + * Each term returned from the pipeline needs to use the same query + * clause object, e.g. the same boost and or edit distance. The + * simplest way to do this is to re-use the clause object but mutate + * its term property. + */ + clause.term = term + + /* + * From the term in the clause we create a token set which will then + * be used to intersect the indexes token set to get a list of terms + * to lookup in the inverted index + */ + var termTokenSet = lunr.TokenSet.fromClause(clause), + expandedTerms = this.tokenSet.intersect(termTokenSet).toArray() + + /* + * If a term marked as required does not exist in the tokenSet it is + * impossible for the search to return any matches. We set all the field + * scoped required matches set to empty and stop examining any further + * clauses. + */ + if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) { + for (var k = 0; k < clause.fields.length; k++) { + var field = clause.fields[k] + requiredMatches[field] = lunr.Set.empty + } + + break + } + + for (var j = 0; j < expandedTerms.length; j++) { + /* + * For each term get the posting and termIndex, this is required for + * building the query vector. + */ + var expandedTerm = expandedTerms[j], + posting = this.invertedIndex[expandedTerm], + termIndex = posting._index + + for (var k = 0; k < clause.fields.length; k++) { + /* + * For each field that this query term is scoped by (by default + * all fields are in scope) we need to get all the document refs + * that have this term in that field. + * + * The posting is the entry in the invertedIndex for the matching + * term from above. + */ + var field = clause.fields[k], + fieldPosting = posting[field], + matchingDocumentRefs = Object.keys(fieldPosting), + termField = expandedTerm + "/" + field, + matchingDocumentsSet = new lunr.Set(matchingDocumentRefs) + + /* + * if the presence of this term is required ensure that the matching + * documents are added to the set of required matches for this clause. + * + */ + if (clause.presence == lunr.Query.presence.REQUIRED) { + clauseMatches = clauseMatches.union(matchingDocumentsSet) + + if (requiredMatches[field] === undefined) { + requiredMatches[field] = lunr.Set.complete + } + } + + /* + * if the presence of this term is prohibited ensure that the matching + * documents are added to the set of prohibited matches for this field, + * creating that set if it does not yet exist. + */ + if (clause.presence == lunr.Query.presence.PROHIBITED) { + if (prohibitedMatches[field] === undefined) { + prohibitedMatches[field] = lunr.Set.empty + } + + prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet) + + /* + * Prohibited matches should not be part of the query vector used for + * similarity scoring and no metadata should be extracted so we continue + * to the next field + */ + continue + } + + /* + * The query field vector is populated using the termIndex found for + * the term and a unit value with the appropriate boost applied. + * Using upsert because there could already be an entry in the vector + * for the term we are working with. In that case we just add the scores + * together. + */ + queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b }) + + /** + * If we've already seen this term, field combo then we've already collected + * the matching documents and metadata, no need to go through all that again + */ + if (termFieldCache[termField]) { + continue + } + + for (var l = 0; l < matchingDocumentRefs.length; l++) { + /* + * All metadata for this term/field/document triple + * are then extracted and collected into an instance + * of lunr.MatchData ready to be returned in the query + * results + */ + var matchingDocumentRef = matchingDocumentRefs[l], + matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field), + metadata = fieldPosting[matchingDocumentRef], + fieldMatch + + if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) { + matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata) + } else { + fieldMatch.add(expandedTerm, field, metadata) + } + + } + + termFieldCache[termField] = true + } + } + } + + /** + * If the presence was required we need to update the requiredMatches field sets. + * We do this after all fields for the term have collected their matches because + * the clause terms presence is required in _any_ of the fields not _all_ of the + * fields. + */ + if (clause.presence === lunr.Query.presence.REQUIRED) { + for (var k = 0; k < clause.fields.length; k++) { + var field = clause.fields[k] + requiredMatches[field] = requiredMatches[field].intersect(clauseMatches) + } + } + } + + /** + * Need to combine the field scoped required and prohibited + * matching documents into a global set of required and prohibited + * matches + */ + var allRequiredMatches = lunr.Set.complete, + allProhibitedMatches = lunr.Set.empty + + for (var i = 0; i < this.fields.length; i++) { + var field = this.fields[i] + + if (requiredMatches[field]) { + allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field]) + } + + if (prohibitedMatches[field]) { + allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field]) + } + } + + var matchingFieldRefs = Object.keys(matchingFields), + results = [], + matches = Object.create(null) + + /* + * If the query is negated (contains only prohibited terms) + * we need to get _all_ fieldRefs currently existing in the + * index. This is only done when we know that the query is + * entirely prohibited terms to avoid any cost of getting all + * fieldRefs unnecessarily. + * + * Additionally, blank MatchData must be created to correctly + * populate the results. + */ + if (query.isNegated()) { + matchingFieldRefs = Object.keys(this.fieldVectors) + + for (var i = 0; i < matchingFieldRefs.length; i++) { + var matchingFieldRef = matchingFieldRefs[i] + var fieldRef = lunr.FieldRef.fromString(matchingFieldRef) + matchingFields[matchingFieldRef] = new lunr.MatchData + } + } + + for (var i = 0; i < matchingFieldRefs.length; i++) { + /* + * Currently we have document fields that match the query, but we + * need to return documents. The matchData and scores are combined + * from multiple fields belonging to the same document. + * + * Scores are calculated by field, using the query vectors created + * above, and combined into a final document score using addition. + */ + var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]), + docRef = fieldRef.docRef + + if (!allRequiredMatches.contains(docRef)) { + continue + } + + if (allProhibitedMatches.contains(docRef)) { + continue + } + + var fieldVector = this.fieldVectors[fieldRef], + score = queryVectors[fieldRef.fieldName].similarity(fieldVector), + docMatch + + if ((docMatch = matches[docRef]) !== undefined) { + docMatch.score += score + docMatch.matchData.combine(matchingFields[fieldRef]) + } else { + var match = { + ref: docRef, + score: score, + matchData: matchingFields[fieldRef] + } + matches[docRef] = match + results.push(match) + } + } + + /* + * Sort the results objects by score, highest first. + */ + return results.sort(function (a, b) { + return b.score - a.score + }) +} + +/** + * Prepares the index for JSON serialization. + * + * The schema for this JSON blob will be described in a + * separate JSON schema file. + * + * @returns {Object} + */ +lunr.Index.prototype.toJSON = function () { + var invertedIndex = Object.keys(this.invertedIndex) + .sort() + .map(function (term) { + return [term, this.invertedIndex[term]] + }, this) + + var fieldVectors = Object.keys(this.fieldVectors) + .map(function (ref) { + return [ref, this.fieldVectors[ref].toJSON()] + }, this) + + return { + version: lunr.version, + fields: this.fields, + fieldVectors: fieldVectors, + invertedIndex: invertedIndex, + pipeline: this.pipeline.toJSON() + } +} + +/** + * Loads a previously serialized lunr.Index + * + * @param {Object} serializedIndex - A previously serialized lunr.Index + * @returns {lunr.Index} + */ +lunr.Index.load = function (serializedIndex) { + var attrs = {}, + fieldVectors = {}, + serializedVectors = serializedIndex.fieldVectors, + invertedIndex = Object.create(null), + serializedInvertedIndex = serializedIndex.invertedIndex, + tokenSetBuilder = new lunr.TokenSet.Builder, + pipeline = lunr.Pipeline.load(serializedIndex.pipeline) + + if (serializedIndex.version != lunr.version) { + lunr.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr.version + "' does not match serialized index '" + serializedIndex.version + "'") + } + + for (var i = 0; i < serializedVectors.length; i++) { + var tuple = serializedVectors[i], + ref = tuple[0], + elements = tuple[1] + + fieldVectors[ref] = new lunr.Vector(elements) + } + + for (var i = 0; i < serializedInvertedIndex.length; i++) { + var tuple = serializedInvertedIndex[i], + term = tuple[0], + posting = tuple[1] + + tokenSetBuilder.insert(term) + invertedIndex[term] = posting + } + + tokenSetBuilder.finish() + + attrs.fields = serializedIndex.fields + + attrs.fieldVectors = fieldVectors + attrs.invertedIndex = invertedIndex + attrs.tokenSet = tokenSetBuilder.root + attrs.pipeline = pipeline + + return new lunr.Index(attrs) +} +/*! + * lunr.Builder + * Copyright (C) 2019 Oliver Nightingale + */ + +/** + * lunr.Builder performs indexing on a set of documents and + * returns instances of lunr.Index ready for querying. + * + * All configuration of the index is done via the builder, the + * fields to index, the document reference, the text processing + * pipeline and document scoring parameters are all set on the + * builder before indexing. + * + * @constructor + * @property {string} _ref - Internal reference to the document reference field. + * @property {string[]} _fields - Internal reference to the document fields to index. + * @property {object} invertedIndex - The inverted index maps terms to document fields. + * @property {object} documentTermFrequencies - Keeps track of document term frequencies. + * @property {object} documentLengths - Keeps track of the length of documents added to the index. + * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing. + * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing. + * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index. + * @property {number} documentCount - Keeps track of the total number of documents indexed. + * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75. + * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2. + * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space. + * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index. + */ +lunr.Builder = function () { + this._ref = "id" + this._fields = Object.create(null) + this._documents = Object.create(null) + this.invertedIndex = Object.create(null) + this.fieldTermFrequencies = {} + this.fieldLengths = {} + this.tokenizer = lunr.tokenizer + this.pipeline = new lunr.Pipeline + this.searchPipeline = new lunr.Pipeline + this.documentCount = 0 + this._b = 0.75 + this._k1 = 1.2 + this.termIndex = 0 + this.metadataWhitelist = [] +} + +/** + * Sets the document field used as the document reference. Every document must have this field. + * The type of this field in the document should be a string, if it is not a string it will be + * coerced into a string by calling toString. + * + * The default ref is 'id'. + * + * The ref should _not_ be changed during indexing, it should be set before any documents are + * added to the index. Changing it during indexing can lead to inconsistent results. + * + * @param {string} ref - The name of the reference field in the document. + */ +lunr.Builder.prototype.ref = function (ref) { + this._ref = ref +} + +/** + * A function that is used to extract a field from a document. + * + * Lunr expects a field to be at the top level of a document, if however the field + * is deeply nested within a document an extractor function can be used to extract + * the right field for indexing. + * + * @callback fieldExtractor + * @param {object} doc - The document being added to the index. + * @returns {?(string|object|object[])} obj - The object that will be indexed for this field. + * @example Extracting a nested field + * function (doc) { return doc.nested.field } + */ + +/** + * Adds a field to the list of document fields that will be indexed. Every document being + * indexed should have this field. Null values for this field in indexed documents will + * not cause errors but will limit the chance of that document being retrieved by searches. + * + * All fields should be added before adding documents to the index. Adding fields after + * a document has been indexed will have no effect on already indexed documents. + * + * Fields can be boosted at build time. This allows terms within that field to have more + * importance when ranking search results. Use a field boost to specify that matches within + * one field are more important than other fields. + * + * @param {string} fieldName - The name of a field to index in all documents. + * @param {object} attributes - Optional attributes associated with this field. + * @param {number} [attributes.boost=1] - Boost applied to all terms within this field. + * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document. + * @throws {RangeError} fieldName cannot contain unsupported characters '/' + */ +lunr.Builder.prototype.field = function (fieldName, attributes) { + if (/\//.test(fieldName)) { + throw new RangeError ("Field '" + fieldName + "' contains illegal character '/'") + } + + this._fields[fieldName] = attributes || {} +} + +/** + * A parameter to tune the amount of field length normalisation that is applied when + * calculating relevance scores. A value of 0 will completely disable any normalisation + * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b + * will be clamped to the range 0 - 1. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.b = function (number) { + if (number < 0) { + this._b = 0 + } else if (number > 1) { + this._b = 1 + } else { + this._b = number + } +} + +/** + * A parameter that controls the speed at which a rise in term frequency results in term + * frequency saturation. The default value is 1.2. Setting this to a higher value will give + * slower saturation levels, a lower value will result in quicker saturation. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.k1 = function (number) { + this._k1 = number +} + +/** + * Adds a document to the index. + * + * Before adding fields to the index the index should have been fully setup, with the document + * ref and all fields to index already having been specified. + * + * The document must have a field name as specified by the ref (by default this is 'id') and + * it should have all fields defined for indexing, though null or undefined values will not + * cause errors. + * + * Entire documents can be boosted at build time. Applying a boost to a document indicates that + * this document should rank higher in search results than other documents. + * + * @param {object} doc - The document to add to the index. + * @param {object} attributes - Optional attributes associated with this document. + * @param {number} [attributes.boost=1] - Boost applied to all terms within this document. + */ +lunr.Builder.prototype.add = function (doc, attributes) { + var docRef = doc[this._ref], + fields = Object.keys(this._fields) + + this._documents[docRef] = attributes || {} + this.documentCount += 1 + + for (var i = 0; i < fields.length; i++) { + var fieldName = fields[i], + extractor = this._fields[fieldName].extractor, + field = extractor ? extractor(doc) : doc[fieldName], + tokens = this.tokenizer(field, { + fields: [fieldName] + }), + terms = this.pipeline.run(tokens), + fieldRef = new lunr.FieldRef (docRef, fieldName), + fieldTerms = Object.create(null) + + this.fieldTermFrequencies[fieldRef] = fieldTerms + this.fieldLengths[fieldRef] = 0 + + // store the length of this field for this document + this.fieldLengths[fieldRef] += terms.length + + // calculate term frequencies for this field + for (var j = 0; j < terms.length; j++) { + var term = terms[j] + + if (fieldTerms[term] == undefined) { + fieldTerms[term] = 0 + } + + fieldTerms[term] += 1 + + // add to inverted index + // create an initial posting if one doesn't exist + if (this.invertedIndex[term] == undefined) { + var posting = Object.create(null) + posting["_index"] = this.termIndex + this.termIndex += 1 + + for (var k = 0; k < fields.length; k++) { + posting[fields[k]] = Object.create(null) + } + + this.invertedIndex[term] = posting + } + + // add an entry for this term/fieldName/docRef to the invertedIndex + if (this.invertedIndex[term][fieldName][docRef] == undefined) { + this.invertedIndex[term][fieldName][docRef] = Object.create(null) + } + + // store all whitelisted metadata about this token in the + // inverted index + for (var l = 0; l < this.metadataWhitelist.length; l++) { + var metadataKey = this.metadataWhitelist[l], + metadata = term.metadata[metadataKey] + + if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) { + this.invertedIndex[term][fieldName][docRef][metadataKey] = [] + } + + this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata) + } + } + + } +} + +/** + * Calculates the average document length for this index + * + * @private + */ +lunr.Builder.prototype.calculateAverageFieldLengths = function () { + + var fieldRefs = Object.keys(this.fieldLengths), + numberOfFields = fieldRefs.length, + accumulator = {}, + documentsWithField = {} + + for (var i = 0; i < numberOfFields; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + field = fieldRef.fieldName + + documentsWithField[field] || (documentsWithField[field] = 0) + documentsWithField[field] += 1 + + accumulator[field] || (accumulator[field] = 0) + accumulator[field] += this.fieldLengths[fieldRef] + } + + var fields = Object.keys(this._fields) + + for (var i = 0; i < fields.length; i++) { + var fieldName = fields[i] + accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName] + } + + this.averageFieldLength = accumulator +} + +/** + * Builds a vector space model of every document using lunr.Vector + * + * @private + */ +lunr.Builder.prototype.createFieldVectors = function () { + var fieldVectors = {}, + fieldRefs = Object.keys(this.fieldTermFrequencies), + fieldRefsLength = fieldRefs.length, + termIdfCache = Object.create(null) + + for (var i = 0; i < fieldRefsLength; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + fieldName = fieldRef.fieldName, + fieldLength = this.fieldLengths[fieldRef], + fieldVector = new lunr.Vector, + termFrequencies = this.fieldTermFrequencies[fieldRef], + terms = Object.keys(termFrequencies), + termsLength = terms.length + + + var fieldBoost = this._fields[fieldName].boost || 1, + docBoost = this._documents[fieldRef.docRef].boost || 1 + + for (var j = 0; j < termsLength; j++) { + var term = terms[j], + tf = termFrequencies[term], + termIndex = this.invertedIndex[term]._index, + idf, score, scoreWithPrecision + + if (termIdfCache[term] === undefined) { + idf = lunr.idf(this.invertedIndex[term], this.documentCount) + termIdfCache[term] = idf + } else { + idf = termIdfCache[term] + } + + score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf) + score *= fieldBoost + score *= docBoost + scoreWithPrecision = Math.round(score * 1000) / 1000 + // Converts 1.23456789 to 1.234. + // Reducing the precision so that the vectors take up less + // space when serialised. Doing it now so that they behave + // the same before and after serialisation. Also, this is + // the fastest approach to reducing a number's precision in + // JavaScript. + + fieldVector.insert(termIndex, scoreWithPrecision) + } + + fieldVectors[fieldRef] = fieldVector + } + + this.fieldVectors = fieldVectors +} + +/** + * Creates a token set of all tokens in the index using lunr.TokenSet + * + * @private + */ +lunr.Builder.prototype.createTokenSet = function () { + this.tokenSet = lunr.TokenSet.fromArray( + Object.keys(this.invertedIndex).sort() + ) +} + +/** + * Builds the index, creating an instance of lunr.Index. + * + * This completes the indexing process and should only be called + * once all documents have been added to the index. + * + * @returns {lunr.Index} + */ +lunr.Builder.prototype.build = function () { + this.calculateAverageFieldLengths() + this.createFieldVectors() + this.createTokenSet() + + return new lunr.Index({ + invertedIndex: this.invertedIndex, + fieldVectors: this.fieldVectors, + tokenSet: this.tokenSet, + fields: Object.keys(this._fields), + pipeline: this.searchPipeline + }) +} + +/** + * Applies a plugin to the index builder. + * + * A plugin is a function that is called with the index builder as its context. + * Plugins can be used to customise or extend the behaviour of the index + * in some way. A plugin is just a function, that encapsulated the custom + * behaviour that should be applied when building the index. + * + * The plugin function will be called with the index builder as its argument, additional + * arguments can also be passed when calling use. The function will be called + * with the index builder as its context. + * + * @param {Function} plugin The plugin to apply. + */ +lunr.Builder.prototype.use = function (fn) { + var args = Array.prototype.slice.call(arguments, 1) + args.unshift(this) + fn.apply(this, args) +} +/** + * Contains and collects metadata about a matching document. + * A single instance of lunr.MatchData is returned as part of every + * lunr.Index~Result. + * + * @constructor + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + * @property {object} metadata - A cloned collection of metadata associated with this document. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData = function (term, field, metadata) { + var clonedMetadata = Object.create(null), + metadataKeys = Object.keys(metadata || {}) + + // Cloning the metadata to prevent the original + // being mutated during match data combination. + // Metadata is kept in an array within the inverted + // index so cloning the data can be done with + // Array#slice + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + clonedMetadata[key] = metadata[key].slice() + } + + this.metadata = Object.create(null) + + if (term !== undefined) { + this.metadata[term] = Object.create(null) + this.metadata[term][field] = clonedMetadata + } +} + +/** + * An instance of lunr.MatchData will be created for every term that matches a + * document. However only one instance is required in a lunr.Index~Result. This + * method combines metadata from another instance of lunr.MatchData with this + * objects metadata. + * + * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData.prototype.combine = function (otherMatchData) { + var terms = Object.keys(otherMatchData.metadata) + + for (var i = 0; i < terms.length; i++) { + var term = terms[i], + fields = Object.keys(otherMatchData.metadata[term]) + + if (this.metadata[term] == undefined) { + this.metadata[term] = Object.create(null) + } + + for (var j = 0; j < fields.length; j++) { + var field = fields[j], + keys = Object.keys(otherMatchData.metadata[term][field]) + + if (this.metadata[term][field] == undefined) { + this.metadata[term][field] = Object.create(null) + } + + for (var k = 0; k < keys.length; k++) { + var key = keys[k] + + if (this.metadata[term][field][key] == undefined) { + this.metadata[term][field][key] = otherMatchData.metadata[term][field][key] + } else { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key]) + } + + } + } + } +} + +/** + * Add metadata for a term/field pair to this instance of match data. + * + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + */ +lunr.MatchData.prototype.add = function (term, field, metadata) { + if (!(term in this.metadata)) { + this.metadata[term] = Object.create(null) + this.metadata[term][field] = metadata + return + } + + if (!(field in this.metadata[term])) { + this.metadata[term][field] = metadata + return + } + + var metadataKeys = Object.keys(metadata) + + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + + if (key in this.metadata[term][field]) { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key]) + } else { + this.metadata[term][field][key] = metadata[key] + } + } +} +/** + * A lunr.Query provides a programmatic way of defining queries to be performed + * against a {@link lunr.Index}. + * + * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method + * so the query object is pre-initialized with the right index fields. + * + * @constructor + * @property {lunr.Query~Clause[]} clauses - An array of query clauses. + * @property {string[]} allFields - An array of all available fields in a lunr.Index. + */ +lunr.Query = function (allFields) { + this.clauses = [] + this.allFields = allFields +} + +/** + * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause. + * + * This allows wildcards to be added to the beginning and end of a term without having to manually do any string + * concatenation. + * + * The wildcard constants can be bitwise combined to select both leading and trailing wildcards. + * + * @constant + * @default + * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour + * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists + * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists + * @see lunr.Query~Clause + * @see lunr.Query#clause + * @see lunr.Query#term + * @example query term with trailing wildcard + * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING }) + * @example query term with leading and trailing wildcard + * query.term('foo', { + * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING + * }) + */ + +lunr.Query.wildcard = new String ("*") +lunr.Query.wildcard.NONE = 0 +lunr.Query.wildcard.LEADING = 1 +lunr.Query.wildcard.TRAILING = 2 + +/** + * Constants for indicating what kind of presence a term must have in matching documents. + * + * @constant + * @enum {number} + * @see lunr.Query~Clause + * @see lunr.Query#clause + * @see lunr.Query#term + * @example query term with required presence + * query.term('foo', { presence: lunr.Query.presence.REQUIRED }) + */ +lunr.Query.presence = { + /** + * Term's presence in a document is optional, this is the default value. + */ + OPTIONAL: 1, + + /** + * Term's presence in a document is required, documents that do not contain + * this term will not be returned. + */ + REQUIRED: 2, + + /** + * Term's presence in a document is prohibited, documents that do contain + * this term will not be returned. + */ + PROHIBITED: 3 +} + +/** + * A single clause in a {@link lunr.Query} contains a term and details on how to + * match that term against a {@link lunr.Index}. + * + * @typedef {Object} lunr.Query~Clause + * @property {string[]} fields - The fields in an index this clause should be matched against. + * @property {number} [boost=1] - Any boost that should be applied when matching this clause. + * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be. + * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline. + * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended. + * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents. + */ + +/** + * Adds a {@link lunr.Query~Clause} to this query. + * + * Unless the clause contains the fields to be matched all fields will be matched. In addition + * a default boost of 1 is applied to the clause. + * + * @param {lunr.Query~Clause} clause - The clause to add to this query. + * @see lunr.Query~Clause + * @returns {lunr.Query} + */ +lunr.Query.prototype.clause = function (clause) { + if (!('fields' in clause)) { + clause.fields = this.allFields + } + + if (!('boost' in clause)) { + clause.boost = 1 + } + + if (!('usePipeline' in clause)) { + clause.usePipeline = true + } + + if (!('wildcard' in clause)) { + clause.wildcard = lunr.Query.wildcard.NONE + } + + if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) { + clause.term = "*" + clause.term + } + + if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) { + clause.term = "" + clause.term + "*" + } + + if (!('presence' in clause)) { + clause.presence = lunr.Query.presence.OPTIONAL + } + + this.clauses.push(clause) + + return this +} + +/** + * A negated query is one in which every clause has a presence of + * prohibited. These queries require some special processing to return + * the expected results. + * + * @returns boolean + */ +lunr.Query.prototype.isNegated = function () { + for (var i = 0; i < this.clauses.length; i++) { + if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) { + return false + } + } + + return true +} + +/** + * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause} + * to the list of clauses that make up this query. + * + * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion + * to a token or token-like string should be done before calling this method. + * + * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an + * array, each term in the array will share the same options. + * + * @param {object|object[]} term - The term(s) to add to the query. + * @param {object} [options] - Any additional properties to add to the query clause. + * @returns {lunr.Query} + * @see lunr.Query#clause + * @see lunr.Query~Clause + * @example adding a single term to a query + * query.term("foo") + * @example adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard + * query.term("foo", { + * fields: ["title"], + * boost: 10, + * wildcard: lunr.Query.wildcard.TRAILING + * }) + * @example using lunr.tokenizer to convert a string to tokens before using them as terms + * query.term(lunr.tokenizer("foo bar")) + */ +lunr.Query.prototype.term = function (term, options) { + if (Array.isArray(term)) { + term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this) + return this + } + + var clause = options || {} + clause.term = term.toString() + + this.clause(clause) + + return this +} +lunr.QueryParseError = function (message, start, end) { + this.name = "QueryParseError" + this.message = message + this.start = start + this.end = end +} + +lunr.QueryParseError.prototype = new Error +lunr.QueryLexer = function (str) { + this.lexemes = [] + this.str = str + this.length = str.length + this.pos = 0 + this.start = 0 + this.escapeCharPositions = [] +} + +lunr.QueryLexer.prototype.run = function () { + var state = lunr.QueryLexer.lexText + + while (state) { + state = state(this) + } +} + +lunr.QueryLexer.prototype.sliceString = function () { + var subSlices = [], + sliceStart = this.start, + sliceEnd = this.pos + + for (var i = 0; i < this.escapeCharPositions.length; i++) { + sliceEnd = this.escapeCharPositions[i] + subSlices.push(this.str.slice(sliceStart, sliceEnd)) + sliceStart = sliceEnd + 1 + } + + subSlices.push(this.str.slice(sliceStart, this.pos)) + this.escapeCharPositions.length = 0 + + return subSlices.join('') +} + +lunr.QueryLexer.prototype.emit = function (type) { + this.lexemes.push({ + type: type, + str: this.sliceString(), + start: this.start, + end: this.pos + }) + + this.start = this.pos +} + +lunr.QueryLexer.prototype.escapeCharacter = function () { + this.escapeCharPositions.push(this.pos - 1) + this.pos += 1 +} + +lunr.QueryLexer.prototype.next = function () { + if (this.pos >= this.length) { + return lunr.QueryLexer.EOS + } + + var char = this.str.charAt(this.pos) + this.pos += 1 + return char +} + +lunr.QueryLexer.prototype.width = function () { + return this.pos - this.start +} + +lunr.QueryLexer.prototype.ignore = function () { + if (this.start == this.pos) { + this.pos += 1 + } + + this.start = this.pos +} + +lunr.QueryLexer.prototype.backup = function () { + this.pos -= 1 +} + +lunr.QueryLexer.prototype.acceptDigitRun = function () { + var char, charCode + + do { + char = this.next() + charCode = char.charCodeAt(0) + } while (charCode > 47 && charCode < 58) + + if (char != lunr.QueryLexer.EOS) { + this.backup() + } +} + +lunr.QueryLexer.prototype.more = function () { + return this.pos < this.length +} + +lunr.QueryLexer.EOS = 'EOS' +lunr.QueryLexer.FIELD = 'FIELD' +lunr.QueryLexer.TERM = 'TERM' +lunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE' +lunr.QueryLexer.BOOST = 'BOOST' +lunr.QueryLexer.PRESENCE = 'PRESENCE' + +lunr.QueryLexer.lexField = function (lexer) { + lexer.backup() + lexer.emit(lunr.QueryLexer.FIELD) + lexer.ignore() + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexTerm = function (lexer) { + if (lexer.width() > 1) { + lexer.backup() + lexer.emit(lunr.QueryLexer.TERM) + } + + lexer.ignore() + + if (lexer.more()) { + return lunr.QueryLexer.lexText + } +} + +lunr.QueryLexer.lexEditDistance = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.EDIT_DISTANCE) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexBoost = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.BOOST) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexEOS = function (lexer) { + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } +} + +// This matches the separator used when tokenising fields +// within a document. These should match otherwise it is +// not possible to search for some tokens within a document. +// +// It is possible for the user to change the separator on the +// tokenizer so it _might_ clash with any other of the special +// characters already used within the search string, e.g. :. +// +// This means that it is possible to change the separator in +// such a way that makes some words unsearchable using a search +// string. +lunr.QueryLexer.termSeparator = lunr.tokenizer.separator + +lunr.QueryLexer.lexText = function (lexer) { + while (true) { + var char = lexer.next() + + if (char == lunr.QueryLexer.EOS) { + return lunr.QueryLexer.lexEOS + } + + // Escape character is '\' + if (char.charCodeAt(0) == 92) { + lexer.escapeCharacter() + continue + } + + if (char == ":") { + return lunr.QueryLexer.lexField + } + + if (char == "~") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexEditDistance + } + + if (char == "^") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexBoost + } + + // "+" indicates term presence is required + // checking for length to ensure that only + // leading "+" are considered + if (char == "+" && lexer.width() === 1) { + lexer.emit(lunr.QueryLexer.PRESENCE) + return lunr.QueryLexer.lexText + } + + // "-" indicates term presence is prohibited + // checking for length to ensure that only + // leading "-" are considered + if (char == "-" && lexer.width() === 1) { + lexer.emit(lunr.QueryLexer.PRESENCE) + return lunr.QueryLexer.lexText + } + + if (char.match(lunr.QueryLexer.termSeparator)) { + return lunr.QueryLexer.lexTerm + } + } +} + +lunr.QueryParser = function (str, query) { + this.lexer = new lunr.QueryLexer (str) + this.query = query + this.currentClause = {} + this.lexemeIdx = 0 +} + +lunr.QueryParser.prototype.parse = function () { + this.lexer.run() + this.lexemes = this.lexer.lexemes + + var state = lunr.QueryParser.parseClause + + while (state) { + state = state(this) + } + + return this.query +} + +lunr.QueryParser.prototype.peekLexeme = function () { + return this.lexemes[this.lexemeIdx] +} + +lunr.QueryParser.prototype.consumeLexeme = function () { + var lexeme = this.peekLexeme() + this.lexemeIdx += 1 + return lexeme +} + +lunr.QueryParser.prototype.nextClause = function () { + var completedClause = this.currentClause + this.query.clause(completedClause) + this.currentClause = {} +} + +lunr.QueryParser.parseClause = function (parser) { + var lexeme = parser.peekLexeme() + + if (lexeme == undefined) { + return + } + + switch (lexeme.type) { + case lunr.QueryLexer.PRESENCE: + return lunr.QueryParser.parsePresence + case lunr.QueryLexer.FIELD: + return lunr.QueryParser.parseField + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expected either a field or a term, found " + lexeme.type + + if (lexeme.str.length >= 1) { + errorMessage += " with value '" + lexeme.str + "'" + } + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } +} + +lunr.QueryParser.parsePresence = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + switch (lexeme.str) { + case "-": + parser.currentClause.presence = lunr.Query.presence.PROHIBITED + break + case "+": + parser.currentClause.presence = lunr.Query.presence.REQUIRED + break + default: + var errorMessage = "unrecognised presence operator'" + lexeme.str + "'" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + var errorMessage = "expecting term or field, found nothing" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.FIELD: + return lunr.QueryParser.parseField + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expecting term or field, found '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseField = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + if (parser.query.allFields.indexOf(lexeme.str) == -1) { + var possibleFields = parser.query.allFields.map(function (f) { return "'" + f + "'" }).join(', '), + errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.fields = [lexeme.str] + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + var errorMessage = "expecting term, found nothing" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expecting term, found '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseTerm = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + parser.currentClause.term = lexeme.str.toLowerCase() + + if (lexeme.str.indexOf("*") != -1) { + parser.currentClause.usePipeline = false + } + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseEditDistance = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var editDistance = parseInt(lexeme.str, 10) + + if (isNaN(editDistance)) { + var errorMessage = "edit distance must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.editDistance = editDistance + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseBoost = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var boost = parseInt(lexeme.str, 10) + + if (isNaN(boost)) { + var errorMessage = "boost must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.boost = boost + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + + /** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ + ;(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like enviroments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + root.lunr = factory() + } + }(this, function () { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return lunr + })) +})(); diff --git a/node_modules/antora-lunr/supplemental_ui/js/vendor/search.js b/node_modules/antora-lunr/supplemental_ui/js/vendor/search.js new file mode 100644 index 00000000..f126abcd --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/js/vendor/search.js @@ -0,0 +1,227 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +/* eslint-env browser */ +window.antoraLunr = (function (lunr) { + const scriptAttrs = document.getElementById('search-script').dataset + const basePath = scriptAttrs.basePath + const pagePath = scriptAttrs.pagePath + var searchInput = document.getElementById('search-input') + var searchResult = document.createElement('div') + searchResult.classList.add('search-result-dropdown-menu') + searchInput.parentNode.appendChild(searchResult) + + function highlightText (doc, position) { + var hits = [] + var start = position[0] + var length = position[1] + + var text = doc.text + var highlightSpan = document.createElement('span') + highlightSpan.classList.add('search-result-highlight') + highlightSpan.innerText = text.substr(start, length) + + var end = start + length + var textEnd = text.length - 1 + var contextOffset = 15 + var contextAfter = end + contextOffset > textEnd ? textEnd : end + contextOffset + var contextBefore = start - contextOffset < 0 ? 0 : start - contextOffset + if (start === 0 && end === textEnd) { + hits.push(highlightSpan) + } else if (start === 0) { + hits.push(highlightSpan) + hits.push(document.createTextNode(text.substr(end, contextAfter))) + } else if (end === textEnd) { + hits.push(document.createTextNode(text.substr(0, start))) + hits.push(highlightSpan) + } else { + hits.push(document.createTextNode('...' + text.substr(contextBefore, start - contextBefore))) + hits.push(highlightSpan) + hits.push(document.createTextNode(text.substr(end, contextAfter - end) + '...')) + } + return hits + } + + function highlightTitle (hash, doc, position) { + var hits = [] + var start = position[0] + var length = position[1] + + var highlightSpan = document.createElement('span') + highlightSpan.classList.add('search-result-highlight') + var title + if (hash) { + title = doc.titles.filter(function (item) { + return item.id === hash + })[0].text + } else { + title = doc.title + } + highlightSpan.innerText = title.substr(start, length) + + var end = start + length + var titleEnd = title.length - 1 + if (start === 0 && end === titleEnd) { + hits.push(highlightSpan) + } else if (start === 0) { + hits.push(highlightSpan) + hits.push(document.createTextNode(title.substr(length, titleEnd))) + } else if (end === titleEnd) { + hits.push(document.createTextNode(title.substr(0, start))) + hits.push(highlightSpan) + } else { + hits.push(document.createTextNode(title.substr(0, start))) + hits.push(highlightSpan) + hits.push(document.createTextNode(title.substr(end, titleEnd))) + } + return hits + } + + function highlightHit (metadata, hash, doc) { + var hits = [] + for (var token in metadata) { + var fields = metadata[token] + for (var field in fields) { + var positions = fields[field] + if (positions.position) { + var position = positions.position[0] // only higlight the first match + if (field === 'title') { + hits = highlightTitle(hash, doc, position) + } else if (field === 'text') { + hits = highlightText(doc, position) + } + } + } + } + return hits + } + + function createSearchResult(result, store, searchResultDataset) { + result.forEach(function (item) { + var url = item.ref + var hash + if (url.includes('#')) { + hash = url.substring(url.indexOf('#') + 1) + url = url.replace('#' + hash, '') + } + var doc = store[url] + var metadata = item.matchData.metadata + var hits = highlightHit(metadata, hash, doc) + searchResultDataset.appendChild(createSearchResultItem(doc, item, hits)) + }) + } + + function createSearchResultItem (doc, item, hits) { + var documentTitle = document.createElement('div') + documentTitle.classList.add('search-result-document-title') + documentTitle.innerText = doc.title + var documentHit = document.createElement('div') + documentHit.classList.add('search-result-document-hit') + var documentHitLink = document.createElement('a') + var rootPath = basePath + documentHitLink.href = rootPath + item.ref + documentHit.appendChild(documentHitLink) + hits.forEach(function (hit) { + documentHitLink.appendChild(hit) + }) + var searchResultItem = document.createElement('div') + searchResultItem.classList.add('search-result-item') + searchResultItem.appendChild(documentTitle) + searchResultItem.appendChild(documentHit) + searchResultItem.addEventListener('mousedown', function (e) { + e.preventDefault() + }) + return searchResultItem + } + + function createNoResult (text) { + var searchResultItem = document.createElement('div') + searchResultItem.classList.add('search-result-item') + var documentHit = document.createElement('div') + documentHit.classList.add('search-result-document-hit') + var message = document.createElement('strong') + message.innerText = 'No results found for query "' + text + '"' + documentHit.appendChild(message) + searchResultItem.appendChild(documentHit) + return searchResultItem + } + + function search (index, text) { + // execute an exact match search + var result = index.search(text) + if (result.length > 0) { + return result + } + // no result, use a begins with search + result = index.search(text + '*') + if (result.length > 0) { + return result + } + // no result, use a contains search + result = index.search('*' + text + '*') + return result + } + + function searchIndex (index, store, text) { + // reset search result + while (searchResult.firstChild) { + searchResult.removeChild(searchResult.firstChild) + } + if (text.trim() === '') { + return + } + var result = search(index, text) + var searchResultDataset = document.createElement('div') + searchResultDataset.classList.add('search-result-dataset') + searchResult.appendChild(searchResultDataset) + if (result.length > 0) { + createSearchResult(result, store, searchResultDataset) + } else { + searchResultDataset.appendChild(createNoResult(text)) + } + } + + function debounce (func, wait, immediate) { + var timeout + return function () { + var context = this + var args = arguments + var later = function () { + timeout = null + if (!immediate) func.apply(context, args) + } + var callNow = immediate && !timeout + clearTimeout(timeout) + timeout = setTimeout(later, wait) + if (callNow) func.apply(context, args) + } + } + + function init (data) { + var index = Object.assign({index: lunr.Index.load(data.index), store: data.store}) + var search = debounce(function () { + searchIndex(index.index, index.store, searchInput.value) + }, 100) + searchInput.addEventListener('keydown', search) + + // this is prevented in case of mousedown attached to SearchResultItem + searchInput.addEventListener('blur', function (e) { + while (searchResult.firstChild) { + searchResult.removeChild(searchResult.firstChild) + } + }) + } + + return { + init: init, + } +})(window.lunr) diff --git a/node_modules/antora-lunr/supplemental_ui/partials/footer-scripts.hbs b/node_modules/antora-lunr/supplemental_ui/partials/footer-scripts.hbs new file mode 100644 index 00000000..9af969f2 --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/partials/footer-scripts.hbs @@ -0,0 +1,7 @@ + +{{#if (eq env.DOCSEARCH_ENGINE 'lunr')}} + + + +{{/if}} + diff --git a/node_modules/antora-lunr/supplemental_ui/partials/head-meta.hbs b/node_modules/antora-lunr/supplemental_ui/partials/head-meta.hbs new file mode 100644 index 00000000..c9883c2b --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/partials/head-meta.hbs @@ -0,0 +1 @@ + diff --git a/node_modules/antora-lunr/supplemental_ui/partials/header-content.hbs b/node_modules/antora-lunr/supplemental_ui/partials/header-content.hbs new file mode 100644 index 00000000..bdc62714 --- /dev/null +++ b/node_modules/antora-lunr/supplemental_ui/partials/header-content.hbs @@ -0,0 +1,35 @@ + diff --git a/node_modules/boolbase/README.md b/node_modules/boolbase/README.md new file mode 100644 index 00000000..85eefa5e --- /dev/null +++ b/node_modules/boolbase/README.md @@ -0,0 +1,10 @@ +#boolbase +This very simple module provides two basic functions, one that always returns true (`trueFunc`) and one that always returns false (`falseFunc`). + +###WTF? + +By having only a single instance of these functions around, it's possible to do some nice optimizations. Eg. [`CSSselect`](https://github.com/fb55/CSSselect) uses these functions to determine whether a selector won't match any elements. If that's the case, the DOM doesn't even have to be touched. + +###And why is this a separate module? + +I'm trying to modularize `CSSselect` and most modules depend on these functions. IMHO, having a separate module is the easiest solution to this problem. \ No newline at end of file diff --git a/node_modules/boolbase/index.js b/node_modules/boolbase/index.js new file mode 100644 index 00000000..a5dfa71c --- /dev/null +++ b/node_modules/boolbase/index.js @@ -0,0 +1,20 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +module.exports = { + trueFunc: function trueFunc(){ + return true; + }, + falseFunc: function falseFunc(){ + return false; + } +}; \ No newline at end of file diff --git a/node_modules/boolbase/package.json b/node_modules/boolbase/package.json new file mode 100644 index 00000000..78330a8f --- /dev/null +++ b/node_modules/boolbase/package.json @@ -0,0 +1,23 @@ +{ + "name": "boolbase", + "version": "1.0.0", + "description": "two functions: One that returns true, one that returns false", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/fb55/boolbase" + }, + "keywords": [ + "boolean", + "function" + ], + "author": "Felix Boehm ", + "license": "ISC", + "bugs": { + "url": "https://github.com/fb55/boolbase/issues" + }, + "homepage": "https://github.com/fb55/boolbase" +} diff --git a/node_modules/cheerio-select/LICENSE b/node_modules/cheerio-select/LICENSE new file mode 100644 index 00000000..c464f863 --- /dev/null +++ b/node_modules/cheerio-select/LICENSE @@ -0,0 +1,11 @@ +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/cheerio-select/README.md b/node_modules/cheerio-select/README.md new file mode 100644 index 00000000..140a661d --- /dev/null +++ b/node_modules/cheerio-select/README.md @@ -0,0 +1,18 @@ +# cheerio-select [![NPM version](http://img.shields.io/npm/v/cheerio-select.svg)](https://npmjs.org/package/cheerio-select) [![Build Status](https://travis-ci.org/cheeriojs/cheerio-select.svg?branch=master)](http://travis-ci.org/cheeriojs/cheerio-select) [![Downloads](https://img.shields.io/npm/dm/cheerio-select.svg)](https://npmjs.org/package/cheerio-select) [![Coverage](https://coveralls.io/repos/cheeriojs/cheerio-select/badge.svg?branch=master)](https://coveralls.io/r/cheeriojs/cheerio-select) + +CSS selector engine supporting jQuery selectors, based on [`css-select`](https://github.com/fb55/css-select). + +Supports all jQuery positional pseudo-selectors: + +- `:first` +- `:last` +- `:eq` +- `:nth` +- `:gt` +- `:lt` +- `:even` +- `:odd` +- `:not(:positional)`, where `:positional` is any of the above. + +This library is a thin wrapper around [`css-select`](https://github.com/fb55/css-select). +Only use this module if you will actually use jQuery positional selectors. diff --git a/node_modules/cheerio-select/lib/esm/helpers.d.ts b/node_modules/cheerio-select/lib/esm/helpers.d.ts new file mode 100644 index 00000000..0b791490 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/helpers.d.ts @@ -0,0 +1,18 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { AnyNode } from "domhandler"; +import type { Selector } from "css-what"; +export declare function getDocumentRoot(node: AnyNode): AnyNode; +export declare function groupSelectors(selectors: Selector[][]): [plain: Selector[][], filtered: Selector[][]]; +//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.d.ts.map b/node_modules/cheerio-select/lib/esm/helpers.d.ts.map new file mode 100644 index 00000000..689bf8d4 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/helpers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,QAAQ,EAAE,EAAE,GACxB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,CAa/C"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.js b/node_modules/cheerio-select/lib/esm/helpers.js new file mode 100644 index 00000000..5c25d763 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/helpers.js @@ -0,0 +1,32 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +import { isFilter } from "./positionals.js"; +export function getDocumentRoot(node) { + while (node.parent) + node = node.parent; + return node; +} +export function groupSelectors(selectors) { + const filteredSelectors = []; + const plainSelectors = []; + for (const selector of selectors) { + if (selector.some(isFilter)) { + filteredSelectors.push(selector); + } + else { + plainSelectors.push(selector); + } + } + return [plainSelectors, filteredSelectors]; +} +//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.js.map b/node_modules/cheerio-select/lib/esm/helpers.js.map new file mode 100644 index 00000000..2ad294d0 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/helpers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,UAAU,eAAe,CAAC,IAAa;IACzC,OAAO,IAAI,CAAC,MAAM;QAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,cAAc,CAC1B,SAAuB;IAEvB,MAAM,iBAAiB,GAAiB,EAAE,CAAC;IAC3C,MAAM,cAAc,GAAiB,EAAE,CAAC;IAExC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAC9B,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpC;aAAM;YACH,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;KACJ;IAED,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.d.ts b/node_modules/cheerio-select/lib/esm/index.d.ts new file mode 100644 index 00000000..56df1566 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/index.d.ts @@ -0,0 +1,25 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import { type Options as CSSSelectOptions } from "css-select"; +import type { Element, AnyNode, Document } from "domhandler"; +export { filters, pseudos, aliases } from "css-select"; +export interface Options extends CSSSelectOptions { + /** Optional reference to the root of the document. If not set, this will be computed when needed. */ + root?: Document; +} +export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean; +export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean; +export declare function filter(selector: string, elements: AnyNode[], options?: Options): Element[]; +export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.d.ts.map b/node_modules/cheerio-select/lib/esm/index.d.ts.map new file mode 100644 index 00000000..4127f838 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,IAAI,gBAAgB,EAEnC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYvD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/D,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAET;AAED,wBAAgB,IAAI,CAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAWT;AAsCD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAEX;AAoGD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,GAAE,OAAY,EACrB,KAAK,SAAW,GACjB,OAAO,EAAE,CA2BX"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.js b/node_modules/cheerio-select/lib/esm/index.js new file mode 100644 index 00000000..2e0b77ff --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/index.js @@ -0,0 +1,253 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +import { parse, SelectorType, isTraversal } from "css-what"; +import { _compileToken as compileToken, prepareContext, } from "css-select"; +import * as DomUtils from "domutils"; +import * as boolbase from "boolbase"; +import { getDocumentRoot, groupSelectors } from "./helpers.js"; +import { isFilter, getLimit, } from "./positionals.js"; +// Re-export pseudo extension points +export { filters, pseudos, aliases } from "css-select"; +const UNIVERSAL_SELECTOR = { + type: SelectorType.Universal, + namespace: null, +}; +const SCOPE_PSEUDO = { + type: SelectorType.Pseudo, + name: "scope", + data: null, +}; +export function is(element, selector, options = {}) { + return some([element], selector, options); +} +export function some(elements, selector, options = {}) { + if (typeof selector === "function") + return elements.some(selector); + const [plain, filtered] = groupSelectors(parse(selector)); + return ((plain.length > 0 && elements.some(compileToken(plain, options))) || + filtered.some((sel) => filterBySelector(sel, elements, options).length > 0)); +} +function filterByPosition(filter, elems, data, options) { + const num = typeof data === "string" ? parseInt(data, 10) : NaN; + switch (filter) { + case "first": + case "lt": + // Already done in `getLimit` + return elems; + case "last": + return elems.length > 0 ? [elems[elems.length - 1]] : elems; + case "nth": + case "eq": + return isFinite(num) && Math.abs(num) < elems.length + ? [num < 0 ? elems[elems.length + num] : elems[num]] + : []; + case "gt": + return isFinite(num) ? elems.slice(num + 1) : []; + case "even": + return elems.filter((_, i) => i % 2 === 0); + case "odd": + return elems.filter((_, i) => i % 2 === 1); + case "not": { + const filtered = new Set(filterParsed(data, elems, options)); + return elems.filter((e) => !filtered.has(e)); + } + } +} +export function filter(selector, elements, options = {}) { + return filterParsed(parse(selector), elements, options); +} +/** + * Filter a set of elements by a selector. + * + * Will return elements in the original order. + * + * @param selector Selector to filter by. + * @param elements Elements to filter. + * @param options Options for selector. + */ +function filterParsed(selector, elements, options) { + if (elements.length === 0) + return []; + const [plainSelectors, filteredSelectors] = groupSelectors(selector); + let found; + if (plainSelectors.length) { + const filtered = filterElements(elements, plainSelectors, options); + // If there are no filters, just return + if (filteredSelectors.length === 0) { + return filtered; + } + // Otherwise, we have to do some filtering + if (filtered.length) { + found = new Set(filtered); + } + } + for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { + const filteredSelector = filteredSelectors[i]; + const missing = found + ? elements.filter((e) => DomUtils.isTag(e) && !found.has(e)) + : elements; + if (missing.length === 0) + break; + const filtered = filterBySelector(filteredSelector, elements, options); + if (filtered.length) { + if (!found) { + /* + * If we haven't found anything before the last selector, + * just return what we found now. + */ + if (i === filteredSelectors.length - 1) { + return filtered; + } + found = new Set(filtered); + } + else { + filtered.forEach((el) => found.add(el)); + } + } + } + return typeof found !== "undefined" + ? (found.size === elements.length + ? elements + : // Filter elements to preserve order + elements.filter((el) => found.has(el))) + : []; +} +function filterBySelector(selector, elements, options) { + var _a; + if (selector.some(isTraversal)) { + /* + * Get root node, run selector with the scope + * set to all of our nodes. + */ + const root = (_a = options.root) !== null && _a !== void 0 ? _a : getDocumentRoot(elements[0]); + const opts = { ...options, context: elements, relativeSelector: false }; + selector.push(SCOPE_PSEUDO); + return findFilterElements(root, selector, opts, true, elements.length); + } + // Performance optimization: If we don't have to traverse, just filter set. + return findFilterElements(elements, selector, options, false, elements.length); +} +export function select(selector, root, options = {}, limit = Infinity) { + if (typeof selector === "function") { + return find(root, selector); + } + const [plain, filtered] = groupSelectors(parse(selector)); + const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit)); + // Plain selectors can be queried in a single go + if (plain.length) { + results.push(findElements(root, plain, options, limit)); + } + if (results.length === 0) { + return []; + } + // If there was only a single selector, just return the result + if (results.length === 1) { + return results[0]; + } + // Sort results, filtering for duplicates + return DomUtils.uniqueSort(results.reduce((a, b) => [...a, ...b])); +} +/** + * + * @param root Element(s) to search from. + * @param selector Selector to look for. + * @param options Options for querying. + * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal. + */ +function findFilterElements(root, selector, options, queryForSelector, totalLimit) { + const filterIndex = selector.findIndex(isFilter); + const sub = selector.slice(0, filterIndex); + const filter = selector[filterIndex]; + // If we are at the end of the selector, we can limit the number of elements to retrieve. + const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; + /* + * Set the number of elements to retrieve. + * Eg. for :first, we only have to get a single element. + */ + const limit = getLimit(filter.name, filter.data, partLimit); + if (limit === 0) + return []; + /* + * Skip `findElements` call if our selector starts with a positional + * pseudo. + */ + const elemsNoLimit = sub.length === 0 && !Array.isArray(root) + ? DomUtils.getChildren(root).filter(DomUtils.isTag) + : sub.length === 0 + ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag) + : queryForSelector || sub.some(isTraversal) + ? findElements(root, [sub], options, limit) + : filterElements(root, [sub], options); + const elems = elemsNoLimit.slice(0, limit); + let result = filterByPosition(filter.name, elems, filter.data, options); + if (result.length === 0 || selector.length === filterIndex + 1) { + return result; + } + const remainingSelector = selector.slice(filterIndex + 1); + const remainingHasTraversal = remainingSelector.some(isTraversal); + if (remainingHasTraversal) { + if (isTraversal(remainingSelector[0])) { + const { type } = remainingSelector[0]; + if (type === SelectorType.Sibling || + type === SelectorType.Adjacent) { + // If we have a sibling traversal, we need to also look at the siblings. + result = prepareContext(result, DomUtils, true); + } + // Avoid a traversal-first selector error. + remainingSelector.unshift(UNIVERSAL_SELECTOR); + } + options = { + ...options, + // Avoid absolutizing the selector + relativeSelector: false, + /* + * Add a custom root func, to make sure traversals don't match elements + * that aren't a part of the considered tree. + */ + rootFunc: (el) => result.includes(el), + }; + } + else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) { + options = { ...options, rootFunc: boolbase.trueFunc }; + } + /* + * If we have another filter, recursively call `findFilterElements`, + * with the `recursive` flag disabled. We only have to look for more + * elements when we see a traversal. + * + * Otherwise, + */ + return remainingSelector.some(isFilter) + ? findFilterElements(result, remainingSelector, options, false, totalLimit) + : remainingHasTraversal + ? // Query existing elements to resolve traversal. + findElements(result, [remainingSelector], options, totalLimit) + : // If we don't have any more traversals, simply filter elements. + filterElements(result, [remainingSelector], options); +} +function findElements(root, sel, options, limit) { + const query = compileToken(sel, options, root); + return find(root, query, limit); +} +function find(root, query, limit = Infinity) { + const elems = prepareContext(root, DomUtils, query.shouldTestNextSiblings); + return DomUtils.find((node) => DomUtils.isTag(node) && query(node), elems, true, limit); +} +function filterElements(elements, sel, options) { + const els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag); + if (els.length === 0) + return els; + const query = compileToken(sel, options); + return query === boolbase.trueFunc ? els : els.filter(query); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.js.map b/node_modules/cheerio-select/lib/esm/index.js.map new file mode 100644 index 00000000..ed9f1582 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAiB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EACH,aAAa,IAAI,YAAY,EAE7B,cAAc,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAEH,QAAQ,EAER,QAAQ,GACX,MAAM,kBAAkB,CAAC;AAE1B,oCAAoC;AACpC,OAAO,EA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,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAChE,QAAQ,CAAC,KAAK,CACjB,CAAC;IAEF,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAEjC,MAAM,KAAK,GAAG,YAAY,CAAmB,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,OAAO,KAAK,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/package.json b/node_modules/cheerio-select/lib/esm/package.json new file mode 100644 index 00000000..089153bc --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/node_modules/cheerio-select/lib/esm/positionals.d.ts b/node_modules/cheerio-select/lib/esm/positionals.d.ts new file mode 100644 index 00000000..d114c6dd --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/positionals.d.ts @@ -0,0 +1,23 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { Selector, PseudoSelector } from "css-what"; +export declare type Filter = "first" | "last" | "eq" | "nth" | "gt" | "lt" | "even" | "odd" | "not"; +export declare const filterNames: Set; +export interface CheerioSelector extends PseudoSelector { + name: Filter; + data: string | null; +} +export declare function isFilter(s: Selector): s is CheerioSelector; +export declare function getLimit(filter: Filter, data: string | null, partLimit: number): number; +//# sourceMappingURL=positionals.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.d.ts.map b/node_modules/cheerio-select/lib/esm/positionals.d.ts.map new file mode 100644 index 00000000..0e0db373 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/positionals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"positionals.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,oBAAY,MAAM,GACZ,OAAO,GACP,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AACZ,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CASlC,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,eAAe,CAS1D;AAED,wBAAgB,QAAQ,CACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,CAyBR"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.js b/node_modules/cheerio-select/lib/esm/positionals.js new file mode 100644 index 00000000..d4f6c8e4 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/positionals.js @@ -0,0 +1,59 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +export const filterNames = new Set([ + "first", + "last", + "eq", + "gt", + "nth", + "lt", + "even", + "odd", +]); +export function isFilter(s) { + if (s.type !== "pseudo") + return false; + if (filterNames.has(s.name)) + return true; + if (s.name === "not" && Array.isArray(s.data)) { + // Only consider `:not` with embedded filters + return s.data.some((s) => s.some(isFilter)); + } + return false; +} +export function getLimit(filter, data, partLimit) { + const num = data != null ? parseInt(data, 10) : NaN; + switch (filter) { + case "first": + return 1; + case "nth": + case "eq": + return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0; + case "lt": + return isFinite(num) + ? num >= 0 + ? Math.min(num, partLimit) + : Infinity + : 0; + case "gt": + return isFinite(num) ? Infinity : 0; + case "odd": + return 2 * partLimit; + case "even": + return 2 * partLimit - 1; + case "last": + case "not": + return Infinity; + } +} +//# sourceMappingURL=positionals.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.js.map b/node_modules/cheerio-select/lib/esm/positionals.js.map new file mode 100644 index 00000000..0b26c248 --- /dev/null +++ b/node_modules/cheerio-select/lib/esm/positionals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"positionals.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,WAAW,GAAgB,IAAI,GAAG,CAAS;IACpD,OAAO;IACP,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;CACR,CAAC,CAAC;AAOH,MAAM,UAAU,QAAQ,CAAC,CAAW;IAChC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,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ACP,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;QAC7B,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACN,OAAO,QAAQ,CAAC;KACvB;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.d.ts b/node_modules/cheerio-select/lib/helpers.d.ts new file mode 100644 index 00000000..0b791490 --- /dev/null +++ b/node_modules/cheerio-select/lib/helpers.d.ts @@ -0,0 +1,18 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { AnyNode } from "domhandler"; +import type { Selector } from "css-what"; +export declare function getDocumentRoot(node: AnyNode): AnyNode; +export declare function groupSelectors(selectors: Selector[][]): [plain: Selector[][], filtered: Selector[][]]; +//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.d.ts.map b/node_modules/cheerio-select/lib/helpers.d.ts.map new file mode 100644 index 00000000..689bf8d4 --- /dev/null +++ b/node_modules/cheerio-select/lib/helpers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,QAAQ,EAAE,EAAE,GACxB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,CAa/C"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.js b/node_modules/cheerio-select/lib/helpers.js new file mode 100644 index 00000000..2060516e --- /dev/null +++ b/node_modules/cheerio-select/lib/helpers.js @@ -0,0 +1,38 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.groupSelectors = exports.getDocumentRoot = void 0; +var positionals_js_1 = require("./positionals.js"); +function getDocumentRoot(node) { + while (node.parent) + node = node.parent; + return node; +} +exports.getDocumentRoot = getDocumentRoot; +function groupSelectors(selectors) { + var filteredSelectors = []; + var plainSelectors = []; + for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) { + var selector = selectors_1[_i]; + if (selector.some(positionals_js_1.isFilter)) { + filteredSelectors.push(selector); + } + else { + plainSelectors.push(selector); + } + } + return [plainSelectors, filteredSelectors]; +} +exports.groupSelectors = groupSelectors; +//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.js.map b/node_modules/cheerio-select/lib/helpers.js.map new file mode 100644 index 00000000..95bf143f --- /dev/null +++ b/node_modules/cheerio-select/lib/helpers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":";;;AAEA,mDAA4C;AAE5C,SAAgB,eAAe,CAAC,IAAa;IACzC,OAAO,IAAI,CAAC,MAAM;QAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAHD,0CAGC;AAED,SAAgB,cAAc,CAC1B,SAAuB;IAEvB,IAAM,iBAAiB,GAAiB,EAAE,CAAC;IAC3C,IAAM,cAAc,GAAiB,EAAE,CAAC;IAExC,KAAuB,UAAS,EAAT,uBAAS,EAAT,uBAAS,EAAT,IAAS,EAAE;QAA7B,IAAM,QAAQ,kBAAA;QACf,IAAI,QAAQ,CAAC,IAAI,CAAC,yBAAQ,CAAC,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpC;aAAM;YACH,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;KACJ;IAED,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAC/C,CAAC;AAfD,wCAeC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.d.ts b/node_modules/cheerio-select/lib/index.d.ts new file mode 100644 index 00000000..56df1566 --- /dev/null +++ b/node_modules/cheerio-select/lib/index.d.ts @@ -0,0 +1,25 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import { type Options as CSSSelectOptions } from "css-select"; +import type { Element, AnyNode, Document } from "domhandler"; +export { filters, pseudos, aliases } from "css-select"; +export interface Options extends CSSSelectOptions { + /** Optional reference to the root of the document. If not set, this will be computed when needed. */ + root?: Document; +} +export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean; +export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean; +export declare function filter(selector: string, elements: AnyNode[], options?: Options): Element[]; +export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.d.ts.map b/node_modules/cheerio-select/lib/index.d.ts.map new file mode 100644 index 00000000..4127f838 --- /dev/null +++ b/node_modules/cheerio-select/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,IAAI,gBAAgB,EAEnC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYvD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/D,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAET;AAED,wBAAgB,IAAI,CAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAWT;AAsCD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAEX;AAoGD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,GAAE,OAAY,EACrB,KAAK,SAAW,GACjB,OAAO,EAAE,CA2BX"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.js b/node_modules/cheerio-select/lib/index.js new file mode 100644 index 00000000..a8ff1ad1 --- /dev/null +++ b/node_modules/cheerio-select/lib/index.js @@ -0,0 +1,314 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.select = exports.filter = exports.some = exports.is = exports.aliases = exports.pseudos = exports.filters = void 0; +var css_what_1 = require("css-what"); +var css_select_1 = require("css-select"); +var DomUtils = __importStar(require("domutils")); +var boolbase = __importStar(require("boolbase")); +var helpers_js_1 = require("./helpers.js"); +var positionals_js_1 = require("./positionals.js"); +// Re-export pseudo extension points +var css_select_2 = require("css-select"); +Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return css_select_2.filters; } }); +Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return css_select_2.pseudos; } }); +Object.defineProperty(exports, "aliases", { enumerable: true, get: function () { return css_select_2.aliases; } }); +var UNIVERSAL_SELECTOR = { + type: css_what_1.SelectorType.Universal, + namespace: null, +}; +var SCOPE_PSEUDO = { + type: css_what_1.SelectorType.Pseudo, + name: "scope", + data: null, +}; +function is(element, selector, options) { + if (options === void 0) { options = {}; } + return some([element], selector, options); +} +exports.is = is; +function some(elements, selector, options) { + if (options === void 0) { options = {}; } + if (typeof selector === "function") + return elements.some(selector); + var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; + return ((plain.length > 0 && elements.some((0, css_select_1._compileToken)(plain, options))) || + filtered.some(function (sel) { return filterBySelector(sel, elements, options).length > 0; })); +} +exports.some = some; +function filterByPosition(filter, elems, data, options) { + var num = typeof data === "string" ? parseInt(data, 10) : NaN; + switch (filter) { + case "first": + case "lt": + // Already done in `getLimit` + return elems; + case "last": + return elems.length > 0 ? [elems[elems.length - 1]] : elems; + case "nth": + case "eq": + return isFinite(num) && Math.abs(num) < elems.length + ? [num < 0 ? elems[elems.length + num] : elems[num]] + : []; + case "gt": + return isFinite(num) ? elems.slice(num + 1) : []; + case "even": + return elems.filter(function (_, i) { return i % 2 === 0; }); + case "odd": + return elems.filter(function (_, i) { return i % 2 === 1; }); + case "not": { + var filtered_1 = new Set(filterParsed(data, elems, options)); + return elems.filter(function (e) { return !filtered_1.has(e); }); + } + } +} +function filter(selector, elements, options) { + if (options === void 0) { options = {}; } + return filterParsed((0, css_what_1.parse)(selector), elements, options); +} +exports.filter = filter; +/** + * Filter a set of elements by a selector. + * + * Will return elements in the original order. + * + * @param selector Selector to filter by. + * @param elements Elements to filter. + * @param options Options for selector. + */ +function filterParsed(selector, elements, options) { + if (elements.length === 0) + return []; + var _a = (0, helpers_js_1.groupSelectors)(selector), plainSelectors = _a[0], filteredSelectors = _a[1]; + var found; + if (plainSelectors.length) { + var filtered = filterElements(elements, plainSelectors, options); + // If there are no filters, just return + if (filteredSelectors.length === 0) { + return filtered; + } + // Otherwise, we have to do some filtering + if (filtered.length) { + found = new Set(filtered); + } + } + for (var i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { + var filteredSelector = filteredSelectors[i]; + var missing = found + ? elements.filter(function (e) { return DomUtils.isTag(e) && !found.has(e); }) + : elements; + if (missing.length === 0) + break; + var filtered = filterBySelector(filteredSelector, elements, options); + if (filtered.length) { + if (!found) { + /* + * If we haven't found anything before the last selector, + * just return what we found now. + */ + if (i === filteredSelectors.length - 1) { + return filtered; + } + found = new Set(filtered); + } + else { + filtered.forEach(function (el) { return found.add(el); }); + } + } + } + return typeof found !== "undefined" + ? (found.size === elements.length + ? elements + : // Filter elements to preserve order + elements.filter(function (el) { + return found.has(el); + })) + : []; +} +function filterBySelector(selector, elements, options) { + var _a; + if (selector.some(css_what_1.isTraversal)) { + /* + * Get root node, run selector with the scope + * set to all of our nodes. + */ + var root = (_a = options.root) !== null && _a !== void 0 ? _a : (0, helpers_js_1.getDocumentRoot)(elements[0]); + var opts = __assign(__assign({}, options), { context: elements, relativeSelector: false }); + selector.push(SCOPE_PSEUDO); + return findFilterElements(root, selector, opts, true, elements.length); + } + // Performance optimization: If we don't have to traverse, just filter set. + return findFilterElements(elements, selector, options, false, elements.length); +} +function select(selector, root, options, limit) { + if (options === void 0) { options = {}; } + if (limit === void 0) { limit = Infinity; } + if (typeof selector === "function") { + return find(root, selector); + } + var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; + var results = filtered.map(function (sel) { + return findFilterElements(root, sel, options, true, limit); + }); + // Plain selectors can be queried in a single go + if (plain.length) { + results.push(findElements(root, plain, options, limit)); + } + if (results.length === 0) { + return []; + } + // If there was only a single selector, just return the result + if (results.length === 1) { + return results[0]; + } + // Sort results, filtering for duplicates + return DomUtils.uniqueSort(results.reduce(function (a, b) { return __spreadArray(__spreadArray([], a, true), b, true); })); +} +exports.select = select; +/** + * + * @param root Element(s) to search from. + * @param selector Selector to look for. + * @param options Options for querying. + * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal. + */ +function findFilterElements(root, selector, options, queryForSelector, totalLimit) { + var filterIndex = selector.findIndex(positionals_js_1.isFilter); + var sub = selector.slice(0, filterIndex); + var filter = selector[filterIndex]; + // If we are at the end of the selector, we can limit the number of elements to retrieve. + var partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; + /* + * Set the number of elements to retrieve. + * Eg. for :first, we only have to get a single element. + */ + var limit = (0, positionals_js_1.getLimit)(filter.name, filter.data, partLimit); + if (limit === 0) + return []; + /* + * Skip `findElements` call if our selector starts with a positional + * pseudo. + */ + var elemsNoLimit = sub.length === 0 && !Array.isArray(root) + ? DomUtils.getChildren(root).filter(DomUtils.isTag) + : sub.length === 0 + ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag) + : queryForSelector || sub.some(css_what_1.isTraversal) + ? findElements(root, [sub], options, limit) + : filterElements(root, [sub], options); + var elems = elemsNoLimit.slice(0, limit); + var result = filterByPosition(filter.name, elems, filter.data, options); + if (result.length === 0 || selector.length === filterIndex + 1) { + return result; + } + var remainingSelector = selector.slice(filterIndex + 1); + var remainingHasTraversal = remainingSelector.some(css_what_1.isTraversal); + if (remainingHasTraversal) { + if ((0, css_what_1.isTraversal)(remainingSelector[0])) { + var type = remainingSelector[0].type; + if (type === css_what_1.SelectorType.Sibling || + type === css_what_1.SelectorType.Adjacent) { + // If we have a sibling traversal, we need to also look at the siblings. + result = (0, css_select_1.prepareContext)(result, DomUtils, true); + } + // Avoid a traversal-first selector error. + remainingSelector.unshift(UNIVERSAL_SELECTOR); + } + options = __assign(__assign({}, options), { + // Avoid absolutizing the selector + relativeSelector: false, + /* + * Add a custom root func, to make sure traversals don't match elements + * that aren't a part of the considered tree. + */ + rootFunc: function (el) { return result.includes(el); } }); + } + else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) { + options = __assign(__assign({}, options), { rootFunc: boolbase.trueFunc }); + } + /* + * If we have another filter, recursively call `findFilterElements`, + * with the `recursive` flag disabled. We only have to look for more + * elements when we see a traversal. + * + * Otherwise, + */ + return remainingSelector.some(positionals_js_1.isFilter) + ? findFilterElements(result, remainingSelector, options, false, totalLimit) + : remainingHasTraversal + ? // Query existing elements to resolve traversal. + findElements(result, [remainingSelector], options, totalLimit) + : // If we don't have any more traversals, simply filter elements. + filterElements(result, [remainingSelector], options); +} +function findElements(root, sel, options, limit) { + var query = (0, css_select_1._compileToken)(sel, options, root); + return find(root, query, limit); +} +function find(root, query, limit) { + if (limit === void 0) { limit = Infinity; } + var elems = (0, css_select_1.prepareContext)(root, DomUtils, query.shouldTestNextSiblings); + return DomUtils.find(function (node) { return DomUtils.isTag(node) && query(node); }, elems, true, limit); +} +function filterElements(elements, sel, options) { + var els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag); + if (els.length === 0) + return els; + var query = (0, css_select_1._compileToken)(sel, options); + return query === boolbase.trueFunc ? els : els.filter(query); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.js.map b/node_modules/cheerio-select/lib/index.js.map new file mode 100644 index 00000000..19a157ea --- /dev/null +++ b/node_modules/cheerio-select/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA2E;AAC3E,yCAIoB;AACpB,iDAAqC;AACrC,iDAAqC;AAErC,2CAA+D;AAC/D,mDAK0B;AAE1B,oCAAoC;AACpC,yCAAuD;AAA9C,qGAAA,OAAO,OAAA;AAAE,qGAAA,OAAO,OAAA;AAAE,qGAAA,OAAO,OAAA;AAElC,IAAM,kBAAkB,GAAa;IACjC,IAAI,EAAE,uBAAY,CAAC,SAAS;IAC5B,SAAS,EAAE,IAAI;CAClB,CAAC;AACF,IAAM,YAAY,GAAa;IAC3B,IAAI,EAAE,uBAAY,CAAC,MAAM;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;CACb,CAAC;AAOF,SAAgB,EAAE,CACd,OAAgB,EAChB,QAA6C,EAC7C,OAAqB;IAArB,wBAAA,EAAA,YAAqB;IAErB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAND,gBAMC;AAED,SAAgB,IAAI,CAChB,QAAmB,EACnB,QAA6C,EAC7C,OAAqB;IA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KAAK,GAAG,IAAA,0BAAY,EAAmB,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,OAAO,KAAK,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.d.ts b/node_modules/cheerio-select/lib/positionals.d.ts new file mode 100644 index 00000000..d114c6dd --- /dev/null +++ b/node_modules/cheerio-select/lib/positionals.d.ts @@ -0,0 +1,23 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { Selector, PseudoSelector } from "css-what"; +export declare type Filter = "first" | "last" | "eq" | "nth" | "gt" | "lt" | "even" | "odd" | "not"; +export declare const filterNames: Set; +export interface CheerioSelector extends PseudoSelector { + name: Filter; + data: string | null; +} +export declare function isFilter(s: Selector): s is CheerioSelector; +export declare function getLimit(filter: Filter, data: string | null, partLimit: number): number; +//# sourceMappingURL=positionals.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.d.ts.map b/node_modules/cheerio-select/lib/positionals.d.ts.map new file mode 100644 index 00000000..0e0db373 --- /dev/null +++ b/node_modules/cheerio-select/lib/positionals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"positionals.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,oBAAY,MAAM,GACZ,OAAO,GACP,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AACZ,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CASlC,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,eAAe,CAS1D;AAED,wBAAgB,QAAQ,CACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,CAyBR"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.js b/node_modules/cheerio-select/lib/positionals.js new file mode 100644 index 00000000..94c10883 --- /dev/null +++ b/node_modules/cheerio-select/lib/positionals.js @@ -0,0 +1,64 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getLimit = exports.isFilter = exports.filterNames = void 0; +exports.filterNames = new Set([ + "first", + "last", + "eq", + "gt", + "nth", + "lt", + "even", + "odd", +]); +function isFilter(s) { + if (s.type !== "pseudo") + return false; + if (exports.filterNames.has(s.name)) + return true; + if (s.name === "not" && Array.isArray(s.data)) { + // Only consider `:not` with embedded filters + return s.data.some(function (s) { return s.some(isFilter); }); + } + return false; +} +exports.isFilter = isFilter; +function getLimit(filter, data, partLimit) { + var num = data != null ? parseInt(data, 10) : NaN; + switch (filter) { + case "first": + return 1; + case "nth": + case "eq": + return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0; + case "lt": + return isFinite(num) + ? num >= 0 + ? Math.min(num, partLimit) + : Infinity + : 0; + case "gt": + return isFinite(num) ? Infinity : 0; + case "odd": + return 2 * partLimit; + case "even": + return 2 * partLimit - 1; + case "last": + case "not": + return Infinity; + } +} +exports.getLimit = getLimit; +//# sourceMappingURL=positionals.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.js.map b/node_modules/cheerio-select/lib/positionals.js.map new file mode 100644 index 00000000..eed1e884 --- /dev/null +++ b/node_modules/cheerio-select/lib/positionals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"positionals.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":";;;AAYa,QAAA,WAAW,GAAgB,IAAI,GAAG,CAAS;IACpD,OAAO;IACP,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;CACR,CAAC,CAAC;AAOH,SAAgB,QAAQ,CAAC,CAAW;IAChC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;QAC3C,6CAA6C;QAC7C,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAhB,CAAgB,CAAC,CAAC;KAC/C;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AATD,4BASC;AAED,SAAgB,QAAQ,CACpB,MAAc,EACd,IAAmB,EACnB,SAAiB;IAEjB,IAAM,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEpD,QAAQ,MAAM,EAAE;QACZ,KAAK,OAAO;YACR,OAAO,CAAC,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC;gBAChB,CAAC,CAAC,GAAG,IAAI,CAAC;oBACN,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC;oBAC1B,CAAC,CAAC,QAAQ;gBACd,CAAC,CAAC,CAAC,CAAC;QACZ,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,KAAK,KAAK;YACN,OAAO,CAAC,GAAG,SAAS,CAAC;QACzB,KAAK,MAAM;YACP,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;QAC7B,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACN,OAAO,QAAQ,CAAC;KACvB;AACL,CAAC;AA7BD,4BA6BC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/package.json b/node_modules/cheerio-select/package.json new file mode 100644 index 00000000..96b34cb4 --- /dev/null +++ b/node_modules/cheerio-select/package.json @@ -0,0 +1,76 @@ +{ + "name": "cheerio-select", + "description": "CSS selector engine supporting jQuery selectors", + "version": "2.1.0", + "author": "Felix Boehm ", + "funding": { + "url": "https://github.com/sponsors/fb55" + }, + "license": "BSD-2-Clause", + "sideEffects": false, + "repository": { + "type": "git", + "url": "git://github.com/cheeriojs/cheerio-select.git" + }, + "directories": { + "lib": "lib/" + }, + "main": "lib/index.js", + "types": "lib/index.d.ts", + "module": "lib/esm/index.js", + "exports": { + "require": "./lib/index.js", + "import": "./lib/esm/index.js" + }, + "files": [ + "lib/**/*" + ], + "scripts": { + "test": "npm run test:jest && npm run lint", + "test:jest": "jest", + "lint": "npm run lint:es && npm run lint:prettier", + "lint:es": "eslint src", + "lint:prettier": "npm run format:prettier:raw -- --check", + "format": "npm run format:es && npm run format:prettier", + "format:es": "npm run lint:es -- --fix", + "format:prettier": "npm run format:prettier:raw -- --write", + "format:prettier:raw": "prettier '**/*.{ts,md,json,yml}'", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/cheeriojs/cheerio-select/$(git rev-parse HEAD)/src/", + "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", + "prepare": "npm run build" + }, + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "devDependencies": { + "@types/boolbase": "^1.0.1", + "@types/jest": "^27.5.0", + "@types/node": "^17.0.33", + "@typescript-eslint/eslint-plugin": "^5.23.0", + "@typescript-eslint/parser": "^5.23.0", + "eslint": "^8.15.0", + "eslint-config-prettier": "^8.5.0", + "htmlparser2": "^8.0.1", + "jest": "^27.5.1", + "prettier": "^2.6.2", + "ts-jest": "^27.1.4", + "typescript": "^4.6.4" + }, + "jest": { + "preset": "ts-jest", + "testEnvironment": "node", + "coverageProvider": "v8", + "moduleNameMapper": { + "^(.*)\\.js$": "$1" + } + }, + "prettier": { + "tabWidth": 4 + } +} diff --git a/node_modules/cheerio/LICENSE b/node_modules/cheerio/LICENSE new file mode 100644 index 00000000..b0c8b193 --- /dev/null +++ b/node_modules/cheerio/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 The Cheerio contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/cheerio/Readme.md b/node_modules/cheerio/Readme.md new file mode 100644 index 00000000..2fba04f0 --- /dev/null +++ b/node_modules/cheerio/Readme.md @@ -0,0 +1,357 @@ +

cheerio

+ +
Fast, flexible & lean implementation of core jQuery designed specifically for the server.
+ + + +
+ +[中文文档 (Chinese Readme)](https://github.com/cheeriojs/cheerio/wiki/Chinese-README) + +```js +const cheerio = require('cheerio'); +const $ = cheerio.load('

Hello world

'); + +$('h2.title').text('Hello there!'); +$('h2').addClass('welcome'); + +$.html(); +//=>

Hello there!

+``` + +## Note + +We are currently working on the 1.0.0 release of cheerio on the `main` branch. The source code for the last published version, `0.22.0`, can be found [here](https://github.com/cheeriojs/cheerio/tree/aa90399c9c02f12432bfff97b8f1c7d8ece7c307). + +## Installation + +`npm install cheerio` + +## Features + +**❤ Familiar syntax:** +Cheerio implements a subset of core jQuery. Cheerio removes all the DOM inconsistencies and browser cruft from the jQuery library, revealing its truly gorgeous API. + +**ϟ Blazingly fast:** +Cheerio works with a very simple, consistent DOM model. As a result parsing, manipulating, and rendering are incredibly efficient. + +**❁ Incredibly flexible:** +Cheerio wraps around [parse5](https://github.com/inikulin/parse5) parser and can optionally use @FB55's forgiving [htmlparser2](https://github.com/fb55/htmlparser2/). Cheerio can parse nearly any HTML or XML document. + +## Cheerio is not a web browser + +Cheerio parses markup and provides an API for traversing/manipulating the resulting data structure. It does not interpret the result as a web browser does. Specifically, it does _not_ produce a visual rendering, apply CSS, load external resources, or execute JavaScript which is common for a SPA (single page application). This makes Cheerio **much, much faster than other solutions**. If your use case requires any of this functionality, you should consider browser automation software like [Puppeteer](https://github.com/puppeteer/puppeteer) and [Playwright](https://github.com/microsoft/playwright) or DOM emulation projects like [JSDom](https://github.com/jsdom/jsdom). + +## API + +### Markup example we'll be using: + +```html +
    +
  • Apple
  • +
  • Orange
  • +
  • Pear
  • +
+``` + +This is the HTML markup we will be using in all of the API examples. + +### Loading + +First you need to load in the HTML. This step in jQuery is implicit, since jQuery operates on the one, baked-in DOM. With Cheerio, we need to pass in the HTML document. + +This is the _preferred_ method: + +```js +// ES6 or TypeScript: +import * as cheerio from 'cheerio'; + +// In other environments: +const cheerio = require('cheerio'); + +const $ = cheerio.load('
    ...
'); + +$.html(); +//=>
    ...
+``` + +Similar to web browser contexts, `load` will introduce ``, ``, and `` elements if they are not already present. You can set `load`'s third argument to `false` to disable this. + +```js +const $ = cheerio.load('
    ...
', null, false); + +$.html(); +//=> '
    ...
' +``` + +Optionally, you can also load in the HTML by passing the string as the context: + +```js +$('ul', '
    ...
'); +``` + +Or as the root: + +```js +$('li', 'ul', '
    ...
'); +``` + +If you need to modify parsing options for XML input, you may pass an extra +object to `.load()`: + +```js +const $ = cheerio.load('
    ...
', { + xml: { + normalizeWhitespace: true, + }, +}); +``` + +The options in the `xml` object are taken directly from [htmlparser2](https://github.com/fb55/htmlparser2/wiki/Parser-options), therefore any options that can be used in `htmlparser2` are valid in cheerio as well. When `xml` is set, the default options are: + +```js +{ + xmlMode: true, + decodeEntities: true, // Decode HTML entities. + withStartIndices: false, // Add a `startIndex` property to nodes. + withEndIndices: false, // Add an `endIndex` property to nodes. +} +``` + +For a full list of options and their effects, see [domhandler](https://github.com/fb55/DomHandler) and +[htmlparser2's options](https://github.com/fb55/htmlparser2/wiki/Parser-options). + +#### Using `htmlparser2` + +Cheerio ships with two parsers, `parse5` and `htmlparser2`. The +former is the default for HTML, the latter the default for XML. + +Some users may wish to parse markup with the `htmlparser2` library, and +traverse/manipulate the resulting structure with Cheerio. This may be the case +for those upgrading from pre-1.0 releases of Cheerio (which relied on +`htmlparser2`), for those dealing with invalid markup (because `htmlparser2` is +more forgiving), or for those operating in performance-critical situations +(because `htmlparser2` may be faster in some cases). Note that "more forgiving" +means `htmlparser2` has error-correcting mechanisms that aren't always a match +for the standards observed by web browsers. This behavior may be useful when +parsing non-HTML content. + +To support these cases, `load` also accepts a `htmlparser2`-compatible data +structure as its first argument. Users may install `htmlparser2`, use it to +parse input, and pass the result to `load`: + +```js +// Usage as of htmlparser2 version 6: +const htmlparser2 = require('htmlparser2'); +const dom = htmlparser2.parseDocument(document, options); + +const $ = cheerio.load(dom); +``` + +If you want to save some bytes, you can use Cheerio's _slim_ export, which +always uses `htmlparser2`: + +```js +const cheerio = require('cheerio/lib/slim'); +``` + +### Selectors + +Cheerio's selector implementation is nearly identical to jQuery's, so the API is very similar. + +#### \$( selector, [context], [root] ) + +`selector` searches within the `context` scope which searches within the `root` scope. `selector` and `context` can be a string expression, DOM Element, array of DOM elements, or cheerio object. `root` is typically the HTML document string. + +This selector method is the starting point for traversing and manipulating the document. Like jQuery, it's the primary method for selecting elements in the document. + +```js +$('.apple', '#fruits').text(); +//=> Apple + +$('ul .pear').attr('class'); +//=> pear + +$('li[class=orange]').html(); +//=> Orange +``` + +##### XML Namespaces + +You can select with XML Namespaces but [due to the CSS specification](https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#attribute-selectors), the colon (`:`) needs to be escaped for the selector to be valid. + +```js +$('[xml\\:id="main"'); +``` + +### Rendering + +When you're ready to render the document, you can call the `html` method on the "root" selection: + +```js +$.root().html(); +//=> +// +// +//
    +//
  • Apple
  • +//
  • Orange
  • +//
  • Pear
  • +//
+// +// +``` + +If you want to render the [`outerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML) of a selection, you can use the `html` utility functon: + +```js +cheerio.html($('.pear')); +//=>
  • Pear
  • +``` + +You may also render the text content of a Cheerio object using the `text` static method: + +```js +const $ = cheerio.load('This is content.'); +cheerio.text($('body')); +//=> This is content. +``` + +### Plugins + +Once you have loaded a document, you may extend the prototype or the equivalent `fn` property with custom plugin methods: + +```js +const $ = cheerio.load('Hello, world!'); +$.prototype.logHtml = function () { + console.log(this.html()); +}; + +$('body').logHtml(); // logs "Hello, world!" to the console +``` + +If you're using TypeScript, you should add a type definition for your new method: + +```ts +declare module 'cheerio' { + interface Cheerio { + logHtml(this: Cheerio): void; + } +} +``` + +### The "DOM Node" object + +Cheerio collections are made up of objects that bear some resemblance to [browser-based DOM nodes](https://developer.mozilla.org/en-US/docs/Web/API/Node). You can expect them to define the following properties: + +- `tagName` +- `parentNode` +- `previousSibling` +- `nextSibling` +- `nodeValue` +- `firstChild` +- `childNodes` +- `lastChild` + +## Screencasts + +[https://vimeo.com/31950192](https://vimeo.com/31950192) + +> This video tutorial is a follow-up to Nettut's "How to Scrape Web Pages with Node.js and jQuery", using cheerio instead of JSDOM + jQuery. This video shows how easy it is to use cheerio and how much faster cheerio is than JSDOM + jQuery. + +## Cheerio in the real world + +Are you using cheerio in production? Add it to the [wiki](https://github.com/cheeriojs/cheerio/wiki/Cheerio-in-Production)! + +## Sponsors + +Does your company use Cheerio in production? Please consider [sponsoring this project](https://github.com/cheeriojs/cheerio?sponsor=1)! Your help will allow maintainers to dedicate more time and resources to its development and support. + + + + + GitHub + + + CryptoCasinos + + + Casinoonlineaams.com + + + Casinofiables.com + + + Apify + + + Free Bets + + + Casino utan svensk licens + + + Casino utan svensk licens + + + + +## Backers + +[Become a backer](https://github.com/cheeriojs/cheerio?sponsor=1) to show your support for Cheerio and help us maintain and improve this open source project. + + + + + Airbnb + + + Vasy Kafidoff + + + Espen Klem + + + Jarrod Davis + + + Nishant Singh + + + Gautham Chandra + + + Charles Severance + + + + +## Special Thanks + +This library stands on the shoulders of some incredible developers. A special thanks to: + +**• @FB55 for node-htmlparser2 & CSSSelect:** +Felix has a knack for writing speedy parsing engines. He completely re-wrote both @tautologistic's `node-htmlparser` and @harry's `node-soupselect` from the ground up, making both of them much faster and more flexible. Cheerio would not be possible without his foundational work + +**• @jQuery team for jQuery:** +The core API is the best of its class and despite dealing with all the browser inconsistencies the code base is extremely clean and easy to follow. Much of cheerio's implementation and documentation is from jQuery. Thanks guys. + +**• @visionmedia:** +The style, the structure, the open-source"-ness" of this library comes from studying TJ's style and using many of his libraries. This dude consistently pumps out high-quality libraries and has always been more than willing to help or answer questions. You rock TJ. + +## License + +MIT diff --git a/node_modules/cheerio/lib/api/attributes.d.ts b/node_modules/cheerio/lib/api/attributes.d.ts new file mode 100644 index 00000000..da6f06f2 --- /dev/null +++ b/node_modules/cheerio/lib/api/attributes.d.ts @@ -0,0 +1,345 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +/** + * Methods for getting and modifying attributes. + * + * @module cheerio/attributes + */ +import type { AnyNode, Element } from 'domhandler'; +import type { Cheerio } from '../cheerio.js'; +/** + * Method for getting attributes. Gets the attribute value for only the first + * element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * $('ul').attr('id'); + * //=> fruits + * ``` + * + * @param name - Name of the attribute. + * @returns The attribute's value. + * @see {@link https://api.jquery.com/attr/} + */ +export declare function attr(this: Cheerio, name: string): string | undefined; +/** + * Method for getting all attributes and their values of the first element in + * the matched set. + * + * @category Attributes + * @example + * + * ```js + * $('ul').attr(); + * //=> { id: 'fruits' } + * ``` + * + * @returns The attribute's values. + * @see {@link https://api.jquery.com/attr/} + */ +export declare function attr(this: Cheerio): Record | undefined; +/** + * Method for setting attributes. Sets the attribute value for only the first + * element in the matched set. If you set an attribute's value to `null`, you + * remove that attribute. You may also pass a `map` and `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.apple').attr('id', 'favorite').html(); + * //=>
  • Apple
  • + * ``` + * + * @param name - Name of the attribute. + * @param value - The new value of the attribute. + * @returns The instance itself. + * @see {@link https://api.jquery.com/attr/} + */ +export declare function attr(this: Cheerio, name: string, value?: string | null | ((this: Element, i: number, attrib: string) => string | null)): Cheerio; +/** + * Method for setting multiple attributes at once. Sets the attribute value for + * only the first element in the matched set. If you set an attribute's value to + * `null`, you remove that attribute. + * + * @category Attributes + * @example + * + * ```js + * $('.apple').attr({ id: 'favorite' }).html(); + * //=>
  • Apple
  • + * ``` + * + * @param values - Map of attribute names and values. + * @returns The instance itself. + * @see {@link https://api.jquery.com/attr/} + */ +export declare function attr(this: Cheerio, values: Record): Cheerio; +interface StyleProp { + length: number; + [key: string]: string | number; + [index: number]: string; +} +/** + * Method for getting and setting properties. Gets the property value for only + * the first element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * $('input[type="checkbox"]').prop('checked'); + * //=> false + * + * $('input[type="checkbox"]').prop('checked', true).val(); + * //=> ok + * ``` + * + * @param name - Name of the property. + * @param value - If specified set the property to this. + * @returns If `value` is specified the instance itself, otherwise the prop's value. + * @see {@link https://api.jquery.com/prop/} + */ +export declare function prop(this: Cheerio, name: 'tagName' | 'nodeName'): T extends Element ? string : undefined; +export declare function prop(this: Cheerio, name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent'): string | null; +/** Get a parsed CSS style object. */ +export declare function prop(this: Cheerio, name: 'style'): StyleProp | undefined; +/** + * Resolve `href` or `src` of supported elements. Requires the `baseURI` option + * to be set, and a global `URL` object to be part of the environment. + * + * @example With `baseURI` set to `'https://example.com'`: + * + * ```js + * $('').prop('src'); + * //=> 'https://example.com/image.png' + * ``` + */ +export declare function prop(this: Cheerio, name: 'href' | 'src'): string | undefined; +/** Get a property of an element. */ +export declare function prop(this: Cheerio, name: K): Element[K]; +/** Set a property of an element. */ +export declare function prop(this: Cheerio, name: K, value: Element[K] | ((this: Element, i: number, prop: K) => Element[keyof Element])): Cheerio; +export declare function prop(this: Cheerio, name: Record): Cheerio; +export declare function prop(this: Cheerio, name: string, value: string | boolean | null | ((this: Element, i: number, prop: string) => string | boolean)): Cheerio; +export declare function prop(this: Cheerio, name: string): string; +/** + * Method for getting data attributes, for only the first element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * $('
    ').data('apple-color'); + * //=> 'red' + * ``` + * + * @param name - Name of the data attribute. + * @returns The data attribute's value, or `undefined` if the attribute does not exist. + * @see {@link https://api.jquery.com/data/} + */ +export declare function data(this: Cheerio, name: string): unknown | undefined; +/** + * Method for getting all of an element's data attributes, for only the first + * element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * $('
    ').data(); + * //=> { appleColor: 'red' } + * ``` + * + * @returns A map with all of the data attributes. + * @see {@link https://api.jquery.com/data/} + */ +export declare function data(this: Cheerio): Record; +/** + * Method for setting data attributes, for only the first element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * const apple = $('.apple').data('kind', 'mac'); + * + * apple.data('kind'); + * //=> 'mac' + * ``` + * + * @param name - Name of the data attribute. + * @param value - The new value. + * @returns The instance itself. + * @see {@link https://api.jquery.com/data/} + */ +export declare function data(this: Cheerio, name: string, value: unknown): Cheerio; +/** + * Method for setting multiple data attributes at once, for only the first + * element in the matched set. + * + * @category Attributes + * @example + * + * ```js + * const apple = $('.apple').data({ kind: 'mac' }); + * + * apple.data('kind'); + * //=> 'mac' + * ``` + * + * @param values - Map of names to values. + * @returns The instance itself. + * @see {@link https://api.jquery.com/data/} + */ +export declare function data(this: Cheerio, values: Record): Cheerio; +/** + * Method for getting the value of input, select, and textarea. Note: Support + * for `map`, and `function` has not been added yet. + * + * @category Attributes + * @example + * + * ```js + * $('input[type="text"]').val(); + * //=> input_text + * ``` + * + * @returns The value. + * @see {@link https://api.jquery.com/val/} + */ +export declare function val(this: Cheerio): string | undefined | string[]; +/** + * Method for setting the value of input, select, and textarea. Note: Support + * for `map`, and `function` has not been added yet. + * + * @category Attributes + * @example + * + * ```js + * $('input[type="text"]').val('test').html(); + * //=> + * ``` + * + * @param value - The new value. + * @returns The instance itself. + * @see {@link https://api.jquery.com/val/} + */ +export declare function val(this: Cheerio, value: string | string[]): Cheerio; +/** + * Method for removing attributes by `name`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').removeAttr('class').html(); + * //=>
  • Pear
  • + * + * $('.apple').attr('id', 'favorite'); + * $('.apple').removeAttr('id class').html(); + * //=>
  • Apple
  • + * ``` + * + * @param name - Name of the attribute. + * @returns The instance itself. + * @see {@link https://api.jquery.com/removeAttr/} + */ +export declare function removeAttr(this: Cheerio, name: string): Cheerio; +/** + * Check to see if _any_ of the matched elements have the given `className`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').hasClass('pear'); + * //=> true + * + * $('apple').hasClass('fruit'); + * //=> false + * + * $('li').hasClass('pear'); + * //=> true + * ``` + * + * @param className - Name of the class. + * @returns Indicates if an element has the given `className`. + * @see {@link https://api.jquery.com/hasClass/} + */ +export declare function hasClass(this: Cheerio, className: string): boolean; +/** + * Adds class(es) to all of the matched elements. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').addClass('fruit').html(); + * //=>
  • Pear
  • + * + * $('.apple').addClass('fruit red').html(); + * //=>
  • Apple
  • + * ``` + * + * @param value - Name of new class. + * @returns The instance itself. + * @see {@link https://api.jquery.com/addClass/} + */ +export declare function addClass>(this: R, value?: string | ((this: Element, i: number, className: string) => string | undefined)): R; +/** + * Removes one or more space-separated classes from the selected elements. If no + * `className` is defined, all classes will be removed. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').removeClass('pear').html(); + * //=>
  • Pear
  • + * + * $('.apple').addClass('red').removeClass().html(); + * //=>
  • Apple
  • + * ``` + * + * @param name - Name of the class. If not specified, removes all elements. + * @returns The instance itself. + * @see {@link https://api.jquery.com/removeClass/} + */ +export declare function removeClass>(this: R, name?: string | ((this: Element, i: number, className: string) => string | undefined)): R; +/** + * Add or remove class(es) from the matched elements, depending on either the + * class's presence or the value of the switch argument. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.apple.green').toggleClass('fruit green red').html(); + * //=>
  • Apple
  • + * + * $('.apple.green').toggleClass('fruit green red', true).html(); + * //=>
  • Apple
  • + * ``` + * + * @param value - Name of the class. Can also be a function. + * @param stateVal - If specified the state of the class. + * @returns The instance itself. + * @see {@link https://api.jquery.com/toggleClass/} + */ +export declare function toggleClass>(this: R, value?: string | ((this: Element, i: number, className: string, stateVal?: boolean) => string), stateVal?: boolean): R; +export {}; +//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/attributes.d.ts.map b/node_modules/cheerio/lib/api/attributes.d.ts.map new file mode 100644 index 00000000..d333c5d1 --- /dev/null +++ b/node_modules/cheerio/lib/api/attributes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"attributes.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio/d1cbc66d53392ce8bf6cd0068f675836372d2bf3/src/","sources":["api/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,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CAAC,CAAC,EACnE,IAAI,EAAE,CAAC,EACP,IAAI,CAAC,EACD,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACxE,CAAC,CA2CH;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,EACnE,IAAI,EAAE,CAAC,EACP,KAAK,CAAC,EACF,MAAM,GACN,CAAC,CACC,IAAI,EAAE,OAAO,EACb,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,KACf,MAAM,CAAC,EAChB,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,CA+CH"} \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/attributes.js b/node_modules/cheerio/lib/api/attributes.js new file mode 100644 index 00000000..d9d1e09b --- /dev/null +++ b/node_modules/cheerio/lib/api/attributes.js @@ -0,0 +1,634 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +/** + * Methods for getting and modifying attributes. + * + * @module cheerio/attributes + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toggleClass = exports.removeClass = exports.addClass = exports.hasClass = exports.removeAttr = exports.val = exports.data = exports.prop = exports.attr = void 0; +var static_js_1 = require("../static.js"); +var utils_js_1 = require("../utils.js"); +var domutils_1 = require("domutils"); +var hasOwn = Object.prototype.hasOwnProperty; +var rspace = /\s+/; +var dataAttrPrefix = 'data-'; +/* + * Lookup table for coercing string data-* attributes to their corresponding + * JavaScript primitives + */ +var primitives = { + null: null, + true: true, + false: false, +}; +// Attributes that are booleans +var rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; +// Matches strings that look like JSON objects or arrays +var rbrace = /^{[^]*}$|^\[[^]*]$/; +function getAttr(elem, name, xmlMode) { + var _a; + if (!elem || !(0, utils_js_1.isTag)(elem)) + return undefined; + (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {}); + // Return the entire attribs object if no attribute specified + if (!name) { + return elem.attribs; + } + if (hasOwn.call(elem.attribs, name)) { + // Get the (decoded) attribute + return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; + } + // Mimic the DOM and return text content as value for `option's` + if (elem.name === 'option' && name === 'value') { + return (0, static_js_1.text)(elem.children); + } + // Mimic DOM with default value for radios/checkboxes + if (elem.name === 'input' && + (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && + name === 'value') { + return 'on'; + } + return undefined; +} +/** + * Sets the value of an attribute. The attribute will be deleted if the value is `null`. + * + * @private + * @param el - The element to set the attribute on. + * @param name - The attribute's name. + * @param value - The attribute's value. + */ +function setAttr(el, name, value) { + if (value === null) { + removeAttribute(el, name); + } + else { + el.attribs[name] = "".concat(value); + } +} +function attr(name, value) { + // Set the value (with attr map support) + if (typeof name === 'object' || value !== undefined) { + if (typeof value === 'function') { + if (typeof name !== 'string') { + { + throw new Error('Bad combination of arguments.'); + } + } + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) + setAttr(el, name, value.call(el, i, el.attribs[name])); + }); + } + return (0, utils_js_1.domEach)(this, function (el) { + if (!(0, utils_js_1.isTag)(el)) + return; + if (typeof name === 'object') { + Object.keys(name).forEach(function (objName) { + var objValue = name[objName]; + setAttr(el, objName, objValue); + }); + } + else { + setAttr(el, name, value); + } + }); + } + return arguments.length > 1 + ? this + : getAttr(this[0], name, this.options.xmlMode); +} +exports.attr = attr; +/** + * Gets a node's prop. + * + * @private + * @category Attributes + * @param el - Element to get the prop of. + * @param name - Name of the prop. + * @returns The prop's value. + */ +function getProp(el, name, xmlMode) { + return name in el + ? // @ts-expect-error TS doesn't like us accessing the value directly here. + el[name] + : !xmlMode && rboolean.test(name) + ? getAttr(el, name, false) !== undefined + : getAttr(el, name, xmlMode); +} +/** + * Sets the value of a prop. + * + * @private + * @param el - The element to set the prop on. + * @param name - The prop's name. + * @param value - The prop's value. + */ +function setProp(el, name, value, xmlMode) { + if (name in el) { + // @ts-expect-error Overriding value + el[name] = value; + } + else { + setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : "".concat(value)); + } +} +function prop(name, value) { + var _this = this; + var _a; + if (typeof name === 'string' && value === undefined) { + var el = this[0]; + if (!el || !(0, utils_js_1.isTag)(el)) + return undefined; + switch (name) { + case 'style': { + var property_1 = this.css(); + var keys = Object.keys(property_1); + keys.forEach(function (p, i) { + property_1[i] = p; + }); + property_1.length = keys.length; + return property_1; + } + case 'tagName': + case 'nodeName': { + return el.name.toUpperCase(); + } + case 'href': + case 'src': { + var prop_1 = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; + /* eslint-disable node/no-unsupported-features/node-builtins */ + if (typeof URL !== 'undefined' && + ((name === 'href' && (el.tagName === 'a' || el.name === 'link')) || + (name === 'src' && + (el.tagName === 'img' || + el.tagName === 'iframe' || + el.tagName === 'audio' || + el.tagName === 'video' || + el.tagName === 'source'))) && + prop_1 !== undefined && + this.options.baseURI) { + return new URL(prop_1, this.options.baseURI).href; + } + /* eslint-enable node/no-unsupported-features/node-builtins */ + return prop_1; + } + case 'innerText': { + return (0, domutils_1.innerText)(el); + } + case 'textContent': { + return (0, domutils_1.textContent)(el); + } + case 'outerHTML': + return this.clone().wrap('').parent().html(); + case 'innerHTML': + return this.html(); + default: + return getProp(el, name, this.options.xmlMode); + } + } + if (typeof name === 'object' || value !== undefined) { + if (typeof value === 'function') { + if (typeof name === 'object') { + throw new Error('Bad combination of arguments.'); + } + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) { + setProp(el, name, value.call(el, i, getProp(el, name, _this.options.xmlMode)), _this.options.xmlMode); + } + }); + } + return (0, utils_js_1.domEach)(this, function (el) { + if (!(0, utils_js_1.isTag)(el)) + return; + if (typeof name === 'object') { + Object.keys(name).forEach(function (key) { + var val = name[key]; + setProp(el, key, val, _this.options.xmlMode); + }); + } + else { + setProp(el, name, value, _this.options.xmlMode); + } + }); + } + return undefined; +} +exports.prop = prop; +/** + * Sets the value of a data attribute. + * + * @private + * @param el - The element to set the data attribute on. + * @param name - The data attribute's name. + * @param value - The data attribute's value. + */ +function setData(el, name, value) { + var _a; + var elem = el; + (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {}); + if (typeof name === 'object') + Object.assign(elem.data, name); + else if (typeof name === 'string' && value !== undefined) { + elem.data[name] = value; + } +} +/** + * Read the specified attribute from the equivalent HTML5 `data-*` attribute, + * and (if present) cache the value in the node's internal data store. If no + * attribute name is specified, read _all_ HTML5 `data-*` attributes in this manner. + * + * @private + * @category Attributes + * @param el - Element to get the data attribute of. + * @param name - Name of the data attribute. + * @returns The data attribute's value, or a map with all of the data attributes. + */ +function readData(el, name) { + var domNames; + var jsNames; + var value; + if (name == null) { + domNames = Object.keys(el.attribs).filter(function (attrName) { + return attrName.startsWith(dataAttrPrefix); + }); + jsNames = domNames.map(function (domName) { + return (0, utils_js_1.camelCase)(domName.slice(dataAttrPrefix.length)); + }); + } + else { + domNames = [dataAttrPrefix + (0, utils_js_1.cssCase)(name)]; + jsNames = [name]; + } + for (var idx = 0; idx < domNames.length; ++idx) { + var domName = domNames[idx]; + var jsName = jsNames[idx]; + if (hasOwn.call(el.attribs, domName) && + !hasOwn.call(el.data, jsName)) { + value = el.attribs[domName]; + if (hasOwn.call(primitives, value)) { + value = primitives[value]; + } + else if (value === String(Number(value))) { + value = Number(value); + } + else if (rbrace.test(value)) { + try { + value = JSON.parse(value); + } + catch (e) { + /* Ignore */ + } + } + el.data[jsName] = value; + } + } + return name == null ? el.data : value; +} +function data(name, value) { + var _a; + var elem = this[0]; + if (!elem || !(0, utils_js_1.isTag)(elem)) + return; + var dataEl = elem; + (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {}); + // Return the entire data object if no data specified + if (!name) { + return readData(dataEl); + } + // Set the value (with attr map support) + if (typeof name === 'object' || value !== undefined) { + (0, utils_js_1.domEach)(this, function (el) { + if ((0, utils_js_1.isTag)(el)) { + if (typeof name === 'object') + setData(el, name); + else + setData(el, name, value); + } + }); + return this; + } + if (hasOwn.call(dataEl.data, name)) { + return dataEl.data[name]; + } + return readData(dataEl, name); +} +exports.data = data; +function val(value) { + var querying = arguments.length === 0; + var element = this[0]; + if (!element || !(0, utils_js_1.isTag)(element)) + return querying ? undefined : this; + switch (element.name) { + case 'textarea': + return this.text(value); + case 'select': { + var option = this.find('option:selected'); + if (!querying) { + if (this.attr('multiple') == null && typeof value === 'object') { + return this; + } + this.find('option').removeAttr('selected'); + var values = typeof value !== 'object' ? [value] : value; + for (var i = 0; i < values.length; i++) { + this.find("option[value=\"".concat(values[i], "\"]")).attr('selected', ''); + } + return this; + } + return this.attr('multiple') + ? option.toArray().map(function (el) { return (0, static_js_1.text)(el.children); }) + : option.attr('value'); + } + case 'input': + case 'option': + return querying + ? this.attr('value') + : this.attr('value', value); + } + return undefined; +} +exports.val = val; +/** + * Remove an attribute. + * + * @private + * @param elem - Node to remove attribute from. + * @param name - Name of the attribute to remove. + */ +function removeAttribute(elem, name) { + if (!elem.attribs || !hasOwn.call(elem.attribs, name)) + return; + delete elem.attribs[name]; +} +/** + * Splits a space-separated list of names to individual names. + * + * @category Attributes + * @param names - Names to split. + * @returns - Split names. + */ +function splitNames(names) { + return names ? names.trim().split(rspace) : []; +} +/** + * Method for removing attributes by `name`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').removeAttr('class').html(); + * //=>
  • Pear
  • + * + * $('.apple').attr('id', 'favorite'); + * $('.apple').removeAttr('id class').html(); + * //=>
  • Apple
  • + * ``` + * + * @param name - Name of the attribute. + * @returns The instance itself. + * @see {@link https://api.jquery.com/removeAttr/} + */ +function removeAttr(name) { + var attrNames = splitNames(name); + var _loop_1 = function (i) { + (0, utils_js_1.domEach)(this_1, function (elem) { + if ((0, utils_js_1.isTag)(elem)) + removeAttribute(elem, attrNames[i]); + }); + }; + var this_1 = this; + for (var i = 0; i < attrNames.length; i++) { + _loop_1(i); + } + return this; +} +exports.removeAttr = removeAttr; +/** + * Check to see if _any_ of the matched elements have the given `className`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').hasClass('pear'); + * //=> true + * + * $('apple').hasClass('fruit'); + * //=> false + * + * $('li').hasClass('pear'); + * //=> true + * ``` + * + * @param className - Name of the class. + * @returns Indicates if an element has the given `className`. + * @see {@link https://api.jquery.com/hasClass/} + */ +function hasClass(className) { + return this.toArray().some(function (elem) { + var clazz = (0, utils_js_1.isTag)(elem) && elem.attribs['class']; + var idx = -1; + if (clazz && className.length) { + while ((idx = clazz.indexOf(className, idx + 1)) > -1) { + var end = idx + className.length; + if ((idx === 0 || rspace.test(clazz[idx - 1])) && + (end === clazz.length || rspace.test(clazz[end]))) { + return true; + } + } + } + return false; + }); +} +exports.hasClass = hasClass; +/** + * Adds class(es) to all of the matched elements. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').addClass('fruit').html(); + * //=>
  • Pear
  • + * + * $('.apple').addClass('fruit red').html(); + * //=>
  • Apple
  • + * ``` + * + * @param value - Name of new class. + * @returns The instance itself. + * @see {@link https://api.jquery.com/addClass/} + */ +function addClass(value) { + // Support functions + if (typeof value === 'function') { + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) { + var className = el.attribs['class'] || ''; + addClass.call([el], value.call(el, i, className)); + } + }); + } + // Return if no value or not a string or function + if (!value || typeof value !== 'string') + return this; + var classNames = value.split(rspace); + var numElements = this.length; + for (var i = 0; i < numElements; i++) { + var el = this[i]; + // If selected element isn't a tag, move on + if (!(0, utils_js_1.isTag)(el)) + continue; + // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes + var className = getAttr(el, 'class', false); + if (!className) { + setAttr(el, 'class', classNames.join(' ').trim()); + } + else { + var setClass = " ".concat(className, " "); + // Check if class already exists + for (var j = 0; j < classNames.length; j++) { + var appendClass = "".concat(classNames[j], " "); + if (!setClass.includes(" ".concat(appendClass))) + setClass += appendClass; + } + setAttr(el, 'class', setClass.trim()); + } + } + return this; +} +exports.addClass = addClass; +/** + * Removes one or more space-separated classes from the selected elements. If no + * `className` is defined, all classes will be removed. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.pear').removeClass('pear').html(); + * //=>
  • Pear
  • + * + * $('.apple').addClass('red').removeClass().html(); + * //=>
  • Apple
  • + * ``` + * + * @param name - Name of the class. If not specified, removes all elements. + * @returns The instance itself. + * @see {@link https://api.jquery.com/removeClass/} + */ +function removeClass(name) { + // Handle if value is a function + if (typeof name === 'function') { + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) { + removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); + } + }); + } + var classes = splitNames(name); + var numClasses = classes.length; + var removeAll = arguments.length === 0; + return (0, utils_js_1.domEach)(this, function (el) { + if (!(0, utils_js_1.isTag)(el)) + return; + if (removeAll) { + // Short circuit the remove all case as this is the nice one + el.attribs['class'] = ''; + } + else { + var elClasses = splitNames(el.attribs['class']); + var changed = false; + for (var j = 0; j < numClasses; j++) { + var index = elClasses.indexOf(classes[j]); + if (index >= 0) { + elClasses.splice(index, 1); + changed = true; + /* + * We have to do another pass to ensure that there are not duplicate + * classes listed + */ + j--; + } + } + if (changed) { + el.attribs['class'] = elClasses.join(' '); + } + } + }); +} +exports.removeClass = removeClass; +/** + * Add or remove class(es) from the matched elements, depending on either the + * class's presence or the value of the switch argument. Also accepts a `function`. + * + * @category Attributes + * @example + * + * ```js + * $('.apple.green').toggleClass('fruit green red').html(); + * //=>
  • Apple
  • + * + * $('.apple.green').toggleClass('fruit green red', true).html(); + * //=>
  • Apple
  • + * ``` + * + * @param value - Name of the class. Can also be a function. + * @param stateVal - If specified the state of the class. + * @returns The instance itself. + * @see {@link https://api.jquery.com/toggleClass/} + */ +function toggleClass(value, stateVal) { + // Support functions + if (typeof value === 'function') { + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) { + toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal); + } + }); + } + // Return if no value or not a string or function + if (!value || typeof value !== 'string') + return this; + var classNames = value.split(rspace); + var numClasses = classNames.length; + var state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; + var numElements = this.length; + for (var i = 0; i < numElements; i++) { + var el = this[i]; + // If selected element isn't a tag, move on + if (!(0, utils_js_1.isTag)(el)) + continue; + var elementClasses = splitNames(el.attribs['class']); + // Check if class already exists + for (var j = 0; j < numClasses; j++) { + // Check if the class name is currently defined + var index = elementClasses.indexOf(classNames[j]); + // Add if stateValue === true or we are toggling and there is no value + if (state >= 0 && index < 0) { + elementClasses.push(classNames[j]); + } + else if (state <= 0 && index >= 0) { + // Otherwise remove but only if the item exists + elementClasses.splice(index, 1); + } + } + el.attribs['class'] = elementClasses.join(' '); + } + return this; +} +exports.toggleClass = toggleClass; +//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/attributes.js.map b/node_modules/cheerio/lib/api/attributes.js.map new file mode 100644 index 00000000..d24957c7 --- /dev/null +++ b/node_modules/cheerio/lib/api/attributes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"attributes.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio/d1cbc66d53392ce8bf6cd0068f675836372d2bf3/src/","sources":["api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\ No newline at end of file diff --git a/node_modules/cheerio/lib/api/css.d.ts b/node_modules/cheerio/lib/api/css.d.ts new file mode 100644 index 00000000..a9490da7 --- /dev/null +++ b/node_modules/cheerio/lib/api/css.d.ts @@ -0,0 +1,53 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { Element, AnyNode } from 'domhandler'; +import type { Cheerio } from '../cheerio.js'; +/** + * Get the value of a style property for the first element in the set of matched elements. + * + * @category CSS + * @param names - Optionally the names of the properties of interest. + * @returns A map of all of the style properties. + * @see {@link https://api.jquery.com/css/} + */ +export declare function css(this: Cheerio, names?: string[]): Record | undefined; +/** + * Get the value of a style property for the first element in the set of matched elements. + * + * @category CSS + * @param names - The name of the property. + * @returns The property value for the given name. + * @see {@link https://api.jquery.com/css/} + */ +export declare function css(this: Cheerio, name: string): string | undefined; +/** + * Set one CSS property for every matched element. + * + * @category CSS + * @param prop - The name of the property. + * @param val - The new value. + * @returns The instance itself. + * @see {@link https://api.jquery.com/css/} + */ +export declare function css(this: Cheerio, prop: string, val: string | ((this: Element, i: number, style: string) => string | undefined)): Cheerio; +/** + * Set multiple CSS properties for every matched element. + * + * @category CSS + * @param map - A map of property names and values. + * @returns The instance itself. + * @see {@link https://api.jquery.com/css/} + */ +export declare function css(this: Cheerio, map: Record): Cheerio; +//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/css.d.ts.map b/node_modules/cheerio/lib/api/css.d.ts.map new file mode 100644 index 00000000..f10b6c87 --- /dev/null +++ b/node_modules/cheerio/lib/api/css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"css.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio/d1cbc66d53392ce8bf6cd0068f675836372d2bf3/src/","sources":["api/css.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,CAAC,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;AACtC;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAAC;AACtB;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EACC,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACpE,OAAO,CAAC,CAAC,CAAC,CAAC;AACd;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/css.js b/node_modules/cheerio/lib/api/css.js new file mode 100644 index 00000000..627daec2 --- /dev/null +++ b/node_modules/cheerio/lib/api/css.js @@ -0,0 +1,130 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.css = void 0; +var utils_js_1 = require("../utils.js"); +/** + * Set multiple CSS properties for every matched element. + * + * @category CSS + * @param prop - The names of the properties. + * @param val - The new values. + * @returns The instance itself. + * @see {@link https://api.jquery.com/css/} + */ +function css(prop, val) { + if ((prop != null && val != null) || + // When `prop` is a "plain" object + (typeof prop === 'object' && !Array.isArray(prop))) { + return (0, utils_js_1.domEach)(this, function (el, i) { + if ((0, utils_js_1.isTag)(el)) { + // `prop` can't be an array here anymore. + setCss(el, prop, val, i); + } + }); + } + if (this.length === 0) { + return undefined; + } + return getCss(this[0], prop); +} +exports.css = css; +/** + * Set styles of all elements. + * + * @private + * @param el - Element to set style of. + * @param prop - Name of property. + * @param value - Value to set property to. + * @param idx - Optional index within the selection. + */ +function setCss(el, prop, value, idx) { + if (typeof prop === 'string') { + var styles = getCss(el); + var val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; + if (val === '') { + delete styles[prop]; + } + else if (val != null) { + styles[prop] = val; + } + el.attribs['style'] = stringify(styles); + } + else if (typeof prop === 'object') { + Object.keys(prop).forEach(function (k, i) { + setCss(el, k, prop[k], i); + }); + } +} +function getCss(el, prop) { + if (!el || !(0, utils_js_1.isTag)(el)) + return; + var styles = parse(el.attribs['style']); + if (typeof prop === 'string') { + return styles[prop]; + } + if (Array.isArray(prop)) { + var newStyles_1 = {}; + prop.forEach(function (item) { + if (styles[item] != null) { + newStyles_1[item] = styles[item]; + } + }); + return newStyles_1; + } + return styles; +} +/** + * Stringify `obj` to styles. + * + * @private + * @category CSS + * @param obj - Object to stringify. + * @returns The serialized styles. + */ +function stringify(obj) { + return Object.keys(obj).reduce(function (str, prop) { return "".concat(str).concat(str ? ' ' : '').concat(prop, ": ").concat(obj[prop], ";"); }, ''); +} +/** + * Parse `styles`. + * + * @private + * @category CSS + * @param styles - Styles to be parsed. + * @returns The parsed styles. + */ +function parse(styles) { + styles = (styles || '').trim(); + if (!styles) + return {}; + var obj = {}; + var key; + for (var _i = 0, _a = styles.split(';'); _i < _a.length; _i++) { + var str = _a[_i]; + var n = str.indexOf(':'); + // If there is no :, or if it is the first/last character, add to the previous item's value + if (n < 1 || n === str.length - 1) { + var trimmed = str.trimEnd(); + if (trimmed.length > 0 && key !== undefined) { + obj[key] += ";".concat(trimmed); + } + } + else { + key = str.slice(0, n).trim(); + obj[key] = str.slice(n + 1).trim(); + } + } + return obj; +} +//# sourceMappingURL=css.js.map \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/css.js.map b/node_modules/cheerio/lib/api/css.js.map new file mode 100644 index 00000000..9053e0ae --- /dev/null +++ b/node_modules/cheerio/lib/api/css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"css.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio/d1cbc66d53392ce8bf6cd0068f675836372d2bf3/src/","sources":["api/css.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAwD7C;;;;;;;;GAQG;AACH,SAAgB,GAAG,CAEjB,IAAiD,EACjD,GAEqE;IAErE,IACE,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC;QAC7B,kCAAkC;QAClC,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAClD;QACA,OAAO,IAAA,kBAAO,EAAC,IAAI,EAAE,UAAC,EAAE,EAAE,CAAC;YACzB,IAAI,IAAA,gBAAK,EAA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CAAC,EAAjB,cAAiB,EAAjB,IAAiB,EAAE;QAAhC,IAAM,GAAG,SAAA;QACZ,IAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,2FAA2F;QAC3F,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,IAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,SAAS,EAAE;gBAC3C,GAAG,CAAC,GAAG,CAAC,IAAI,WAAI,OAAO,CAAE,CAAC;aAC3B;SACF;aAAM;YACL,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpC;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/forms.d.ts b/node_modules/cheerio/lib/api/forms.d.ts new file mode 100644 index 00000000..ea4b4b97 --- /dev/null +++ b/node_modules/cheerio/lib/api/forms.d.ts @@ -0,0 +1,51 @@ +/// +/// JPAstreamer - Express JPA queries with Java Streams +/// Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. +/// +/// License: GNU Lesser General Public License (LGPL), version 2.1 or later. +/// +/// This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +/// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +/// See the GNU Lesser General Public License for more details. +/// +/// See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE +/// + +import type { AnyNode } from 'domhandler'; +import type { Cheerio } from '../cheerio.js'; +/** + * Encode a set of form elements as a string for submission. + * + * @category Forms + * @example + * + * ```js + * $('
    ').serialize(); + * //=> 'foo=bar' + * ``` + * + * @returns The serialized form. + * @see {@link https://api.jquery.com/serialize/} + */ +export declare function serialize(this: Cheerio): string; +interface SerializedField { + name: string; + value: string; +} +/** + * Encode a set of form elements as an array of names and values. + * + * @category Forms + * @example + * + * ```js + * $('
    ').serializeArray(); + * //=> [ { name: 'foo', value: 'bar' } ] + * ``` + * + * @returns The serialized form. + * @see {@link https://api.jquery.com/serializeArray/} + */ +export declare function serializeArray(this: Cheerio): SerializedField[]; +export {}; +//# sourceMappingURL=forms.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/forms.d.ts.map b/node_modules/cheerio/lib/api/forms.d.ts.map new file mode 100644 index 00000000..d27b568f --- /dev/null +++ b/node_modules/cheerio/lib/api/forms.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"forms.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio/d1cbc66d53392ce8bf6cd0068f675836372d2bf3/src/","sources":["api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAW7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAYrE;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GACf,eAAe,EAAE,CAsCnB"} \ No newline at end of file diff --git a/node_modules/cheerio/lib/api/forms.js b/node_modules/cheerio/lib/api/forms.js new file mode 100644 index 00000000..79874fe8 --- /dev/null +++ b/node_modules/cheerio/lib/api/forms.js @@ -0,0 +1,104 @@ +/* + * JPAstreamer - Express JPA queries with Java Streams + * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved. + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.serializeArray = exports.serialize = void 0; +var utils_js_1 = require("../utils.js"); +/* + * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js + * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js + */ +var submittableSelector = 'input,select,textarea,keygen'; +var r20 = /%20/g; +var rCRLF = /\r?\n/g; +/** + * Encode a set of form elements as a string for submission. + * + * @category Forms + * @example + * + * ```js + * $('
    ').serialize(); + * //=> 'foo=bar' + * ``` + * + * @returns The serialized form. + * @see {@link https://api.jquery.com/serialize/} + */ +function serialize() { + // Convert form elements into name/value objects + var arr = this.serializeArray(); + // Serialize each element into a key/value string + var retArr = arr.map(function (data) { + return "".concat(encodeURIComponent(data.name), "=").concat(encodeURIComponent(data.value)); + }); + // Return the resulting serialization + return retArr.join('&').replace(r20, '+'); +} +exports.serialize = serialize; +/** + * Encode a set of form elements as an array of names and values. + * + * @category Forms + * @example + * + * ```js + * $('
    ').serializeArray(); + * //=> [ { name: 'foo', value: 'bar' } ] + * ``` + * + * @returns The serialized form. + * @see {@link https://api.jquery.com/serializeArray/} + */ +function serializeArray() { + var _this = this; + // Resolve all form elements from either forms or collections of form elements + return this.map(function (_, elem) { + var $elem = _this._make(elem); + if ((0, utils_js_1.isTag)(elem) && elem.name === 'form') { + return $elem.find(submittableSelector).toArray(); + } + return $elem.filter(submittableSelector).toArray(); + }) + .filter( + // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) + '[name!=""]:enabled' + + // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) + ':not(:submit, :button, :image, :reset, :file)' + + // And are either checked/don't have a checkable state + ':matches([checked], :not(:checkbox, :radio))' + // Convert each of the elements to its value(s) + ) + .map(function (_, elem) { + var _a; + var $elem = _this._make(elem); + var name = $elem.attr('name'); // We have filtered for elements with a name before. + // If there is no value set (e.g. `undefined`, `null`), then default value to empty + var value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ''; + // If we have an array of values (e.g. `