diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..943f5e9f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,8 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # not working due missing www. +open_collective: hyperHTML +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +custom: https://www.patreon.com/webreflection diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..58f187be --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..73cf8d65 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - run: npm run coverage --if-present + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 58b805fe..3cb01d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store -node_modules/ \ No newline at end of file +node_modules/ +coverage/ + diff --git a/.npmignore b/.npmignore index 9e31fc7d..2b02e166 100644 --- a/.npmignore +++ b/.npmignore @@ -1,14 +1,14 @@ coverage/* -dist/* -docs/* +esm/.eslintrc logo/* node_modules/* -repl/* test/* _config.yml .DS_Store .gitignore .travis.yml -bundler.js -hyperhtml.js -package-lock.json \ No newline at end of file +.github/ISSUE_TEMPLATE.md +babel-plugins.json +CHANGELOG.md +package-lock.json +rollup.config.js diff --git a/.travis.yml b/.travis.yml index 69660b1f..cc127136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: node_js node_js: - - 8 + - stable git: depth: 1 branches: only: - master + - /^greenkeeper/.*$/ after_success: - - "npm run coveralls" \ No newline at end of file + - "npm run coveralls" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..60ac2164 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,147 @@ +# hyper(html) Changelog + +### v.2.23 + * monkey patched rollup generated code to export once the same module shared within sub-modules + +### v2.22 + * using latest domtagger + +### v2.21 + * refactored out all dependencies + +### v2.20 + * re-tested every single supported browser nd fixed few outstanding issues with the 2.19 release + +### v2.19 + * refactored out most of the code + * finally managed to have coveralls show coverage stats + * attributes can have spaces around as per DOM standard - [#244](https://github.com/WebReflection/hyperHTML/issues/224) + * fixed SVG (non-critical) errors when interpolations are used for numerically expected values + * fixed minor issues with Edge attributes + * changed the unique id so if any of your logic was trusting `_hyper: ....;` comments you need to update your logic - [#300](https://github.com/WebReflection/hyperHTML/issues/300) + +### v2.16.8 + * improved MutationObserver and fallback so that double `dis/connected` events won't happen again + * exposed `observe` utility for 3rd parts so that it is possible to observe any node, not only those defined via template literals. Once observed, a node can have `connected` and `disconnected` listeners that will be triggered automatically. + +### v2.16 + * modified `Wire` class to better handle "_same target_" case, making the `haunted.html` demo work same way as if it was bound to the node, through `valueOf()` invoke which would result in just exactly the same node if the wired content produced a node instead of a fragment. While regular users won't be affected, this is an implementation detail that changes a lot for libraries integrating `hyperHTML.wire` in their logic, making wires as fast as `bind` in most component related use cases. + +### v2.15 + * added [invokable slots](https://github.com/WebReflection/hyperHTML/pull/282#issuecomment-433614081) to let developers explore patterns through callbacks that will receive a unique live node for weak references while rendered. + +### v2.14 + * updated [domdiff](https://github.com/WebReflection/domdiff#domdiff) to match [petit-dom](https://github.com/yelouafi/petit-dom) performance + * up to 3X performance on huge lists + * improved reliability over random changes + * unfortunately there's a +0.6K overall size increase due amount of extra logic involved + +### v2.13.2 + * added support for custom CSS properties as object keys. + +### v2.13.1 + * worked around [TypeScript transpilation bug with Template Literals](https://twitter.com/WebReflection/status/1038115439539363840). + +### v2.13 + * added the ability to define custom attributes via `hyperHTML.define("hyper-attribute", callback)`, so that `

` would invoke `callback(target, anyValue)` where `p` would be the target. + +### v2.12 + * added `hyper.Component#dispatch(type, detail)` method to simplify events dispatching between lightweight components, bubbling a cancelable Custom Event with a `.component` property that points at the dispatcher, while the `event.currentTarget` will be the first node found within the component render. + +### v2.11 + * updated [domdiff](https://github.com/WebReflection/domdiff#domdiff) to v1.0 + +### v2.10.12 + * patched missing `.children` in SVG node in IE / Edge https://github.com/WebReflection/hyperHTML/issues/244 + +### v2.10.10 + * updated [domdiff](https://github.com/WebReflection/domdiff#domdiff) to solve issue #243 (breaking with some sorted list) + +### v2.10.5 + * various fixes and changes after [changes applied to ECMAScript 2015](https://github.com/tc39/ecma262/pull/890) + +### v2.8.0 + * updated [domdiff](https://github.com/WebReflection/domdiff#domdiff) engine to boost performance with segments and lists + +### v2.7.2 + * fixed #218 which was a variant of #200 + +### v2.7.0 + * the `Component.for(obj)` is now created first time via `new Component(obj)` - #216 + +### v2.6.0 + * declarative hyper.Component via `Component.for(context, uid?)` - #202 + * hyperHTML TypeScript information - #201 + +### v2.5.12 + * fixed #200: textarea/style with initial undefined value + +### v2.5.11 + * fixed #198: connected/disconnected events for nested components + +### v2.5.10 + * more rigid / explicit RegExp to avoid glitches with self-closing tags + +### v2.5.8 + * improved `VOID_ELEMENTS` regular expression (aligned with the _viperHTML_ one) + +### v2.5.7 + * fixed `no.js` patch when wrong count of args is passed + +### v2.5.6 + * added `no.js` file for environments without the ability to use modern JS or based on other languages such Dart. + +### v2.5.5 + * build runs on macOS too + * added umd.js file + +### v2.5.2 + * fixed weird SVG case (see #172) + +### v2.5.1 + * improved self-closing reliability recycling and sharing attributes RegExp + +### v2.5.0 + * updated `domdiff` library to the latest version + * implemented self-closing tags (and after various tests) + +### v2.4.3 + * ensure attributes values are updated when different from previous one + * avoid the usage of the word `global` in the whole code + +### v2.4.2 + * fix scripts with actual content too. + +### v2.4.1 + * fix a bug with scripts that don't trigger network requests in both Firefox and Safari (see bug #152) + +### v2.4.0 + * created a `Wire` class to handle via `domdiff` multiple wired nodes. + * brought back multi nodes per wire, a feature lost since **v2.0** + * simplified `Component` handling too, making it compatible again with multi wired content. + * fixed some check to make IE9+ tests green again + +### v2.3.0 + * dropped the `engine` already. Too complex, no real benefits, refactored the whole internal logic to use [domdiff](https://github.com/WebReflection/domdiff) instead. Deprecated [hyperhtml-majinbuu](https://github.com/WebReflection/hyperhtml-majinbuu) and solved diffing "_forever_". + +### v2.2.0 + * the whole `hyperHTML.engine` has been refactored to use [dom-splicer](https://github.com/WebReflection/dom-splicer) as an effort to make engine development easier + +### v2.1.3 + * the MutationObserver is installed only once and only if there are components that have _on(dis)?connect_ handlers. + +### v2.1.2 + * using a new folders convention with `esm/index.js` as main module and `cjs/index.js` as transformed artifact. This plays very well with bundlers when you `import {hyper} from 'hyperhtml/esm'` or `const {hyper} = require('hyperhtml/cjs');` + +### v2.1.1 + * fast changes where prepending or appending same lists; now dropping upfront or removing at the end are part of the fast path too. + +### v2.1.0 + + * created a simple default merge engine focused on performance + * remove majinbuu as core dependency, created [hyperhtml-majinbuu](https://github.com/WebReflection/hyperhtml-majinbuu) project to swap it back via `hyperHTML.engine = require('hyperhtml-majinbuu')` or as ESM + * reduced final bundle size down to 4.1K via brotli + +## v2.0.0 + +Refactoring following ticket #140 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..fb3f291f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# Contribute + +## Introduction + +First, thank you for considering contributing to hyperhtml! It's people like you that make the open source community such a great community! ๐Ÿ˜Š + +We welcome any type of contribution, not only code. You can help with +- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open) +- **Marketing**: writing blog posts, howto's, printing stickers, ... +- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ... +- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them. +- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/hyperhtml). + +## Your First Contribution + +Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). + +## Submitting code + +Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests. + +## Code review process + +The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. +It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you? + +## Financial contributions + +We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/hyperhtml). +Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. + +## Questions + +If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!). +You can also reach us at hello@hyperhtml.opencollective.com. + +## Credits + +### Contributors + +Thank you to all the people who have already contributed to hyperhtml! + + + +### Backers + +Thank you to all our backers! [[Become a backer](https://opencollective.com/hyperhtml#backer)] + + + + +### Sponsors + +Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/hyperhtml#sponsor)) + + + + + + + + + + + + + \ No newline at end of file diff --git a/HELPERS.md b/HELPERS.md new file mode 100644 index 00000000..d0f8aefb --- /dev/null +++ b/HELPERS.md @@ -0,0 +1,57 @@ +## [babel-plugin-remove-ungap] + +Remove the [@ungap ponyfill modules] from your bundle. This will decrease the size of +your bundle if you are targeting modern browsers only or if your build already includes +other polyfills. This has been tested with [hyperHTML] and [lighterhtml] bundles. + + +## [babel-plugin-template-html-minifier] + +Run [html-minifier] on hyperHTML templates. + + +## [babel-plugin-bare-import-rewrite] + +This can be used as an alternative to [rollup-plugin-node-resolve], or can be used with certain node.js +web servers to allow browsing live from source. + +Known web server integrations: +* [fastify-babel] plugin for [fastify] enables running any babel plugins, generally expects `payload.filename` as set by [fastify-static] +* [express-transform-bare-module-specifiers] for [express] servers + + +## [vinyl-rollup] + +This module copies the output of rollup builds to a stream of vinyl-fs objects for [gulp]. +In addition it optionally adds files from modules that were bundled into the stream. This +makes it easy to ensure that LICENSE and package.json files associated with bundled modules +are published on the web server without publishing node.js server-side dependencies to the web. +This can also be used to copy complete modules if required for licensing or if bundled code +requires additional assets that are not part of the bundled JS (images for example). + + +## [babel-plugin-bundled-import-meta] + +If `node_modules/some-web-component/index.js` uses `import.meta.url` to calculate the actual +path to `node_modules/some-web-components/image.png`, rollup does not compensate. This babel +plugin rewrites references to `import.meta.url` so it points to the original location where +it is expected that the additional assets (images and such) can be found. This plugin works +well with `vinyl-rollup` with `copyModules: true`. + + +[babel-plugin-remove-ungap]: https://github.com/cfware/babel-plugin-remove-ungap#readme +[@ungap ponyfill modules]: https://github.com/ungap/ungap.github.io#readme +[hyperHTML]: https://github.com/WebReflection/hyperHTML#readme +[lighterhtml]: https://github.com/WebReflection/lighterhtml#readme +[babel-plugin-template-html-minifier]: https://github.com/cfware/babel-plugin-template-html-minifier#readme +[html-minifier]: https://github.com/kangax/html-minifier#readme +[babel-plugin-bare-import-rewrite]: https://github.com/cfware/babel-plugin-bare-import-rewrite#readme +[rollup-plugin-node-resolve]: https://github.com/rollup/rollup-plugin-node-resolve#readme +[fastify]: https://github.com/fastify/fastify#readme +[fastify-babel]: https://github.com/cfware/fastify-babel#readme +[fastify-static]: https://github.com/fastify/fastify-static#readme +[express-transform-bare-module-specifiers]: https://github.com/nodecg/express-transform-bare-module-specifiers#readme +[express]: https://github.com/expressjs/express#readme +[vinyl-rollup]: https://github.com/cfware/vinyl-rollup#readme +[gulp]: https://github.com/gulpjs/gulp#readme +[babel-plugin-bundled-import-meta]: https://github.com/cfware/babel-plugin-bundled-import-meta#readme diff --git a/README.md b/README.md index 6ebe2ca3..72f7e51a 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,120 @@ # hyper(HTML) -[![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) [![Build Status](https://travis-ci.org/WebReflection/hyperHTML.svg?branch=master)](https://travis-ci.org/WebReflection/hyperHTML) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/hyperHTML/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/hyperHTML?branch=master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate) +### Maintainance Only +This module is great, works great, and served me greatly, but there's a pletora of modern, faster, more capable alternatives me, among many other OSS developers, offer so that if obvious bugs are proven to exist, these will be fixed, but there won't be a major release and I won't remove legacy support for stuff that, as previously mentioned, works just fine and it's battle-tested from IE to the latest Chrome. + +Removing that legacy support brings pretty much nothing in terms of size too: this module is already smaller than 90% of alternatives out there, dropping 0.xK so that there's less code that, behind feature detection, is not even used in modern browsers, won't benefit anyone. + +Thansk for your understanding and for not opening PRs which goal is to drop a check for legacy browsers ... these won't likely be merged ever as that'd be a major release update and I don't think anyone is interested in that. + +### ๐Ÿ“ฃ Community Announcement + +Please ask questions in the [dedicated discussions repository](https://github.com/WebReflection/discussions), to help the community around this project grow โ™ฅ + +- - - hyperHTML logo -A **Fast & Light Virtual DOM Alternative** available for [NodeJS](https://viperhtml.js.org/viper.html) and [NativeScript](https://viperhtml.js.org/native.html) too. +A **Fast & Light Virtual DOM Alternative**. + - - - -### Warning +[![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate) [![Backers on Open Collective](https://opencollective.com/hyperhtml/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/hyperhtml/sponsors/badge.svg)](#sponsors) ![WebReflection status](https://offline.report/status/webreflection.svg) + +[![Coverage Status](https://coveralls.io/repos/github/WebReflection/hyperHTML/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/hyperHTML?branch=master) +[![Build Status](https://travis-ci.org/WebReflection/hyperHTML.svg?branch=master)](https://travis-ci.org/WebReflection/hyperHTML) +[![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) +[![Greenkeeper badge](https://badges.greenkeeper.io/WebReflection/hyperHTML.svg)](https://greenkeeper.io/) ![Blazing Fast](https://img.shields.io/badge/speed-blazing%20๐Ÿ”ฅ-brightgreen.svg) + +- - - + +Following an overview of projects related, or inspired by, _hyperHTML_. For a deep comparison of current libraries, feel free to [check this gist out](https://gist.github.com/WebReflection/761052d6dae7c8207d2fcba7cdede295). + + +## ยตhtml + +The latest, smallest, iteration of all best concept from this library since 2017, have been packaged in _~2.5K_. If it's extreme minimalism and great _DX_ that you are after, check [uhtml](https://github.com/WebReflection/uhtml#readme) out. + + +## hypersimple + +If you've just started with template literals based projects and you like components, or you'd like to understand what's _hyperHTML_ capable of, give [hypersimple](https://github.com/WebReflection/hypersimple#readme) a try ๐ŸŽ‰ + + +## lighterhtml ๐Ÿ’ก + +This little brother is "_showing off_" these days, claiming better performance and unprecedented ease of use. + +[GitHub Repository](https://github.com/WebReflection/lighterhtml) + + +## Neverland ๐ŸŒˆ๐Ÿฆ„ + +If you like React hooks concept, don't miss this little wrap that adds 0._something_ overhead to the already lightweight hyperHTML, bringing in very similar concepts. + +[Blog Post](https://medium.com/@WebReflection/neverland-the-hyperhtmls-hook-a0c3e11324bb) + +[GitHub Repository](https://github.com/WebReflection/neverland) + +## Haunted ๐Ÿฆ‡ ๐ŸŽƒ + +If you also like React hooks mechanism and you'd like to combine these via hyperHTML or [HyperHTMLElement](https://github.com/WebReflection/hyperHTML-Element), try [haunted](https://github.com/matthewp/haunted#haunted--) out! + + +## Bundlers + +You can require or import _hyperHTML_ with any bundler and in different ways. + +If requiring or importing from `"hyperhtml"` doesn't work, try requiring from `"hyperhtml/cjs"` for CommonJS friendly bundlers (WebPack), or `"hyperhtml/esm"` for ESM compatible bundlers (Rollup). + +See [HELPERS.md](./HELPERS.md) for a list of additional tools which can be helpful for building hyperHTML based web applications. + +- - - + +## Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/hyperhtml#sponsor)] -Current **master** branch is currently under heavy refactoring. + -Please use the [official site](https://viperhtml.js.org) to check examples on Code Pen and/or read the documentation. +## Backers + +Thank you to all our backers! ๐Ÿ™ [[Become a backer](https://opencollective.com/hyperhtml#backer)] + + + +## Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + +- - - + +### 2.34 Highlights + + * the new `?boolean=${value}` syntax from [ยตhtml](https://github.com/WebReflection/uhtml#readme) has landed in *hyperHTML* too. Feel free to [read this long discussion](https://github.com/WebReflection/discussions/discussions/13) to better understand *why* this syntax is necessary. + +### V2.5 Highlights + + * `` tags for both custom elements and any other as well ๐ŸŽ‰ + +### V2 Highlights + +Following most important changes in version 2: + + * fully rewritten, and [consumable](https://unpkg.com/hyperhtml@latest/esm/index.js), as [ES2015 Module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) + * [usable via CDN](https://unpkg.com/hyperhtml@latest/min.js) as bundled global `hyperHTML` variable + * restructured in modules, utilities, helpers, and commented all over for simplified contribution + * **removed** `.escape` and `.adopt`, either useless or unstable. `hyperHTML.adopt` will be implemented as module a part + * **added** support for objects as `style` attribute, fully compatible with [Preact](https://github.com/developit/preact) implementation + * **improved** performance in numerous ways + * **custom elements** V0 and V1 are now fully, and properly, supported through `document.importNode` and/or regular `cloneNode` tested against common polyfills + * back to 4.6K thanks to **rollup** and its ability to merge all the things together like it was already in V1 + +## Documentation + +A proper documentation full of examples can be found in [viperhtml.js.org](https://viperhtml.js.org/). ## Basic Example @@ -34,10 +136,10 @@ setInterval(tick, 1000, ## Features - * Zero dependencies, no polyfills needed, and it fits in less than **5KB** (minzipped) - * Uses directly native DOM instead of inventing new syntax/APIs, DOM diffing, or virtual DOM + * Zero dependencies, no polyfills needed, and it fits in about **4.6KB** (minified + brotli) + * Uses directly native DOM, no virtual DOM involved * Designed for [template literals](http://www.ecma-international.org/ecma-262/6.0/#sec-template-literals), a templating feature built in to JS - * Compatible with vanilla DOM elements and vanilla JS data structures + * Compatible with plain DOM elements and plain JS data structures * Also compatible with Babel transpiled output, hence suitable for every browser you can think of ## Compatibility @@ -47,11 +149,22 @@ You can verify directly through the following links: * [100% code coverage](https://webreflection.github.io/hyperHTML/test/) for browsers natively compatible with string literals * [100% code coverage](https://webreflection.github.io/hyperHTML/test/ie/) for IE9+ and browsers that need transpiled code - * [coverage without experimental adopt feature](https://webreflection.github.io/hyperHTML/test/ie/?noadopt) + +#### Weakmap error on ie < 11 -## Documentation +'@ungap/weakmap': object is not extensible -A proper documentation full of examples can be found in [viperhtml.js.org](https://viperhtml.js.org/). +Babel freezes the template literals by spec but that causes problems with the weakmap polyfill. To fix this error add the fix explained on [ungap/weakmap](https://github.com/ungap/weakmap#transpiled-code-and-frozen-objects-in-legacy-browsers) + +## HTML Syntax Highlight + +If you are using Visual Studio Code you can install `literally-html` to highlight all literals handled by `hyperHTML` and others. + +![literally-html example](https://viperhtml.js.org/hyperhtml/documentation/img/literally-html.png) + +## Prettier Templates + +If you'd like to make your templates prettier than usual, don't miss this plugin: https://github.com/sgtpep/prettier-plugin-html-template-literals ## Questions ? @@ -59,4 +172,33 @@ Please ask anything you'd like to know in [StackOverflow](https://stackoverflow. #### hyper or lit ? -You can read more on this [hyperHTML vs lit-html](https://gist.github.com/WebReflection/fadcc419f5ccaae92bc167d8ff5c611b) comparison. +You can read more on this [hyperHTML vs lit-html](https://medium.com/@WebReflection/lit-html-vs-hyperhtml-vs-lighterhtml-c084abfe1285) comparison. + +#### installation? + +```js +npm install hyperhtml +``` +If your bundler does not work with the following: +```js +// ES6 +import hyperHTML from 'hyperhtml'; + +// CJS +const hyperHTML = require('hyperhtml'); +``` +You can try any of these other options. +```js +import hyperHTML from 'hyperhtml/esm'; +// or +import {hyper, wire, bind, Component} from 'hyperhtml/esm'; +// or +import hyperHTML from 'https://unpkg.com/hyperhtml?module'; + + +const hyperHTML = require('hyperhtml/cjs').default; +// or +const {hyper, wire, bind, Component} = require('hyperhtml/cjs'); +``` + +In alternative, there is a pre-bundled `require("hyperhtml/umd")` or via unpkg as [UMD module](https://unpkg.com/hyperhtml@latest/umd.js). diff --git a/babel-plugins.json b/babel-plugins.json new file mode 100644 index 00000000..d982204a --- /dev/null +++ b/babel-plugins.json @@ -0,0 +1,13 @@ +[ + "check-es2015-constants", + "transform-es2015-arrow-functions", + "transform-es2015-block-scoped-functions", + "transform-es2015-block-scoping", + "transform-es2015-computed-properties", + "transform-es2015-destructuring", + "transform-es2015-duplicate-keys", + "transform-es2015-function-name", + "transform-es2015-literals", + "transform-es2015-shorthand-properties", + "transform-es2015-spread" +] \ No newline at end of file diff --git a/cjs/classes/Aura.js b/cjs/classes/Aura.js deleted file mode 100644 index d453efb7..00000000 --- a/cjs/classes/Aura.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -const majinbuu = (m => m.__esModule ? m.default : m)(require('majinbuu')); - -// used as class but it returns a modified childNodes -// it's not worth to use Babel class transpilation -// for an utility facade with a context for convenience -Object.defineProperty(exports, '__esModule', {value: true}).default = Aura; - -function Aura(node, childNodes) { - this.node = node; - this.childNodes = childNodes; - childNodes.become = become; - return majinbuu.aura(this, childNodes); -} - -// reflected through hyperHTML.MAX_LIST_SIZE -Aura.MAX_LIST_SIZE = 1000; - -// wraps childNodes splice to pass through the Aura -Aura.prototype.splice = function splice(...args) { - const ph = this.node; - const cn = this.childNodes; - const target = cn[args[0] + (args[1] || 0)] || ph; - const result = cn.splice(...args); - const pn = ph.parentNode; - const doc = pn.ownerDocument; - for (let tmp, i = 0, length = result.length; i < length; i++) { - tmp = result[i]; - // TODO: this is not optimal (but necessary) - if (cn.indexOf(tmp) < 0) { - pn.removeChild(tmp); - } - } - for (let tmp, i = 2, length = args.length; i < length; pn.insertBefore(tmp, target)) { - if ((length - i) === 1) { - tmp = args[i++]; - } else { - tmp = doc.createDocumentFragment(); - while (i < length) { - tmp.appendChild(args[i++]); - } - } - } - return result; -}; - -function become(value) { - let i = 0, length = this.length; - if (value.length !== length) { - majinbuu(this, value, Aura.MAX_LIST_SIZE); - } else { - for (; i < length--; i++) { - if (this[length] !== value[length] || this[i] !== value[i]) { - majinbuu(this, value, Aura.MAX_LIST_SIZE); - return; - } - } - } -} \ No newline at end of file diff --git a/cjs/classes/Component.js b/cjs/classes/Component.js index 36b2947f..632986bf 100644 --- a/cjs/classes/Component.js +++ b/cjs/classes/Component.js @@ -1,53 +1,166 @@ 'use strict'; -const wire = (m => m.__esModule ? m.default : m)(require('../hyper/wire.js')); +const CustomEvent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/custom-event')); +const Map = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/essential-map')); +const WeakMap = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/weakmap')); -// no need for a transpiled class here -// Component needs lazy prototype accessors -// using modern syntax to define it won't be enough -Object.defineProperty(exports, '__esModule', {value: true}).default = Component; +// hyperHTML.Component is a very basic class +// able to create Custom Elements like components +// including the ability to listen to connect/disconnect +// events via onconnect/ondisconnect attributes +// Components can be created imperatively or declaratively. +// The main difference is that declared components +// will not automatically render on setState(...) +// to simplify state handling on render. +function Component() { + return this; // this is needed in Edge !!! +} +Object.defineProperty(exports, '__esModule', {value: true}).default = Component +// Component is lazily setup because it needs +// wire mechanism as lazy content +function setup(content) { + // there are various weakly referenced variables in here + // and mostly are to use Component.for(...) static method. + const children = new WeakMap; + const create = Object.create; + const createEntry = (wm, id, component) => { + wm.set(id, component); + return component; + }; + const get = (Class, info, context, id) => { + const relation = info.get(Class) || relate(Class, info); + switch (typeof id) { + case 'object': + case 'function': + const wm = relation.w || (relation.w = new WeakMap); + return wm.get(id) || createEntry(wm, id, new Class(context)); + default: + const sm = relation.p || (relation.p = create(null)); + return sm[id] || (sm[id] = new Class(context)); + } + }; + const relate = (Class, info) => { + const relation = {w: null, p: null}; + info.set(Class, relation); + return relation; + }; + const set = context => { + const info = new Map; + children.set(context, info); + return info; + }; + // The Component Class + Object.defineProperties( + Component, + { + // Component.for(context[, id]) is a convenient way + // to automatically relate data/context to children components + // If not created yet, the new Component(context) is weakly stored + // and after that same instance would always be returned. + for: { + configurable: true, + value(context, id) { + return get( + this, + children.get(context) || set(context), + context, + id == null ? + 'default' : id + ); + } + } + } + ); + Object.defineProperties( + Component.prototype, + { + // all events are handled with the component as context + handleEvent: {value(e) { + const ct = e.currentTarget; + this[ + ('getAttribute' in ct && ct.getAttribute('data-call')) || + ('on' + e.type) + ](e); + }}, + // components will lazily define html or svg properties + // as soon as these are invoked within the .render() method + // Such render() method is not provided by the base class + // but it must be available through the Component extend. + // Declared components could implement a + // render(props) method too and use props as needed. + html: lazyGetter('html', content), + svg: lazyGetter('svg', content), + // the state is a very basic/simple mechanism inspired by Preact + state: lazyGetter('state', function () { return this.defaultState; }), + // it is possible to define a default state that'd be always an object otherwise + defaultState: {get() { return {}; }}, + // dispatch a bubbling, cancelable, custom event + // through the first known/available node + dispatch: {value(type, detail) { + const {_wire$} = this; + if (_wire$) { + const event = new CustomEvent(type, { + bubbles: true, + cancelable: true, + detail + }); + event.component = this; + return (_wire$.dispatchEvent ? + _wire$ : + _wire$.firstChild + ).dispatchEvent(event); + } + return false; + }}, + // setting some property state through a new object + // or a callback, triggers also automatically a render + // unless explicitly specified to not do so (render === false) + setState: {value(state, render) { + const target = this.state; + const source = typeof state === 'function' ? state.call(this, target) : state; + for (const key in source) target[key] = source[key]; + if (render !== false) + this.render(); + return this; + }} + } + ); +} +exports.setup = setup + +// instead of a secret key I could've used a WeakMap +// However, attaching a property directly will result +// into better performance with thousands of components +// hanging around, and less memory pressure caused by the WeakMap const lazyGetter = (type, fn) => { const secret = '_' + type + '$'; return { get() { - return this[secret] || (this[type] = fn.call(this, type)); + return this[secret] || setValue(this, secret, fn.call(this, type)); }, set(value) { - Object.defineProperty(this, secret, {configurable: true, value: value}); + setValue(this, secret, value); } }; }; -function Component() {} +// shortcut to set value on get or set(value) +const setValue = (self, secret, value) => + Object.defineProperty(self, secret, { + configurable: true, + value: typeof value === 'function' ? + function () { + return (self._wire$ = value.apply(this, arguments)); + } : + value + })[secret] +; + Object.defineProperties( Component.prototype, { - // same as HyperHTMLElement handleEvent - handleEvent: {value(e) { - // both IE < 11 and JSDOM lack dataset - const ct = e.currentTarget; - this[ - ('getAttribute' in ct && ct.getAttribute('data-call')) || - ('on' + e.type) - ](e); - }}, - // returns its own HTML wire or create it once on comp.render() - html: lazyGetter('html', wire.content), - // returns its own SVG wire or create it once on comp.render() - svg: lazyGetter('svg', wire.content), - // same as HyperHTMLElement state - state: lazyGetter('state', function () { return this.defaultState; }), - // same as HyperHTMLElement get defaultState - defaultState: {get() { return {}; }}, - // same as HyperHTMLElement setState - setState: {value(state) { - const target = this.state; - const source = typeof state === 'function' ? state.call(this, target) : state; - for (const key in source) target[key] = source[key]; - this.render(); - }} - // the render must be defined when extending hyper.Component - // the render **must** return either comp.html or comp.svg wire - // render() { return this.html`

that's it

`; } + // used to distinguish better than instanceof + ELEMENT_NODE: {value: 1}, + nodeType: {value: -1} } ); diff --git a/cjs/classes/Path.js b/cjs/classes/Path.js deleted file mode 100644 index 7069424a..00000000 --- a/cjs/classes/Path.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; -const { - ATTRIBUTE_NODE, - COMMENT_NODE, - DOCUMENT_FRAGMENT_NODE, - ELEMENT_NODE -} = require('../shared/constants.js'); - -const {children} = require('../shared/utils.js'); - -const createPath = node => { - const path = []; - let parentNode; - switch (node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - parentNode = node; - break; - case COMMENT_NODE: - parentNode = node.parentNode; - path.unshift( - 'childNodes', - path.indexOf.call(parentNode.childNodes, node) - ); - break; - case ATTRIBUTE_NODE: - default: // jsdom here does not provide a nodeType 2 ... - parentNode = node.ownerElement; - path.unshift('attributes', node.name); - break; - } - for ( - node = parentNode; - (parentNode = parentNode.parentNode); - node = parentNode - ) { - path.unshift('children', path.indexOf.call(children(parentNode), node)); - } - return path; -}; - -function Path(type, node, name) { - return {type, name, path: createPath(node)}; -} -Object.defineProperty(exports, '__esModule', {value: true}).default = Path \ No newline at end of file diff --git a/cjs/hyper/render.js b/cjs/hyper/render.js new file mode 100644 index 00000000..a401a66b --- /dev/null +++ b/cjs/hyper/render.js @@ -0,0 +1,39 @@ +'use strict'; +const WeakMap = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/weakmap')); +const tta = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/template-tag-arguments')); + +const {OWNER_SVG_ELEMENT} = require('../shared/constants.js'); +const {Tagger} = require('../objects/Updates.js'); + +// a weak collection of contexts that +// are already known to hyperHTML +const bewitched = new WeakMap; + +// better known as hyper.bind(node), the render is +// the main tag function in charge of fully upgrading +// or simply updating, contexts used as hyperHTML targets. +// The `this` context is either a regular DOM node or a fragment. +function render() { + const wicked = bewitched.get(this); + const args = tta.apply(null, arguments); + if (wicked && wicked.template === args[0]) { + wicked.tagger.apply(null, args); + } else { + upgrade.apply(this, args); + } + return this; +} + +// an upgrade is in charge of collecting template info, +// parse it once, if unknown, to map all interpolations +// as single DOM callbacks, relate such template +// to the current context, and render it after cleaning the context up +function upgrade(template) { + const type = OWNER_SVG_ELEMENT in this ? 'svg' : 'html'; + const tagger = new Tagger(type); + bewitched.set(this, {tagger, template: template}); + this.textContent = ''; + this.appendChild(tagger.apply(null, arguments)); +} + +Object.defineProperty(exports, '__esModule', {value: true}).default = render; diff --git a/cjs/hyper/wire.js b/cjs/hyper/wire.js index 638f8a06..139eaaba 100644 --- a/cjs/hyper/wire.js +++ b/cjs/hyper/wire.js @@ -1,4 +1,84 @@ 'use strict'; -const wire = {}; +const WeakMap = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/weakmap')); +const tta = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/template-tag-arguments')); +const Wire = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('hyperhtml-wire')); + +const {Tagger} = require('../objects/Updates.js'); + +// all wires used per each context +const wires = new WeakMap; + +// A wire is a callback used as tag function +// to lazily relate a generic object to a template literal. +// hyper.wire(user)`
${user.name}
`; => the div#user +// This provides the ability to have a unique DOM structure +// related to a unique JS object through a reusable template literal. +// A wire can specify a type, as svg or html, and also an id +// via html:id or :id convention. Such :id allows same JS objects +// to be associated to different DOM structures accordingly with +// the used template literal without losing previously rendered parts. +const wire = (obj, type) => obj == null ? + content(type || 'html') : + weakly(obj, type || 'html'); + +// A wire content is a virtual reference to one or more nodes. +// It's represented by either a DOM node, or an Array. +// In both cases, the wire content role is to simply update +// all nodes through the list of related callbacks. +// In few words, a wire content is like an invisible parent node +// in charge of updating its content like a bound element would do. +const content = type => { + let wire, tagger, template; + return function () { + const args = tta.apply(null, arguments); + if (template !== args[0]) { + template = args[0]; + tagger = new Tagger(type); + wire = wireContent(tagger.apply(tagger, args)); + } else { + tagger.apply(tagger, args); + } + return wire; + }; +}; + +// wires are weakly created through objects. +// Each object can have multiple wires associated +// and this is thanks to the type + :id feature. +const weakly = (obj, type) => { + const i = type.indexOf(':'); + let wire = wires.get(obj); + let id = type; + if (-1 < i) { + id = type.slice(i + 1); + type = type.slice(0, i) || 'html'; + } + if (!wire) + wires.set(obj, wire = {}); + return wire[id] || (wire[id] = content(type)); +}; + +// A document fragment loses its nodes +// as soon as it is appended into another node. +// This has the undesired effect of losing wired content +// on a second render call, because (by then) the fragment would be empty: +// no longer providing access to those sub-nodes that ultimately need to +// stay associated with the original interpolation. +// To prevent hyperHTML from forgetting about a fragment's sub-nodes, +// fragments are instead returned as an Array of nodes or, if there's only one entry, +// as a single referenced node which, unlike fragments, will indeed persist +// wire content throughout multiple renderings. +// The initial fragment, at this point, would be used as unique reference to this +// array of nodes or to this single referenced node. +const wireContent = node => { + const childNodes = node.childNodes; + const {length} = childNodes; + return length === 1 ? + childNodes[0] : + (length ? new Wire(childNodes) : node); +}; + +exports.content = content; +exports.weakly = weakly; Object.defineProperty(exports, '__esModule', {value: true}).default = wire; diff --git a/cjs/index.js b/cjs/index.js new file mode 100644 index 00000000..04ed734a --- /dev/null +++ b/cjs/index.js @@ -0,0 +1,77 @@ +'use strict'; +/*! (c) Andrea Giammarchi (ISC) */ +const WeakMap = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/weakmap')); +const WeakSet = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/essential-weakset')); + +const diff = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('domdiff')); +const Component = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./classes/Component.js')); +const {setup} = require('./classes/Component.js'); +const Intent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./objects/Intent.js')); +const {observe, Tagger} = require('./objects/Updates.js'); +const wire = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./hyper/wire.js')); +const {content, weakly} = require('./hyper/wire.js'); +const render = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./hyper/render.js')); + +// all functions are self bound to the right context +// you can do the following +// const {bind, wire} = hyperHTML; +// and use them right away: bind(node)`hello!`; +const bind = context => render.bind(context); +const define = Intent.define; +const tagger = Tagger.prototype; + +hyper.Component = Component; +hyper.bind = bind; +hyper.define = define; +hyper.diff = diff; +hyper.hyper = hyper; +hyper.observe = observe; +hyper.tagger = tagger; +hyper.wire = wire; + +// exported as shared utils +// for projects based on hyperHTML +// that don't necessarily need upfront polyfills +// i.e. those still targeting IE +hyper._ = { + WeakMap, + WeakSet +}; + +// the wire content is the lazy defined +// html or svg property of each hyper.Component +setup(content); + +// everything is exported directly or through the +// hyperHTML callback, when used as top level script +exports.Component = Component; +exports.bind = bind; +exports.define = define; +exports.diff = diff; +exports.hyper = hyper; +exports.observe = observe; +exports.tagger = tagger; +exports.wire = wire; + +// by default, hyperHTML is a smart function +// that "magically" understands what's the best +// thing to do with passed arguments +function hyper(HTML) { + return arguments.length < 2 ? + (HTML == null ? + content('html') : + (typeof HTML === 'string' ? + hyper.wire(null, HTML) : + ('raw' in HTML ? + content('html')(HTML) : + ('nodeType' in HTML ? + hyper.bind(HTML) : + weakly(HTML, 'html') + ) + ) + )) : + ('raw' in HTML ? + content('html') : hyper.wire + ).apply(null, arguments); +} +Object.defineProperty(exports, '__esModule', {value: true}).default = hyper diff --git a/cjs/main.js b/cjs/main.js deleted file mode 100644 index c3708161..00000000 --- a/cjs/main.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -require('./classes/Aura.js'); -require('./classes/Component.js'); -require('./classes/Path.js'); - -const hyper = function () {}; -Object.defineProperty(exports, '__esModule', {value: true}).default = hyper; diff --git a/cjs/objects/Intent.js b/cjs/objects/Intent.js new file mode 100644 index 00000000..ef791d77 --- /dev/null +++ b/cjs/objects/Intent.js @@ -0,0 +1,40 @@ +'use strict'; +const attributes = {}; +const intents = {}; +const keys = []; +const hasOwnProperty = intents.hasOwnProperty; + +let length = 0; + +Object.defineProperty(exports, '__esModule', {value: true}).default = { + + // used to invoke right away hyper:attributes + attributes, + + // hyperHTML.define('intent', (object, update) => {...}) + // can be used to define a third parts update mechanism + // when every other known mechanism failed. + // hyper.define('user', info => info.name); + // hyper(node)`

${{user}}

`; + define: (intent, callback) => { + if (intent.indexOf('-') < 0) { + if (!(intent in intents)) { + length = keys.push(intent); + } + intents[intent] = callback; + } else { + attributes[intent] = callback; + } + }, + + // this method is used internally as last resort + // to retrieve a value out of an object + invoke: (object, callback) => { + for (let i = 0; i < length; i++) { + let key = keys[i]; + if (hasOwnProperty.call(object, key)) { + return intents[key](object[key], callback); + } + } + } +}; diff --git a/cjs/objects/Updates.js b/cjs/objects/Updates.js new file mode 100644 index 00000000..0df2e324 --- /dev/null +++ b/cjs/objects/Updates.js @@ -0,0 +1,377 @@ +'use strict'; +const CustomEvent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/custom-event')); +const WeakSet = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/essential-weakset')); +const isArray = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/is-array')); +const createContent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/create-content')); + +const disconnected = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('disconnected')); +const domdiff = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('domdiff')); +const domtagger = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('domtagger')); +const hyperStyle = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('hyperhtml-style')); +const Wire = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('hyperhtml-wire')); + +const { + CONNECTED, DISCONNECTED, DOCUMENT_FRAGMENT_NODE, OWNER_SVG_ELEMENT +} = require('../shared/constants.js'); + +const Component = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('../classes/Component.js')); +const Intent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./Intent.js')); + +const componentType = Component.prototype.nodeType; +const wireType = Wire.prototype.nodeType; + +const observe = disconnected({Event: CustomEvent, WeakSet}); + +exports.Tagger = Tagger; +exports.observe = observe; + +// returns an intent to explicitly inject content as html +const asHTML = html => ({html}); + +// returns nodes from wires and components +const asNode = (item, i) => { + switch (item.nodeType) { + case wireType: + // in the Wire case, the content can be + // removed, post-pended, inserted, or pre-pended and + // all these cases are handled by domdiff already + /* istanbul ignore next */ + return (1 / i) < 0 ? + (i ? item.remove(true) : item.lastChild) : + (i ? item.valueOf(true) : item.firstChild); + case componentType: + return asNode(item.render(), i); + default: + return item; + } +} + +// returns true if domdiff can handle the value +const canDiff = value => 'ELEMENT_NODE' in value; + +// borrowed from uhandlers +// https://github.com/WebReflection/uhandlers +const booleanSetter = (node, key, oldValue) => newValue => { + if (oldValue !== !!newValue) { + if ((oldValue = !!newValue)) + node.setAttribute(key, ''); + else + node.removeAttribute(key); + } +}; + +const hyperSetter = (node, name, svg) => svg ? + value => { + try { + node[name] = value; + } + catch (nope) { + node.setAttribute(name, value); + } + } : + value => { + node[name] = value; + }; + +// when a Promise is used as interpolation value +// its result must be parsed once resolved. +// This callback is in charge of understanding what to do +// with a returned value once the promise is resolved. +const invokeAtDistance = (value, callback) => { + callback(value.placeholder); + if ('text' in value) { + Promise.resolve(value.text).then(String).then(callback); + } else if ('any' in value) { + Promise.resolve(value.any).then(callback); + } else if ('html' in value) { + Promise.resolve(value.html).then(asHTML).then(callback); + } else { + Promise.resolve(Intent.invoke(value, callback)).then(callback); + } +}; + +// quick and dirty way to check for Promise/ish values +const isPromise_ish = value => value != null && 'then' in value; + +// list of attributes that should not be directly assigned +const readOnly = /^(?:form|list)$/i; + +// reused every slice time +const slice = [].slice; + +// simplifies text node creation +const text = (node, text) => node.ownerDocument.createTextNode(text); + +function Tagger(type) { + this.type = type; + return domtagger(this); +} + +Tagger.prototype = { + + // there are four kind of attributes, and related behavior: + // * events, with a name starting with `on`, to add/remove event listeners + // * special, with a name present in their inherited prototype, accessed directly + // * regular, accessed through get/setAttribute standard DOM methods + // * style, the only regular attribute that also accepts an object as value + // so that you can style=${{width: 120}}. In this case, the behavior has been + // fully inspired by Preact library and its simplicity. + attribute(node, name, original) { + const isSVG = OWNER_SVG_ELEMENT in node; + let oldValue; + // if the attribute is the style one + // handle it differently from others + if (name === 'style') + return hyperStyle(node, original, isSVG); + // direct accessors for and friends + else if (name.slice(0, 1) === '.') + return hyperSetter(node, name.slice(1), isSVG); + // boolean accessors for and friends + else if (name.slice(0, 1) === '?') + return booleanSetter(node, name.slice(1)); + // the name is an event one, + // add/remove event listeners accordingly + else if (/^on/.test(name)) { + let type = name.slice(2); + if (type === CONNECTED || type === DISCONNECTED) { + observe(node); + } + else if (name.toLowerCase() + in node) { + type = type.toLowerCase(); + } + return newValue => { + if (oldValue !== newValue) { + if (oldValue) + node.removeEventListener(type, oldValue, false); + oldValue = newValue; + if (newValue) + node.addEventListener(type, newValue, false); + } + }; + } + // the attribute is special ('value' in input) + // and it's not SVG *or* the name is exactly data, + // in this case assign the value directly + else if ( + name === 'data' || + (!isSVG && name in node && !readOnly.test(name)) + ) { + return newValue => { + if (oldValue !== newValue) { + oldValue = newValue; + if (node[name] !== newValue && newValue == null) { + // cleanup on null to avoid silly IE/Edge bug + node[name] = ''; + node.removeAttribute(name); + } + else + node[name] = newValue; + } + }; + } + else if (name in Intent.attributes) { + oldValue; + return any => { + const newValue = Intent.attributes[name](node, any); + if (oldValue !== newValue) { + oldValue = newValue; + if (newValue == null) + node.removeAttribute(name); + else + node.setAttribute(name, newValue); + } + }; + } + // in every other case, use the attribute node as it is + // update only the value, set it as node only when/if needed + else { + let owner = false; + const attribute = original.cloneNode(true); + return newValue => { + if (oldValue !== newValue) { + oldValue = newValue; + if (attribute.value !== newValue) { + if (newValue == null) { + if (owner) { + owner = false; + node.removeAttributeNode(attribute); + } + attribute.value = newValue; + } else { + attribute.value = newValue; + if (!owner) { + owner = true; + node.setAttributeNode(attribute); + } + } + } + } + }; + } + }, + + // in a hyper(node)`
${content}
` case + // everything could happen: + // * it's a JS primitive, stored as text + // * it's null or undefined, the node should be cleaned + // * it's a component, update the content by rendering it + // * it's a promise, update the content once resolved + // * it's an explicit intent, perform the desired operation + // * it's an Array, resolve all values if Promises and/or + // update the node with the resulting list of content + any(node, childNodes) { + const diffOptions = {node: asNode, before: node}; + const nodeType = OWNER_SVG_ELEMENT in node ? /* istanbul ignore next */ 'svg' : 'html'; + let fastPath = false; + let oldValue; + const anyContent = value => { + switch (typeof value) { + case 'string': + case 'number': + case 'boolean': + if (fastPath) { + if (oldValue !== value) { + oldValue = value; + childNodes[0].textContent = value; + } + } else { + fastPath = true; + oldValue = value; + childNodes = domdiff( + node.parentNode, + childNodes, + [text(node, value)], + diffOptions + ); + } + break; + case 'function': + anyContent(value(node)); + break; + case 'object': + case 'undefined': + if (value == null) { + fastPath = false; + childNodes = domdiff( + node.parentNode, + childNodes, + [], + diffOptions + ); + break; + } + default: + fastPath = false; + oldValue = value; + if (isArray(value)) { + if (value.length === 0) { + if (childNodes.length) { + childNodes = domdiff( + node.parentNode, + childNodes, + [], + diffOptions + ); + } + } else { + switch (typeof value[0]) { + case 'string': + case 'number': + case 'boolean': + anyContent({html: value}); + break; + case 'object': + if (isArray(value[0])) { + value = value.concat.apply([], value); + } + if (isPromise_ish(value[0])) { + Promise.all(value).then(anyContent); + break; + } + default: + childNodes = domdiff( + node.parentNode, + childNodes, + value, + diffOptions + ); + break; + } + } + } else if (canDiff(value)) { + childNodes = domdiff( + node.parentNode, + childNodes, + value.nodeType === DOCUMENT_FRAGMENT_NODE ? + slice.call(value.childNodes) : + [value], + diffOptions + ); + } else if (isPromise_ish(value)) { + value.then(anyContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, anyContent); + } else if ('text' in value) { + anyContent(String(value.text)); + } else if ('any' in value) { + anyContent(value.any); + } else if ('html' in value) { + childNodes = domdiff( + node.parentNode, + childNodes, + slice.call( + createContent( + [].concat(value.html).join(''), + nodeType + ).childNodes + ), + diffOptions + ); + } else if ('length' in value) { + anyContent(slice.call(value)); + } else { + anyContent(Intent.invoke(value, anyContent)); + } + break; + } + }; + return anyContent; + }, + + // style or textareas don't accept HTML as content + // it's pointless to transform or analyze anything + // different from text there but it's worth checking + // for possible defined intents. + text(node) { + let oldValue; + const textContent = value => { + if (oldValue !== value) { + oldValue = value; + const type = typeof value; + if (type === 'object' && value) { + if (isPromise_ish(value)) { + value.then(textContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, textContent); + } else if ('text' in value) { + textContent(String(value.text)); + } else if ('any' in value) { + textContent(value.any); + } else if ('html' in value) { + textContent([].concat(value.html).join('')); + } else if ('length' in value) { + textContent(slice.call(value).join('')); + } else { + textContent(Intent.invoke(value, textContent)); + } + } else if (type === 'function') { + textContent(value(node)); + } else { + node.textContent = value == null ? '' : value; + } + } + }; + return textContent; + } +}; diff --git a/cjs/package.json b/cjs/package.json new file mode 100644 index 00000000..0292b995 --- /dev/null +++ b/cjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} \ No newline at end of file diff --git a/cjs/shared/constants.js b/cjs/shared/constants.js index 5f2306bb..ebe14667 100644 --- a/cjs/shared/constants.js +++ b/cjs/shared/constants.js @@ -1,36 +1,18 @@ 'use strict'; -// Node.CONSTANTS (not every engine has Node) +// Node.CONSTANTS +// 'cause some engine has no global Node defined +// (i.e. Node, NativeScript, basicHTML ... ) const ELEMENT_NODE = 1; exports.ELEMENT_NODE = ELEMENT_NODE; -const ATTRIBUTE_NODE = 2; -exports.ATTRIBUTE_NODE = ATTRIBUTE_NODE; -const TEXT_NODE = 3; -exports.TEXT_NODE = TEXT_NODE; -const COMMENT_NODE = 8; -exports.COMMENT_NODE = COMMENT_NODE; const DOCUMENT_FRAGMENT_NODE = 11; exports.DOCUMENT_FRAGMENT_NODE = DOCUMENT_FRAGMENT_NODE; // SVG related constants const OWNER_SVG_ELEMENT = 'ownerSVGElement'; exports.OWNER_SVG_ELEMENT = OWNER_SVG_ELEMENT; -const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; -exports.SVG_NAMESPACE = SVG_NAMESPACE; // Custom Elements / MutationObserver constants const CONNECTED = 'connected'; exports.CONNECTED = CONNECTED; const DISCONNECTED = 'dis' + CONNECTED; exports.DISCONNECTED = DISCONNECTED; - -// hyperHTML related constants -const SHOULD_USE_ATTRIBUTE = /^style$/i; -exports.SHOULD_USE_ATTRIBUTE = SHOULD_USE_ATTRIBUTE; -const SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i; -exports.SHOULD_USE_TEXT_CONTENT = SHOULD_USE_TEXT_CONTENT; -const EXPANDO = '_hyper: '; -exports.EXPANDO = EXPANDO; -const UID = EXPANDO + ((Math.random() * new Date) | 0) + ';'; -exports.UID = UID; -const UIDC = ''; -exports.UIDC = UIDC; \ No newline at end of file diff --git a/cjs/shared/easy-dom.js b/cjs/shared/easy-dom.js deleted file mode 100644 index a3a28812..00000000 --- a/cjs/shared/easy-dom.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; -const create = (node, type) => doc(node).createElement(type); -exports.create = create; -const doc = node => node.ownerDocument || node; -exports.doc = doc; -const fragment = node => doc(node).createDocumentFragment(); -exports.fragment = fragment; -const text = (node, text) => doc(node).createTextNode(text); -exports.text = text; diff --git a/cjs/shared/features-detection.js b/cjs/shared/features-detection.js deleted file mode 100644 index cf3aeac8..00000000 --- a/cjs/shared/features-detection.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; -const {create, fragment, text} = require('./easy-dom.js'); - -const testFragment = fragment(document); - -// DOM4 node.append(...many) -const hasAppend = 'append' in testFragment; -exports.hasAppend = hasAppend; - -// beside IE, old WebKit browsers don't have `children` in DocumentFragment -const hasChildren = 'children' in testFragment; -exports.hasChildren = hasChildren; - -// detect old browsers without HTMLTemplateElement content support -const hasContent = 'content' in create(document, 'template'); -exports.hasContent = hasContent; - -// If attributes order is shuffled, threat the browser differently -// Usually this is a well known IE/Edge only issue but some older FF does the same. -const p = create(document, 'p'); -p.innerHTML = ''; -const hasDoomedAttributes = /class/i.test(p.firstChild.attributes[0].name); -exports.hasDoomedAttributes = hasDoomedAttributes; - -// IE 11 has problems with cloning templates: it "forgets" empty childNodes -testFragment.appendChild(text(testFragment, 'g')); -testFragment.appendChild(text(testFragment, '')); -const hasDoomedCloneNode = testFragment.cloneNode(true).childNodes.length === 1; -exports.hasDoomedCloneNode = hasDoomedCloneNode; - -// old browsers need to fallback to cloneNode -// Custom Elements V0 and V1 will work polyfilled -const hasImportNode = 'importNode' in document; -exports.hasImportNode = hasImportNode; diff --git a/cjs/shared/poorlyfills.js b/cjs/shared/poorlyfills.js deleted file mode 100644 index ef764110..00000000 --- a/cjs/shared/poorlyfills.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -const {UID} = require('./constants.js'); - -let Event = global.Event; -try { - new Event('Event'); -} catch(o_O) { - Event = function (type) { - const e = document.createEvent('Event'); - e.initEvent(type, false, false); - return e; - }; -} -exports.Event = Event; - -const Map = global.Map || function Map() { - const keys = [], values = []; - return { - get(obj) { - return values[keys.indexOf(obj)]; - }, - set(obj, value) { - values[keys.push(obj) - 1] = value; - } - }; -}; -exports.Map = Map; - -const WeakMap = global.WeakMap || function WeakMap() { - return { - delete(obj) { delete obj[UID]; }, - get(obj) { return obj[UID]; }, - has(obj) { return UID in obj; }, - set(obj, value) { - Object.defineProperty(obj, UID, { - configurable: true, - value - }); - } - }; -}; -exports.WeakMap = WeakMap; - -const WeakSet = global.WeakSet || function WeakSet() { - const wm = new WeakMap; - return { - add(obj) { wm.set(obj, true); }, - has(obj) { return wm.get(obj) === true; } - }; -}; -exports.WeakSet = WeakSet; - -// TODO: which browser needs these partial polyfills here? -const isArray = Array.isArray || (toString => - arr => toString.call(arr) === '[object Array]' -)({}.toString); -exports.isArray = isArray; - -const trim = UID.trim || function () { - return this.replace(/^\s+|\s+$/g, ''); -}; -exports.trim = trim; diff --git a/cjs/shared/utils.js b/cjs/shared/utils.js index cabee4dd..ad9a93a7 100644 --- a/cjs/shared/utils.js +++ b/cjs/shared/utils.js @@ -1,146 +1 @@ 'use strict'; -const {ELEMENT_NODE, SVG_NAMESPACE, UID, UIDC} = require('./constants.js'); -const {hasAppend, hasChildren, hasContent} = require('./features-detection.js'); -const {create, doc, fragment} = require('./easy-dom.js'); - -const slice = [].slice; - -// appends an array of nodes -// to a generic node/fragment -const append = hasAppend ? - (node, childNodes) => { - node.append.apply(node, childNodes); - } : - (node, childNodes) => { - const length = childNodes.length; - for (let i = 0; i < length; i++) { - node.appendChild(childNodes[i]); - } - }; -exports.append = append; - -// given a node/fragment, returns its children -const children = hasChildren ? - node => node.children : - node => { - const children = []; - const childNodes = node.childNodes; - const length = childNodes.length; - for (let j = 0, i = 0; i < length; i++) { - const child = childNodes[i]; - if (child.nodeType === ELEMENT_NODE) { - children[j++] = child; - } - } - return children; - }; -exports.children = children; - -// remove comments parts from attributes to avoid issues -// with either old browsers or SVG elements -const cleanAttributes = html => html.replace(no, comments); -exports.cleanAttributes = cleanAttributes; -const attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+'; -const no = new RegExp( - '(<[a-z]+[a-z0-9:_-]*)((?:' + - attrName + - '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*/?>)', - 'gi' -); -const findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi'); -const comments = ($0, $1, $2, $3) => - $1 + $2.replace(findAttributes, replaceAttributes) + $3; -const replaceAttributes = ($0, $1, $2) => $1 + ($2 || '"') + UID + ($2 || '"'); - -// given a node/fragment and a path -// returns the target path, if any -const node = hasChildren ? - (parentNode, path) => { - const length = path.length; - for (let i = 0; i < length; i++) { - parentNode = parentNode[path[i++]][path[i]]; - } - return parentNode; - } : - (parentNode, path) => { - const length = path.length; - for (let i = 0; i < length; i++) { - let name = path[i++]; - parentNode = name === 'children' ? - children(parentNode)[path[i]] : - parentNode[name][path[i]]; - } - return parentNode; - }; -exports.node = node; - -// lazy evaluated -const unique = template => TL(template); -exports.unique = unique; -// TL returns a unique version of the template -// it needs lazy feature detection -// (cannot trust literals with transpiled code) -let TL = template => { - if ( - // TypeScript template literals are not standard - template.propertyIsEnumerable('raw') || - ( - // Firefox < 55 has not standard implementation neither - /Firefox\/(\d+)/.test((global.navigator || {}).userAgent) && - parseFloat(RegExp.$1) < 55 - ) - ) { - // in these cases, address templates once - const templateObjects = {}; - // but always return the same template - TL = template => { - const key = '_' + template.join(UID); - return templateObjects[key] || ( - templateObjects[key] = template - ); - }; - } - else { - // make TL an identity like function - TL = template => template; - } - return TL(template); -}; - -const HTMLFragment = hasContent ? - (node, html) => { - const container = create(node, 'template'); - container.innerHTML = html; - return container.content; - } : - (node, html) => { - const container = create(node, 'template'); - const content = fragment(node); - if (/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html)) { - const selector = RegExp.$1; - container.innerHTML = '' + html + '
'; - append(content, slice.call(container.querySelectorAll(selector))); - } else { - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - } - return content; - }; -exports.HTMLFragment = HTMLFragment; - -const SVGFragment = hasContent ? - (node, html) => { - const content = fragment(node); - const container = doc(node).createElementNS(SVG_NAMESPACE, 'svg'); - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - return content; - } : - (node, html) => { - const content = fragment(node); - const container = create(node, 'div'); - container.innerHTML = '' + html + ''; - append(content, slice.call(container.firstChild.childNodes)); - return content; - }; -exports.SVGFragment = SVGFragment; diff --git a/coverage/coverage.json b/coverage/coverage.json deleted file mode 100644 index 68dd7891..00000000 --- a/coverage/coverage.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/webreflection/code/hyperHTML/index.js":{"path":"/home/webreflection/code/hyperHTML/index.js","s":{"1":2,"2":2,"3":2,"4":1,"5":20,"6":2,"7":28,"8":32,"9":32,"10":32,"11":32,"12":2,"13":1,"14":229,"15":2,"16":4,"17":2,"18":4,"19":2,"20":2,"21":2,"22":1,"23":73,"24":2,"25":1,"26":2,"27":9,"28":9,"29":5,"30":4,"31":5,"32":5,"33":5,"34":9,"35":5,"36":2,"37":2,"38":2,"39":2,"40":2,"41":2,"42":2,"43":2,"44":2,"45":2,"46":2,"47":2,"48":1,"49":113,"50":113,"51":113,"52":2,"53":95,"54":53,"55":53,"56":48,"57":95,"58":95,"59":95,"60":53,"61":38,"62":15,"63":15,"64":41,"65":53,"66":95,"67":1,"68":311,"69":311,"70":170,"71":141,"72":309,"73":1,"74":59,"75":59,"76":24,"77":24,"78":16,"79":2,"80":14,"81":12,"82":59,"83":22,"84":4,"85":4,"86":2,"87":2,"88":2,"89":3,"90":2,"91":4,"92":2,"93":2,"94":22,"95":31,"96":25,"97":20,"98":20,"99":16,"100":4,"101":4,"102":12,"103":6,"104":6,"105":6,"106":2,"107":59,"108":32,"109":20,"110":4,"111":20,"112":20,"113":18,"114":65,"115":47,"116":47,"117":43,"118":4,"119":2,"120":2,"121":39,"122":39,"123":2,"124":2,"125":1,"126":4,"127":4,"128":6,"129":4,"130":4,"131":1,"132":113,"133":113,"134":308,"135":126,"136":126,"137":51,"138":28,"139":28,"140":75,"141":75,"142":2,"143":73,"144":126,"145":4,"146":4,"147":178,"148":8,"149":8,"150":8,"151":170,"152":2,"153":170,"154":170,"155":84,"156":84,"157":5,"158":79,"159":24,"160":24,"161":10,"162":10,"163":12,"164":10,"165":10,"166":45,"167":12,"168":45,"169":4,"170":4,"171":41,"172":88,"173":4,"174":41,"175":41,"176":86,"177":24,"178":62,"179":4,"180":58,"181":10,"182":48,"183":4,"184":44,"185":4,"186":40,"187":28,"188":28,"189":28,"190":28,"191":28,"192":12,"193":4,"194":8,"195":170,"196":1,"197":128,"198":65,"199":65,"200":57,"201":57,"202":1,"203":1,"204":1,"205":1,"206":1,"207":56,"208":56,"209":56,"210":56,"211":1,"212":247,"213":345,"214":345,"215":128,"216":128,"217":128,"218":70,"219":68,"220":68,"221":70,"222":147,"223":4,"224":4,"225":147,"226":2,"227":2,"228":2,"229":2,"230":2,"231":2,"232":2,"233":2,"234":2,"235":1,"236":1,"237":229,"238":2,"239":2,"240":2,"241":1,"242":4,"243":1,"244":2,"245":1,"246":69,"247":102,"248":102,"249":73,"250":69,"251":1,"252":155,"253":1,"254":147,"255":1,"256":145,"257":145,"258":145,"259":145,"260":145,"261":145,"262":69,"263":69,"264":145,"265":1,"266":1,"267":1,"268":144,"269":144,"270":76,"271":68,"272":145,"273":1,"274":2,"275":2,"276":2,"277":1,"278":1,"279":1,"280":1,"281":1,"282":1,"283":2,"284":1,"285":79,"286":1,"287":7,"288":5,"289":5,"290":5,"291":1,"292":5,"293":3,"294":2,"295":0,"296":2,"297":0,"298":5,"299":1,"300":6,"301":6,"302":6,"303":1,"304":57,"305":57,"306":6,"307":6,"308":4,"309":57,"310":1,"311":10,"312":10,"313":2,"314":8,"315":2,"316":6,"317":2,"318":4,"319":1,"320":12,"321":10,"322":10,"323":8,"324":1,"325":86,"326":1,"327":107,"328":1,"329":6,"330":6,"331":38,"332":16,"333":1,"334":65,"335":65,"336":44,"337":21,"338":19,"339":9,"340":9,"341":1,"342":170,"343":24,"344":1,"345":176,"346":176,"347":113,"348":113,"349":59,"350":59,"351":4,"352":4,"353":176,"354":1,"355":128,"356":2,"357":2,"358":2,"359":2,"360":2,"361":1,"362":1,"363":3,"364":3,"365":3,"366":2,"367":2,"368":2,"369":2,"370":2,"371":2,"372":1,"373":1,"374":1,"375":2,"376":2,"377":4,"378":1,"379":187,"380":0,"381":100,"382":2,"383":1,"384":1,"385":0,"386":2,"387":2,"388":1,"389":1,"390":85,"391":60,"392":2,"393":1,"394":1,"395":1,"396":109,"397":2,"398":25,"399":2,"400":2,"401":2,"402":2,"403":1,"404":228,"405":228,"406":2,"407":74,"408":5,"409":6,"410":2,"411":180,"412":432,"413":432,"414":223,"415":180,"416":109,"417":2,"418":90,"419":154,"420":154,"421":70,"422":70,"423":84,"424":84,"425":90,"426":94,"427":161,"428":94,"429":2,"430":2,"431":2,"432":2,"433":44,"434":2,"435":57,"436":2,"437":2,"438":2,"439":2,"440":2,"441":2,"442":2,"443":2,"444":2,"445":2,"446":232,"447":163,"448":232,"449":69,"450":2,"451":21,"452":15,"453":6,"454":15,"455":21,"456":2,"457":18,"458":12,"459":4,"460":14,"461":18,"462":1,"463":40,"464":40,"465":10,"466":10,"467":1,"468":36,"469":10,"470":26,"471":1,"472":46,"473":82,"474":8,"475":8,"476":6,"477":8,"478":8,"479":36,"480":36,"481":36,"482":36,"483":36,"484":36,"485":36,"486":36,"487":26,"488":26,"489":4,"490":10,"491":10,"492":36,"493":36,"494":6,"495":30,"496":36,"497":30,"498":36,"499":38,"500":38,"501":38,"502":46,"503":1,"504":32,"505":46,"506":46,"507":46,"508":32,"509":32,"510":1,"511":119,"512":119,"513":119,"514":119,"515":119,"516":119,"517":1,"518":128,"519":128,"520":128,"521":4,"522":4,"523":68,"524":68,"525":68,"526":56,"527":56,"528":56,"529":128,"530":107,"531":128,"532":1,"533":138,"534":130,"535":130,"536":138,"537":138,"538":1,"539":311,"540":347,"541":1,"542":170,"543":170,"544":170,"545":170,"546":138,"547":138,"548":138,"549":138,"550":137,"551":137,"552":32,"553":32,"554":32,"555":1,"556":67,"557":1,"558":67,"559":67,"560":67,"561":1,"562":103,"563":69,"564":69,"565":8,"566":69,"567":103,"568":67,"569":14,"570":14,"571":14,"572":10,"573":10,"574":10,"575":14,"576":10,"577":2,"578":2,"579":2,"580":8,"581":2,"582":8,"583":14,"584":14,"585":14,"586":90,"587":90,"588":59,"589":59,"590":59,"591":90,"592":89,"593":1,"594":56,"595":56,"596":56,"597":56,"598":12,"599":12,"600":56,"601":29,"602":29,"603":56,"604":2,"605":2,"606":2,"607":1,"608":53,"609":53,"610":26,"611":26,"612":26,"613":27,"614":4,"615":4,"616":23,"617":2,"618":113,"619":113,"620":95,"621":95,"622":95,"623":95,"624":113,"625":2,"626":1,"627":23,"628":23,"629":23,"630":23,"631":23,"632":23,"633":23,"634":23,"635":23,"636":23,"637":23,"638":23,"639":23,"640":42,"641":23,"642":38,"643":38,"644":38,"645":38,"646":38,"647":75,"648":75,"649":75,"650":75,"651":75,"652":38,"653":23,"654":1,"655":32,"656":1,"657":23,"658":23,"659":43,"660":43,"661":43,"662":43,"663":43,"664":43,"665":43,"666":33,"667":33,"668":33,"669":18,"670":10,"671":7,"672":7,"673":3,"674":3,"675":23,"676":2,"677":23,"678":2,"679":23,"680":1,"681":23,"682":23,"683":23,"684":23,"685":9,"686":9,"687":2,"688":2,"689":7,"690":7,"691":7,"692":9,"693":23,"694":2,"695":2},"b":{"1":[14,6],"2":[2,12],"3":[2,10],"4":[2,8],"5":[4,4],"6":[2,4],"7":[2,2],"8":[15,58],"9":[6,52],"10":[6,2],"11":[52,26],"12":[9,7,7],"13":[2,3],"14":[48,5],"15":[53,42],"16":[38,15],"17":[170,141],"18":[311,183],"19":[59,57],"20":[59,57,22],"21":[16,43],"22":[59,37],"23":[59,22,20],"24":[24,35],"25":[59,43],"26":[16,8],"27":[2,14],"28":[16,15],"29":[12,2],"30":[22,37],"31":[4,18],"32":[2,2],"33":[25,6],"34":[20,5],"35":[16,4],"36":[4,12],"37":[2,4],"38":[16,43],"39":[20,12],"40":[4,16],"41":[18,2],"42":[12,31],"43":[47,18],"44":[43,4],"45":[4,39],"46":[2,2],"47":[2,37],"48":[4,2],"49":[112,124,126,4,172,178,170],"50":[51,75],"51":[126,53],"52":[28,23],"53":[2,73],"54":[8,170],"55":[2,168],"56":[84,86],"57":[5,79],"58":[16,24,24,10,45,41],"59":[12,33],"60":[4,41],"61":[4,84],"62":[24,62],"63":[8,16],"64":[4,58],"65":[10,48],"66":[4,44],"67":[4,40],"68":[28,12],"69":[4,8],"70":[57,8],"71":[1,56],"72":[56,4],"73":[128,70,147],"74":[68,2],"75":[4,143],"76":[147,4],"77":[2,1,1],"78":[1,1],"79":[2,2],"80":[73,29],"81":[102,43],"82":[61,8],"83":[2,145],"84":[1,144],"85":[69,76],"86":[1,144],"87":[76,68],"88":[1,1],"89":[2,1],"90":[5,0],"91":[3,2],"92":[3,3],"93":[0,2],"94":[2,0],"95":[6,6],"96":[6,6],"97":[6,51],"98":[57,57],"99":[4,2],"100":[57,57],"101":[2,8],"102":[2,6],"103":[2,4],"104":[8,2],"105":[107,107],"106":[38,14],"107":[44,21],"108":[9,10],"109":[19,10],"110":[113,59,4],"111":[1,1],"112":[1,1],"113":[1,1],"114":[2,1],"115":[2,1],"116":[228,60],"117":[1,1],"118":[1,1],"119":[2,1],"120":[223,209],"121":[1,1],"122":[2,1],"123":[70,84],"124":[57,30],"125":[57,30],"126":[1,1],"127":[1,1],"128":[6,9],"129":[1,1],"130":[4,8],"131":[10,30],"132":[40,16],"133":[10,26],"134":[8,36,38],"135":[6,2],"136":[8,28],"137":[10,26],"138":[26,4,10],"139":[6,30],"140":[30,6],"141":[38,8],"142":[4,4,68,18,56],"143":[170,119],"144":[138,32],"145":[8,59],"146":[69,34],"147":[8,61],"148":[8,59],"149":[10,4],"150":[10,4],"151":[2,8],"152":[2,6],"153":[59,31],"154":[12,44],"155":[12,12],"156":[29,27],"157":[56,31],"158":[1,1],"159":[53,30],"160":[53,26],"161":[53,4],"162":[26,27],"163":[53,27],"164":[26,0],"165":[26,0],"166":[4,23],"167":[21,54],"168":[18,57],"169":[8,10],"170":[14,43],"171":[66,45],"172":[33,10],"173":[43,36,33],"174":[18,15],"175":[7,3],"176":[10,7],"177":[23,0],"178":[2,7],"179":[9,5,2],"180":[2,5],"181":[2,3]},"f":{"1":2,"2":20,"3":28,"4":32,"5":229,"6":4,"7":2,"8":73,"9":13,"10":9,"11":5,"12":4,"13":5,"14":113,"15":95,"16":311,"17":59,"18":2,"19":2,"20":31,"21":32,"22":65,"23":4,"24":6,"25":113,"26":308,"27":128,"28":247,"29":2,"30":2,"31":229,"32":4,"33":2,"34":69,"35":155,"36":147,"37":145,"38":2,"39":79,"40":7,"41":5,"42":6,"43":57,"44":10,"45":12,"46":86,"47":107,"48":6,"49":38,"50":16,"51":65,"52":170,"53":176,"54":128,"55":3,"56":2,"57":1,"58":2,"59":4,"60":1,"61":187,"62":0,"63":100,"64":1,"65":0,"66":2,"67":1,"68":85,"69":60,"70":1,"71":109,"72":25,"73":228,"74":74,"75":5,"76":180,"77":109,"78":90,"79":94,"80":44,"81":57,"82":2,"83":232,"84":69,"85":21,"86":21,"87":18,"88":18,"89":40,"90":36,"91":46,"92":32,"93":119,"94":128,"95":138,"96":311,"97":170,"98":67,"99":67,"100":103,"101":14,"102":14,"103":90,"104":56,"105":2,"106":53,"107":113,"108":95,"109":23,"110":32,"111":23,"112":23},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":53}}},"2":{"name":"hyper","line":16,"loc":{"start":{"line":16,"column":2},"end":{"line":16,"column":23}}},"3":{"name":"adopt","line":38,"loc":{"start":{"line":38,"column":16},"end":{"line":38,"column":37}}},"4":{"name":"(anonymous_4)","line":39,"loc":{"start":{"line":39,"column":11},"end":{"line":39,"column":23}}},"5":{"name":"bind","line":50,"loc":{"start":{"line":50,"column":2},"end":{"line":50,"column":25}}},"6":{"name":"define","line":53,"loc":{"start":{"line":53,"column":17},"end":{"line":53,"column":56}}},"7":{"name":"escape","line":62,"loc":{"start":{"line":62,"column":17},"end":{"line":62,"column":39}}},"8":{"name":"wire","line":69,"loc":{"start":{"line":69,"column":2},"end":{"line":69,"column":27}}},"9":{"name":"Component","line":83,"loc":{"start":{"line":83,"column":2},"end":{"line":83,"column":23}}},"10":{"name":"(anonymous_10)","line":88,"loc":{"start":{"line":88,"column":27},"end":{"line":88,"column":40}}},"11":{"name":"(anonymous_11)","line":101,"loc":{"start":{"line":101,"column":33},"end":{"line":101,"column":45}}},"12":{"name":"(anonymous_12)","line":103,"loc":{"start":{"line":103,"column":26},"end":{"line":103,"column":38}}},"13":{"name":"(anonymous_13)","line":105,"loc":{"start":{"line":105,"column":24},"end":{"line":105,"column":41}}},"14":{"name":"Aura","line":146,"loc":{"start":{"line":146,"column":2},"end":{"line":146,"column":34}}},"15":{"name":"splice","line":152,"loc":{"start":{"line":152,"column":26},"end":{"line":152,"column":49}}},"16":{"name":"render","line":191,"loc":{"start":{"line":191,"column":2},"end":{"line":191,"column":28}}},"17":{"name":"setAttribute","line":208,"loc":{"start":{"line":208,"column":2},"end":{"line":208,"column":59}}},"18":{"name":"(anonymous_18)","line":238,"loc":{"start":{"line":238,"column":15},"end":{"line":238,"column":27}}},"19":{"name":"(anonymous_19)","line":249,"loc":{"start":{"line":249,"column":13},"end":{"line":249,"column":25}}},"20":{"name":"specialAttr","line":255,"loc":{"start":{"line":255,"column":20},"end":{"line":255,"column":51}}},"21":{"name":"eventAttr","line":283,"loc":{"start":{"line":283,"column":6},"end":{"line":283,"column":35}}},"22":{"name":"normalAttr","line":292,"loc":{"start":{"line":292,"column":8},"end":{"line":292,"column":38}}},"23":{"name":"setTextContent","line":318,"loc":{"start":{"line":318,"column":2},"end":{"line":318,"column":32}}},"24":{"name":"(anonymous_24)","line":320,"loc":{"start":{"line":320,"column":11},"end":{"line":320,"column":28}}},"25":{"name":"setAnyContent","line":330,"loc":{"start":{"line":330,"column":2},"end":{"line":330,"column":49}}},"26":{"name":"anyContent","line":332,"loc":{"start":{"line":332,"column":11},"end":{"line":332,"column":38}}},"27":{"name":"attributesSeeker","line":445,"loc":{"start":{"line":445,"column":2},"end":{"line":445,"column":48}}},"28":{"name":"hyperSeeker","line":484,"loc":{"start":{"line":484,"column":2},"end":{"line":484,"column":43}}},"29":{"name":"(anonymous_29)","line":540,"loc":{"start":{"line":540,"column":13},"end":{"line":540,"column":25}}},"30":{"name":"(anonymous_30)","line":553,"loc":{"start":{"line":553,"column":11},"end":{"line":553,"column":31}}},"31":{"name":"(anonymous_31)","line":555,"loc":{"start":{"line":555,"column":14},"end":{"line":555,"column":27}}},"32":{"name":"fnEscape","line":574,"loc":{"start":{"line":574,"column":2},"end":{"line":574,"column":23}}},"33":{"name":"asHTML","line":579,"loc":{"start":{"line":579,"column":2},"end":{"line":579,"column":24}}},"34":{"name":"createContent","line":584,"loc":{"start":{"line":584,"column":2},"end":{"line":584,"column":31}}},"35":{"name":"createDocumentFragment","line":605,"loc":{"start":{"line":605,"column":2},"end":{"line":605,"column":44}}},"36":{"name":"createFragment","line":611,"loc":{"start":{"line":611,"column":2},"end":{"line":611,"column":38}}},"37":{"name":"createHTMLFragment","line":620,"loc":{"start":{"line":620,"column":2},"end":{"line":620,"column":42}}},"38":{"name":"createSVGFragment","line":665,"loc":{"start":{"line":665,"column":2},"end":{"line":665,"column":41}}},"39":{"name":"createText","line":681,"loc":{"start":{"line":681,"column":2},"end":{"line":681,"column":34}}},"40":{"name":"dispatchAll","line":686,"loc":{"start":{"line":686,"column":2},"end":{"line":686,"column":36}}},"41":{"name":"dispatchTarget","line":702,"loc":{"start":{"line":702,"column":2},"end":{"line":702,"column":54}}},"42":{"name":"getCEClass","line":724,"loc":{"start":{"line":724,"column":2},"end":{"line":724,"column":28}}},"43":{"name":"isSpecialAttribute","line":732,"loc":{"start":{"line":732,"column":2},"end":{"line":732,"column":42}}},"44":{"name":"invokeAtDistance","line":742,"loc":{"start":{"line":742,"column":2},"end":{"line":742,"column":45}}},"45":{"name":"invokeTransformer","line":756,"loc":{"start":{"line":756,"column":2},"end":{"line":756,"column":47}}},"46":{"name":"isNode_ish","line":766,"loc":{"start":{"line":766,"column":2},"end":{"line":766,"column":29}}},"47":{"name":"isPromise_ish","line":771,"loc":{"start":{"line":771,"column":2},"end":{"line":771,"column":32}}},"48":{"name":"lazyGetter","line":777,"loc":{"start":{"line":777,"column":2},"end":{"line":777,"column":32}}},"49":{"name":"(anonymous_49)","line":780,"loc":{"start":{"line":780,"column":11},"end":{"line":780,"column":23}}},"50":{"name":"(anonymous_50)","line":783,"loc":{"start":{"line":783,"column":11},"end":{"line":783,"column":28}}},"51":{"name":"optimist","line":790,"loc":{"start":{"line":790,"column":2},"end":{"line":790,"column":33}}},"52":{"name":"removeAttributeList","line":805,"loc":{"start":{"line":805,"column":2},"end":{"line":805,"column":37}}},"53":{"name":"setContent","line":812,"loc":{"start":{"line":812,"column":2},"end":{"line":812,"column":66}}},"54":{"name":"Path","line":830,"loc":{"start":{"line":830,"column":2},"end":{"line":830,"column":34}}},"55":{"name":"(anonymous_55)","line":846,"loc":{"start":{"line":846,"column":13},"end":{"line":846,"column":29}}},"56":{"name":"(anonymous_56)","line":854,"loc":{"start":{"line":854,"column":26},"end":{"line":854,"column":45}}},"57":{"name":"(anonymous_57)","line":862,"loc":{"start":{"line":862,"column":55},"end":{"line":862,"column":68}}},"58":{"name":"(anonymous_58)","line":865,"loc":{"start":{"line":865,"column":54},"end":{"line":865,"column":67}}},"59":{"name":"(anonymous_59)","line":872,"loc":{"start":{"line":872,"column":6},"end":{"line":872,"column":18}}},"60":{"name":"(anonymous_60)","line":876,"loc":{"start":{"line":876,"column":18},"end":{"line":876,"column":33}},"skip":true},"61":{"name":"(anonymous_61)","line":877,"loc":{"start":{"line":877,"column":15},"end":{"line":877,"column":30}},"skip":true},"62":{"name":"(anonymous_62)","line":878,"loc":{"start":{"line":878,"column":15},"end":{"line":878,"column":30}},"skip":true},"63":{"name":"(anonymous_63)","line":879,"loc":{"start":{"line":879,"column":15},"end":{"line":879,"column":37}},"skip":true},"64":{"name":"(anonymous_64)","line":890,"loc":{"start":{"line":890,"column":6},"end":{"line":890,"column":18}}},"65":{"name":"(anonymous_65)","line":895,"loc":{"start":{"line":895,"column":15},"end":{"line":895,"column":30}},"skip":true},"66":{"name":"(anonymous_66)","line":896,"loc":{"start":{"line":896,"column":15},"end":{"line":896,"column":30}},"skip":true},"67":{"name":"(anonymous_67)","line":903,"loc":{"start":{"line":903,"column":6},"end":{"line":903,"column":18}}},"68":{"name":"(anonymous_68)","line":906,"loc":{"start":{"line":906,"column":15},"end":{"line":906,"column":30}}},"69":{"name":"(anonymous_69)","line":912,"loc":{"start":{"line":912,"column":15},"end":{"line":912,"column":37}}},"70":{"name":"(anonymous_70)","line":923,"loc":{"start":{"line":923,"column":17},"end":{"line":923,"column":29}}},"71":{"name":"(anonymous_71)","line":928,"loc":{"start":{"line":928,"column":25},"end":{"line":928,"column":38}}},"72":{"name":"(anonymous_72)","line":935,"loc":{"start":{"line":935,"column":14},"end":{"line":935,"column":26}}},"73":{"name":"unique","line":950,"loc":{"start":{"line":950,"column":2},"end":{"line":950,"column":28}}},"74":{"name":"(anonymous_74)","line":958,"loc":{"start":{"line":958,"column":6},"end":{"line":958,"column":34}}},"75":{"name":"appendNodes","line":961,"loc":{"start":{"line":961,"column":6},"end":{"line":961,"column":45}}},"76":{"name":"(anonymous_76)","line":973,"loc":{"start":{"line":973,"column":6},"end":{"line":973,"column":22}}},"77":{"name":"(anonymous_77)","line":987,"loc":{"start":{"line":987,"column":6},"end":{"line":987,"column":22}}},"78":{"name":"(anonymous_78)","line":992,"loc":{"start":{"line":992,"column":6},"end":{"line":992,"column":34}}},"79":{"name":"(anonymous_79)","line":1006,"loc":{"start":{"line":1006,"column":6},"end":{"line":1006,"column":34}}},"80":{"name":"(anonymous_80)","line":1017,"loc":{"start":{"line":1017,"column":17},"end":{"line":1017,"column":43}}},"81":{"name":"(anonymous_81)","line":1021,"loc":{"start":{"line":1021,"column":26},"end":{"line":1021,"column":48}}},"82":{"name":"(anonymous_82)","line":1045,"loc":{"start":{"line":1045,"column":19},"end":{"line":1045,"column":31}}},"83":{"name":"(anonymous_83)","line":1049,"loc":{"start":{"line":1049,"column":6},"end":{"line":1049,"column":22}}},"84":{"name":"(anonymous_84)","line":1060,"loc":{"start":{"line":1060,"column":6},"end":{"line":1060,"column":26}}},"85":{"name":"(anonymous_85)","line":1071,"loc":{"start":{"line":1071,"column":4},"end":{"line":1071,"column":20}}},"86":{"name":"(anonymous_86)","line":1077,"loc":{"start":{"line":1077,"column":4},"end":{"line":1077,"column":20}}},"87":{"name":"(anonymous_87)","line":1080,"loc":{"start":{"line":1080,"column":4},"end":{"line":1080,"column":20}}},"88":{"name":"(anonymous_88)","line":1086,"loc":{"start":{"line":1086,"column":4},"end":{"line":1086,"column":20}}},"89":{"name":"removePreviousText","line":1089,"loc":{"start":{"line":1089,"column":2},"end":{"line":1089,"column":48}}},"90":{"name":"insertBefore","line":1098,"loc":{"start":{"line":1098,"column":2},"end":{"line":1098,"column":51}}},"91":{"name":"discoverNode","line":1108,"loc":{"start":{"line":1108,"column":2},"end":{"line":1108,"column":63}}},"92":{"name":"discoverUpdates","line":1187,"loc":{"start":{"line":1187,"column":2},"end":{"line":1187,"column":44}}},"93":{"name":"createTemplate","line":1214,"loc":{"start":{"line":1214,"column":2},"end":{"line":1214,"column":36}}},"94":{"name":"createPath","line":1226,"loc":{"start":{"line":1226,"column":2},"end":{"line":1226,"column":28}}},"95":{"name":"createUpdates","line":1260,"loc":{"start":{"line":1260,"column":2},"end":{"line":1260,"column":42}}},"96":{"name":"update","line":1281,"loc":{"start":{"line":1281,"column":2},"end":{"line":1281,"column":20}}},"97":{"name":"upgrade","line":1289,"loc":{"start":{"line":1289,"column":2},"end":{"line":1289,"column":29}}},"98":{"name":"wireContent","line":1313,"loc":{"start":{"line":1313,"column":2},"end":{"line":1313,"column":29}}},"99":{"name":"before","line":1316,"loc":{"start":{"line":1316,"column":4},"end":{"line":1316,"column":30}}},"100":{"name":"after","line":1324,"loc":{"start":{"line":1324,"column":4},"end":{"line":1324,"column":21}}},"101":{"name":"adopt","line":1336,"loc":{"start":{"line":1336,"column":6},"end":{"line":1336,"column":30}}},"102":{"name":"(anonymous_102)","line":1342,"loc":{"start":{"line":1342,"column":20},"end":{"line":1342,"column":55}}},"103":{"name":"update","line":1363,"loc":{"start":{"line":1363,"column":6},"end":{"line":1363,"column":31}}},"104":{"name":"wireWeakly","line":1376,"loc":{"start":{"line":1376,"column":2},"end":{"line":1376,"column":33}}},"105":{"name":"(anonymous_105)","line":1407,"loc":{"start":{"line":1407,"column":12},"end":{"line":1407,"column":24}}},"106":{"name":"majinbuu","line":1419,"loc":{"start":{"line":1419,"column":2},"end":{"line":1419,"column":40}}},"107":{"name":"aura","line":1448,"loc":{"start":{"line":1448,"column":18},"end":{"line":1448,"column":47}}},"108":{"name":"hodor","line":1450,"loc":{"start":{"line":1450,"column":18},"end":{"line":1450,"column":35}}},"109":{"name":"levenstein","line":1467,"loc":{"start":{"line":1467,"column":2},"end":{"line":1467,"column":32}}},"110":{"name":"addOperation","line":1503,"loc":{"start":{"line":1503,"column":2},"end":{"line":1503,"column":56}}},"111":{"name":"getOperations","line":1514,"loc":{"start":{"line":1514,"column":2},"end":{"line":1514,"column":37}}},"112":{"name":"performOperations","line":1557,"loc":{"start":{"line":1557,"column":2},"end":{"line":1557,"column":49}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1597,"column":6}},"2":{"start":{"line":11,"column":2},"end":{"line":11,"column":34}},"3":{"start":{"line":14,"column":2},"end":{"line":14,"column":22}},"4":{"start":{"line":16,"column":2},"end":{"line":33,"column":3}},"5":{"start":{"line":17,"column":4},"end":{"line":32,"column":31}},"6":{"start":{"line":38,"column":2},"end":{"line":45,"column":4}},"7":{"start":{"line":39,"column":4},"end":{"line":44,"column":6}},"8":{"start":{"line":40,"column":6},"end":{"line":40,"column":26}},"9":{"start":{"line":41,"column":6},"end":{"line":41,"column":36}},"10":{"start":{"line":42,"column":6},"end":{"line":42,"column":25}},"11":{"start":{"line":43,"column":6},"end":{"line":43,"column":18}},"12":{"start":{"line":49,"column":2},"end":{"line":49,"column":20}},"13":{"start":{"line":50,"column":2},"end":{"line":50,"column":57}},"14":{"start":{"line":50,"column":27},"end":{"line":50,"column":55}},"15":{"start":{"line":53,"column":2},"end":{"line":59,"column":4}},"16":{"start":{"line":54,"column":4},"end":{"line":56,"column":5}},"17":{"start":{"line":55,"column":6},"end":{"line":55,"column":41}},"18":{"start":{"line":57,"column":4},"end":{"line":57,"column":41}},"19":{"start":{"line":62,"column":2},"end":{"line":64,"column":4}},"20":{"start":{"line":63,"column":4},"end":{"line":63,"column":46}},"21":{"start":{"line":68,"column":2},"end":{"line":68,"column":20}},"22":{"start":{"line":69,"column":2},"end":{"line":76,"column":3}},"23":{"start":{"line":70,"column":4},"end":{"line":75,"column":8}},"24":{"start":{"line":82,"column":2},"end":{"line":82,"column":30}},"25":{"start":{"line":83,"column":2},"end":{"line":83,"column":25}},"26":{"start":{"line":84,"column":2},"end":{"line":115,"column":4}},"27":{"start":{"line":90,"column":8},"end":{"line":90,"column":33}},"28":{"start":{"line":91,"column":8},"end":{"line":94,"column":13}},"29":{"start":{"line":101,"column":47},"end":{"line":101,"column":72}},"30":{"start":{"line":103,"column":40},"end":{"line":103,"column":50}},"31":{"start":{"line":106,"column":8},"end":{"line":106,"column":32}},"32":{"start":{"line":107,"column":8},"end":{"line":107,"column":84}},"33":{"start":{"line":108,"column":8},"end":{"line":108,"column":58}},"34":{"start":{"line":108,"column":32},"end":{"line":108,"column":58}},"35":{"start":{"line":109,"column":8},"end":{"line":109,"column":22}},"36":{"start":{"line":126,"column":2},"end":{"line":126,"column":23}},"37":{"start":{"line":127,"column":2},"end":{"line":127,"column":25}},"38":{"start":{"line":128,"column":2},"end":{"line":128,"column":20}},"39":{"start":{"line":129,"column":2},"end":{"line":129,"column":23}},"40":{"start":{"line":130,"column":2},"end":{"line":130,"column":34}},"41":{"start":{"line":133,"column":2},"end":{"line":133,"column":44}},"42":{"start":{"line":134,"column":2},"end":{"line":134,"column":51}},"43":{"start":{"line":136,"column":2},"end":{"line":136,"column":40}},"44":{"start":{"line":137,"column":2},"end":{"line":137,"column":52}},"45":{"start":{"line":138,"column":2},"end":{"line":138,"column":27}},"46":{"start":{"line":139,"column":2},"end":{"line":139,"column":61}},"47":{"start":{"line":140,"column":2},"end":{"line":140,"column":34}},"48":{"start":{"line":146,"column":2},"end":{"line":150,"column":3}},"49":{"start":{"line":147,"column":4},"end":{"line":147,"column":21}},"50":{"start":{"line":148,"column":4},"end":{"line":148,"column":33}},"51":{"start":{"line":149,"column":4},"end":{"line":149,"column":43}},"52":{"start":{"line":152,"column":2},"end":{"line":184,"column":4}},"53":{"start":{"line":153,"column":4},"end":{"line":169,"column":5}},"54":{"start":{"line":164,"column":6},"end":{"line":164,"column":22}},"55":{"start":{"line":166,"column":6},"end":{"line":168,"column":7}},"56":{"start":{"line":167,"column":8},"end":{"line":167,"column":28}},"57":{"start":{"line":170,"column":4},"end":{"line":170,"column":10}},"58":{"start":{"line":171,"column":4},"end":{"line":171,"column":30}},"59":{"start":{"line":172,"column":4},"end":{"line":182,"column":5}},"60":{"start":{"line":173,"column":6},"end":{"line":180,"column":7}},"61":{"start":{"line":174,"column":8},"end":{"line":174,"column":27}},"62":{"start":{"line":176,"column":8},"end":{"line":176,"column":55}},"63":{"start":{"line":177,"column":8},"end":{"line":179,"column":9}},"64":{"start":{"line":178,"column":10},"end":{"line":178,"column":42}},"65":{"start":{"line":181,"column":6},"end":{"line":181,"column":35}},"66":{"start":{"line":183,"column":4},"end":{"line":183,"column":18}},"67":{"start":{"line":191,"column":2},"end":{"line":202,"column":3}},"68":{"start":{"line":192,"column":4},"end":{"line":192,"column":33}},"69":{"start":{"line":193,"column":4},"end":{"line":200,"column":5}},"70":{"start":{"line":197,"column":6},"end":{"line":197,"column":37}},"71":{"start":{"line":199,"column":6},"end":{"line":199,"column":45}},"72":{"start":{"line":201,"column":4},"end":{"line":201,"column":16}},"73":{"start":{"line":208,"column":2},"end":{"line":315,"column":3}},"74":{"start":{"line":209,"column":4},"end":{"line":220,"column":5}},"75":{"start":{"line":221,"column":4},"end":{"line":231,"column":5}},"76":{"start":{"line":222,"column":6},"end":{"line":222,"column":40}},"77":{"start":{"line":223,"column":6},"end":{"line":230,"column":7}},"78":{"start":{"line":224,"column":8},"end":{"line":229,"column":9}},"79":{"start":{"line":225,"column":10},"end":{"line":225,"column":31}},"80":{"start":{"line":227,"column":13},"end":{"line":229,"column":9}},"81":{"start":{"line":228,"column":10},"end":{"line":228,"column":36}},"82":{"start":{"line":232,"column":4},"end":{"line":281,"column":5}},"83":{"start":{"line":233,"column":6},"end":{"line":254,"column":7}},"84":{"start":{"line":234,"column":8},"end":{"line":234,"column":41}},"85":{"start":{"line":235,"column":8},"end":{"line":246,"column":9}},"86":{"start":{"line":236,"column":10},"end":{"line":244,"column":12}},"87":{"start":{"line":239,"column":14},"end":{"line":239,"column":40}},"88":{"start":{"line":240,"column":14},"end":{"line":242,"column":15}},"89":{"start":{"line":241,"column":16},"end":{"line":241,"column":33}},"90":{"start":{"line":245,"column":10},"end":{"line":245,"column":42}},"91":{"start":{"line":247,"column":8},"end":{"line":253,"column":10}},"92":{"start":{"line":250,"column":12},"end":{"line":250,"column":31}},"93":{"start":{"line":251,"column":12},"end":{"line":251,"column":32}},"94":{"start":{"line":255,"column":6},"end":{"line":280,"column":8}},"95":{"start":{"line":256,"column":8},"end":{"line":279,"column":9}},"96":{"start":{"line":257,"column":10},"end":{"line":274,"column":11}},"97":{"start":{"line":258,"column":12},"end":{"line":258,"column":32}},"98":{"start":{"line":261,"column":12},"end":{"line":273,"column":13}},"99":{"start":{"line":265,"column":14},"end":{"line":272,"column":15}},"100":{"start":{"line":268,"column":16},"end":{"line":268,"column":34}},"101":{"start":{"line":269,"column":16},"end":{"line":269,"column":43}},"102":{"start":{"line":271,"column":16},"end":{"line":271,"column":38}},"103":{"start":{"line":276,"column":10},"end":{"line":276,"column":37}},"104":{"start":{"line":277,"column":10},"end":{"line":277,"column":39}},"105":{"start":{"line":278,"column":10},"end":{"line":278,"column":40}},"106":{"start":{"line":278,"column":28},"end":{"line":278,"column":40}},"107":{"start":{"line":282,"column":4},"end":{"line":314,"column":8}},"108":{"start":{"line":284,"column":8},"end":{"line":288,"column":9}},"109":{"start":{"line":285,"column":10},"end":{"line":285,"column":72}},"110":{"start":{"line":285,"column":24},"end":{"line":285,"column":72}},"111":{"start":{"line":286,"column":10},"end":{"line":286,"column":30}},"112":{"start":{"line":287,"column":10},"end":{"line":287,"column":69}},"113":{"start":{"line":287,"column":24},"end":{"line":287,"column":69}},"114":{"start":{"line":293,"column":10},"end":{"line":312,"column":11}},"115":{"start":{"line":294,"column":12},"end":{"line":294,"column":32}},"116":{"start":{"line":297,"column":12},"end":{"line":311,"column":13}},"117":{"start":{"line":298,"column":14},"end":{"line":310,"column":15}},"118":{"start":{"line":299,"column":16},"end":{"line":303,"column":17}},"119":{"start":{"line":301,"column":18},"end":{"line":301,"column":33}},"120":{"start":{"line":302,"column":18},"end":{"line":302,"column":54}},"121":{"start":{"line":305,"column":16},"end":{"line":305,"column":43}},"122":{"start":{"line":306,"column":16},"end":{"line":309,"column":17}},"123":{"start":{"line":307,"column":18},"end":{"line":307,"column":34}},"124":{"start":{"line":308,"column":18},"end":{"line":308,"column":51}},"125":{"start":{"line":318,"column":2},"end":{"line":326,"column":3}},"126":{"start":{"line":319,"column":4},"end":{"line":319,"column":17}},"127":{"start":{"line":320,"column":4},"end":{"line":325,"column":6}},"128":{"start":{"line":321,"column":6},"end":{"line":324,"column":7}},"129":{"start":{"line":322,"column":8},"end":{"line":322,"column":25}},"130":{"start":{"line":323,"column":8},"end":{"line":323,"column":33}},"131":{"start":{"line":330,"column":2},"end":{"line":438,"column":3}},"132":{"start":{"line":331,"column":4},"end":{"line":331,"column":17}},"133":{"start":{"line":332,"column":4},"end":{"line":437,"column":6}},"134":{"start":{"line":333,"column":6},"end":{"line":436,"column":7}},"135":{"start":{"line":337,"column":10},"end":{"line":337,"column":41}},"136":{"start":{"line":338,"column":10},"end":{"line":356,"column":11}},"137":{"start":{"line":342,"column":12},"end":{"line":345,"column":13}},"138":{"start":{"line":343,"column":14},"end":{"line":343,"column":31}},"139":{"start":{"line":344,"column":14},"end":{"line":344,"column":48}},"140":{"start":{"line":347,"column":12},"end":{"line":347,"column":29}},"141":{"start":{"line":348,"column":12},"end":{"line":355,"column":13}},"142":{"start":{"line":349,"column":14},"end":{"line":349,"column":62}},"143":{"start":{"line":351,"column":14},"end":{"line":354,"column":16}},"144":{"start":{"line":357,"column":10},"end":{"line":357,"column":16}},"145":{"start":{"line":359,"column":10},"end":{"line":359,"column":60}},"146":{"start":{"line":360,"column":10},"end":{"line":360,"column":16}},"147":{"start":{"line":363,"column":10},"end":{"line":369,"column":11}},"148":{"start":{"line":364,"column":12},"end":{"line":364,"column":29}},"149":{"start":{"line":365,"column":12},"end":{"line":365,"column":27}},"150":{"start":{"line":366,"column":12},"end":{"line":366,"column":18}},"151":{"start":{"line":367,"column":17},"end":{"line":369,"column":11}},"152":{"start":{"line":368,"column":12},"end":{"line":368,"column":35}},"153":{"start":{"line":371,"column":10},"end":{"line":371,"column":27}},"154":{"start":{"line":372,"column":10},"end":{"line":434,"column":11}},"155":{"start":{"line":373,"column":12},"end":{"line":373,"column":38}},"156":{"start":{"line":374,"column":12},"end":{"line":408,"column":13}},"157":{"start":{"line":375,"column":14},"end":{"line":375,"column":29}},"158":{"start":{"line":377,"column":14},"end":{"line":407,"column":15}},"159":{"start":{"line":381,"column":18},"end":{"line":381,"column":44}},"160":{"start":{"line":382,"column":18},"end":{"line":382,"column":24}},"161":{"start":{"line":384,"column":18},"end":{"line":384,"column":51}},"162":{"start":{"line":385,"column":18},"end":{"line":387,"column":19}},"163":{"start":{"line":386,"column":20},"end":{"line":386,"column":67}},"164":{"start":{"line":388,"column":18},"end":{"line":388,"column":60}},"165":{"start":{"line":389,"column":18},"end":{"line":389,"column":24}},"166":{"start":{"line":391,"column":18},"end":{"line":393,"column":19}},"167":{"start":{"line":392,"column":20},"end":{"line":392,"column":58}},"168":{"start":{"line":394,"column":18},"end":{"line":403,"column":19}},"169":{"start":{"line":395,"column":20},"end":{"line":395,"column":56}},"170":{"start":{"line":396,"column":20},"end":{"line":396,"column":26}},"171":{"start":{"line":398,"column":20},"end":{"line":402,"column":21}},"172":{"start":{"line":399,"column":22},"end":{"line":401,"column":23}},"173":{"start":{"line":400,"column":24},"end":{"line":400,"column":53}},"174":{"start":{"line":405,"column":18},"end":{"line":405,"column":40}},"175":{"start":{"line":406,"column":18},"end":{"line":406,"column":24}},"176":{"start":{"line":409,"column":17},"end":{"line":434,"column":11}},"177":{"start":{"line":410,"column":12},"end":{"line":415,"column":14}},"178":{"start":{"line":416,"column":17},"end":{"line":434,"column":11}},"179":{"start":{"line":417,"column":12},"end":{"line":417,"column":35}},"180":{"start":{"line":418,"column":17},"end":{"line":434,"column":11}},"181":{"start":{"line":419,"column":12},"end":{"line":419,"column":48}},"182":{"start":{"line":420,"column":17},"end":{"line":434,"column":11}},"183":{"start":{"line":421,"column":12},"end":{"line":421,"column":43}},"184":{"start":{"line":422,"column":17},"end":{"line":434,"column":11}},"185":{"start":{"line":423,"column":12},"end":{"line":423,"column":34}},"186":{"start":{"line":424,"column":17},"end":{"line":434,"column":11}},"187":{"start":{"line":425,"column":12},"end":{"line":425,"column":54}},"188":{"start":{"line":426,"column":12},"end":{"line":426,"column":27}},"189":{"start":{"line":427,"column":12},"end":{"line":427,"column":54}},"190":{"start":{"line":428,"column":12},"end":{"line":428,"column":67}},"191":{"start":{"line":429,"column":12},"end":{"line":429,"column":57}},"192":{"start":{"line":430,"column":17},"end":{"line":434,"column":11}},"193":{"start":{"line":431,"column":12},"end":{"line":431,"column":42}},"194":{"start":{"line":433,"column":12},"end":{"line":433,"column":61}},"195":{"start":{"line":435,"column":10},"end":{"line":435,"column":16}},"196":{"start":{"line":445,"column":2},"end":{"line":481,"column":3}},"197":{"start":{"line":446,"column":4},"end":{"line":480,"column":5}},"198":{"start":{"line":454,"column":6},"end":{"line":454,"column":32}},"199":{"start":{"line":455,"column":6},"end":{"line":479,"column":7}},"200":{"start":{"line":456,"column":8},"end":{"line":456,"column":30}},"201":{"start":{"line":458,"column":8},"end":{"line":478,"column":9}},"202":{"start":{"line":462,"column":10},"end":{"line":462,"column":46}},"203":{"start":{"line":464,"column":10},"end":{"line":464,"column":33}},"204":{"start":{"line":466,"column":10},"end":{"line":466,"column":45}},"205":{"start":{"line":468,"column":10},"end":{"line":468,"column":19}},"206":{"start":{"line":470,"column":10},"end":{"line":470,"column":14}},"207":{"start":{"line":472,"column":10},"end":{"line":472,"column":82}},"208":{"start":{"line":473,"column":10},"end":{"line":473,"column":34}},"209":{"start":{"line":476,"column":10},"end":{"line":476,"column":73}},"210":{"start":{"line":477,"column":10},"end":{"line":477,"column":58}},"211":{"start":{"line":484,"column":2},"end":{"line":514,"column":3}},"212":{"start":{"line":485,"column":4},"end":{"line":513,"column":5}},"213":{"start":{"line":491,"column":6},"end":{"line":491,"column":28}},"214":{"start":{"line":492,"column":6},"end":{"line":512,"column":7}},"215":{"start":{"line":494,"column":10},"end":{"line":494,"column":48}},"216":{"start":{"line":495,"column":10},"end":{"line":495,"column":43}},"217":{"start":{"line":496,"column":10},"end":{"line":496,"column":16}},"218":{"start":{"line":498,"column":10},"end":{"line":501,"column":11}},"219":{"start":{"line":499,"column":12},"end":{"line":499,"column":26}},"220":{"start":{"line":500,"column":12},"end":{"line":500,"column":43}},"221":{"start":{"line":502,"column":10},"end":{"line":502,"column":16}},"222":{"start":{"line":504,"column":10},"end":{"line":510,"column":11}},"223":{"start":{"line":508,"column":12},"end":{"line":508,"column":26}},"224":{"start":{"line":509,"column":12},"end":{"line":509,"column":43}},"225":{"start":{"line":511,"column":10},"end":{"line":511,"column":16}},"226":{"start":{"line":529,"column":2},"end":{"line":529,"column":63}},"227":{"start":{"line":534,"column":2},"end":{"line":536,"column":39}},"228":{"start":{"line":540,"column":2},"end":{"line":544,"column":17}},"229":{"start":{"line":541,"column":14},"end":{"line":541,"column":57}},"230":{"start":{"line":542,"column":14},"end":{"line":542,"column":57}},"231":{"start":{"line":543,"column":14},"end":{"line":543,"column":68}},"232":{"start":{"line":548,"column":2},"end":{"line":548,"column":44}},"233":{"start":{"line":553,"column":2},"end":{"line":557,"column":4}},"234":{"start":{"line":554,"column":4},"end":{"line":555,"column":41}},"235":{"start":{"line":554,"column":52},"end":{"line":554,"column":64}},"236":{"start":{"line":555,"column":9},"end":{"line":555,"column":41}},"237":{"start":{"line":555,"column":29},"end":{"line":555,"column":38}},"238":{"start":{"line":556,"column":4},"end":{"line":556,"column":24}},"239":{"start":{"line":564,"column":2},"end":{"line":564,"column":23}},"240":{"start":{"line":567,"column":2},"end":{"line":573,"column":4}},"241":{"start":{"line":574,"column":2},"end":{"line":576,"column":3}},"242":{"start":{"line":575,"column":4},"end":{"line":575,"column":22}},"243":{"start":{"line":579,"column":2},"end":{"line":581,"column":3}},"244":{"start":{"line":580,"column":4},"end":{"line":580,"column":24}},"245":{"start":{"line":584,"column":2},"end":{"line":602,"column":3}},"246":{"start":{"line":585,"column":4},"end":{"line":600,"column":5}},"247":{"start":{"line":593,"column":6},"end":{"line":593,"column":28}},"248":{"start":{"line":594,"column":6},"end":{"line":599,"column":7}},"249":{"start":{"line":598,"column":8},"end":{"line":598,"column":28}},"250":{"start":{"line":601,"column":4},"end":{"line":601,"column":55}},"251":{"start":{"line":605,"column":2},"end":{"line":607,"column":3}},"252":{"start":{"line":606,"column":4},"end":{"line":606,"column":45}},"253":{"start":{"line":611,"column":2},"end":{"line":617,"column":3}},"254":{"start":{"line":612,"column":4},"end":{"line":616,"column":40}},"255":{"start":{"line":620,"column":2},"end":{"line":662,"column":3}},"256":{"start":{"line":621,"column":4},"end":{"line":621,"column":17}},"257":{"start":{"line":622,"column":4},"end":{"line":622,"column":38}},"258":{"start":{"line":623,"column":4},"end":{"line":630,"column":6}},"259":{"start":{"line":632,"column":4},"end":{"line":632,"column":44}},"260":{"start":{"line":633,"column":4},"end":{"line":633,"column":31}},"261":{"start":{"line":634,"column":4},"end":{"line":644,"column":5}},"262":{"start":{"line":636,"column":6},"end":{"line":636,"column":50}},"263":{"start":{"line":643,"column":6},"end":{"line":643,"column":88}},"264":{"start":{"line":645,"column":4},"end":{"line":660,"column":5}},"265":{"start":{"line":649,"column":6},"end":{"line":649,"column":31}},"266":{"start":{"line":650,"column":6},"end":{"line":650,"column":58}},"267":{"start":{"line":651,"column":6},"end":{"line":651,"column":78}},"268":{"start":{"line":653,"column":6},"end":{"line":653,"column":33}},"269":{"start":{"line":654,"column":6},"end":{"line":659,"column":7}},"270":{"start":{"line":655,"column":8},"end":{"line":655,"column":37}},"271":{"start":{"line":658,"column":8},"end":{"line":658,"column":64}},"272":{"start":{"line":661,"column":4},"end":{"line":661,"column":20}},"273":{"start":{"line":665,"column":2},"end":{"line":678,"column":3}},"274":{"start":{"line":666,"column":4},"end":{"line":666,"column":38}},"275":{"start":{"line":667,"column":4},"end":{"line":667,"column":52}},"276":{"start":{"line":668,"column":4},"end":{"line":676,"column":5}},"277":{"start":{"line":669,"column":6},"end":{"line":669,"column":52}},"278":{"start":{"line":670,"column":6},"end":{"line":670,"column":84}},"279":{"start":{"line":671,"column":6},"end":{"line":671,"column":73}},"280":{"start":{"line":673,"column":6},"end":{"line":673,"column":69}},"281":{"start":{"line":674,"column":6},"end":{"line":674,"column":33}},"282":{"start":{"line":675,"column":6},"end":{"line":675,"column":62}},"283":{"start":{"line":677,"column":4},"end":{"line":677,"column":20}},"284":{"start":{"line":681,"column":2},"end":{"line":683,"column":3}},"285":{"start":{"line":682,"column":4},"end":{"line":682,"column":51}},"286":{"start":{"line":686,"column":2},"end":{"line":699,"column":3}},"287":{"start":{"line":687,"column":4},"end":{"line":698,"column":5}},"288":{"start":{"line":693,"column":6},"end":{"line":693,"column":22}},"289":{"start":{"line":695,"column":6},"end":{"line":697,"column":7}},"290":{"start":{"line":696,"column":8},"end":{"line":696,"column":55}},"291":{"start":{"line":702,"column":2},"end":{"line":720,"column":3}},"292":{"start":{"line":704,"column":4},"end":{"line":718,"column":5},"skip":true},"293":{"start":{"line":705,"column":6},"end":{"line":705,"column":54},"skip":true},"294":{"start":{"line":707,"column":9},"end":{"line":718,"column":5},"skip":true},"295":{"start":{"line":708,"column":6},"end":{"line":708,"column":33},"skip":true},"296":{"start":{"line":711,"column":6},"end":{"line":717,"column":7},"skip":true},"297":{"start":{"line":716,"column":8},"end":{"line":716,"column":59},"skip":true},"298":{"start":{"line":719,"column":4},"end":{"line":719,"column":13}},"299":{"start":{"line":724,"column":2},"end":{"line":728,"column":3}},"300":{"start":{"line":725,"column":4},"end":{"line":725,"column":29}},"301":{"start":{"line":726,"column":4},"end":{"line":726,"column":66}},"302":{"start":{"line":727,"column":4},"end":{"line":727,"column":53}},"303":{"start":{"line":732,"column":2},"end":{"line":739,"column":3}},"304":{"start":{"line":733,"column":4},"end":{"line":733,"column":46}},"305":{"start":{"line":734,"column":4},"end":{"line":737,"column":5}},"306":{"start":{"line":735,"column":6},"end":{"line":735,"column":35}},"307":{"start":{"line":736,"column":6},"end":{"line":736,"column":40}},"308":{"start":{"line":736,"column":17},"end":{"line":736,"column":40}},"309":{"start":{"line":738,"column":4},"end":{"line":738,"column":34}},"310":{"start":{"line":742,"column":2},"end":{"line":753,"column":3}},"311":{"start":{"line":743,"column":4},"end":{"line":743,"column":32}},"312":{"start":{"line":744,"column":4},"end":{"line":752,"column":5}},"313":{"start":{"line":745,"column":6},"end":{"line":745,"column":62}},"314":{"start":{"line":746,"column":11},"end":{"line":752,"column":5}},"315":{"start":{"line":747,"column":6},"end":{"line":747,"column":48}},"316":{"start":{"line":748,"column":11},"end":{"line":752,"column":5}},"317":{"start":{"line":749,"column":6},"end":{"line":749,"column":62}},"318":{"start":{"line":751,"column":6},"end":{"line":751,"column":73}},"319":{"start":{"line":756,"column":2},"end":{"line":763,"column":3}},"320":{"start":{"line":757,"column":4},"end":{"line":762,"column":5}},"321":{"start":{"line":758,"column":6},"end":{"line":758,"column":32}},"322":{"start":{"line":759,"column":6},"end":{"line":761,"column":7}},"323":{"start":{"line":760,"column":8},"end":{"line":760,"column":56}},"324":{"start":{"line":766,"column":2},"end":{"line":768,"column":3}},"325":{"start":{"line":767,"column":4},"end":{"line":767,"column":35}},"326":{"start":{"line":771,"column":2},"end":{"line":773,"column":3}},"327":{"start":{"line":772,"column":4},"end":{"line":772,"column":44}},"328":{"start":{"line":777,"column":2},"end":{"line":787,"column":3}},"329":{"start":{"line":778,"column":4},"end":{"line":778,"column":34}},"330":{"start":{"line":779,"column":4},"end":{"line":786,"column":6}},"331":{"start":{"line":781,"column":8},"end":{"line":781,"column":66}},"332":{"start":{"line":784,"column":8},"end":{"line":784,"column":73}},"333":{"start":{"line":790,"column":2},"end":{"line":802,"column":3}},"334":{"start":{"line":791,"column":4},"end":{"line":791,"column":36}},"335":{"start":{"line":792,"column":4},"end":{"line":801,"column":5}},"336":{"start":{"line":793,"column":6},"end":{"line":793,"column":49}},"337":{"start":{"line":795,"column":6},"end":{"line":800,"column":7}},"338":{"start":{"line":796,"column":8},"end":{"line":799,"column":9}},"339":{"start":{"line":797,"column":10},"end":{"line":797,"column":53}},"340":{"start":{"line":798,"column":10},"end":{"line":798,"column":17}},"341":{"start":{"line":805,"column":2},"end":{"line":809,"column":3}},"342":{"start":{"line":806,"column":4},"end":{"line":808,"column":5}},"343":{"start":{"line":807,"column":6},"end":{"line":807,"column":41}},"344":{"start":{"line":812,"column":2},"end":{"line":827,"column":3}},"345":{"start":{"line":813,"column":4},"end":{"line":813,"column":15}},"346":{"start":{"line":814,"column":4},"end":{"line":825,"column":5}},"347":{"start":{"line":817,"column":8},"end":{"line":817,"column":81}},"348":{"start":{"line":818,"column":8},"end":{"line":818,"column":14}},"349":{"start":{"line":820,"column":8},"end":{"line":820,"column":67}},"350":{"start":{"line":821,"column":8},"end":{"line":821,"column":14}},"351":{"start":{"line":823,"column":8},"end":{"line":823,"column":40}},"352":{"start":{"line":824,"column":8},"end":{"line":824,"column":14}},"353":{"start":{"line":826,"column":4},"end":{"line":826,"column":18}},"354":{"start":{"line":830,"column":2},"end":{"line":832,"column":3}},"355":{"start":{"line":831,"column":4},"end":{"line":831,"column":60}},"356":{"start":{"line":838,"column":2},"end":{"line":838,"column":30}},"357":{"start":{"line":839,"column":2},"end":{"line":839,"column":39}},"358":{"start":{"line":840,"column":2},"end":{"line":840,"column":13}},"359":{"start":{"line":842,"column":2},"end":{"line":851,"column":3}},"360":{"start":{"line":843,"column":4},"end":{"line":843,"column":25}},"361":{"start":{"line":844,"column":4},"end":{"line":844,"column":19}},"362":{"start":{"line":846,"column":4},"end":{"line":850,"column":6}},"363":{"start":{"line":847,"column":6},"end":{"line":847,"column":50}},"364":{"start":{"line":848,"column":6},"end":{"line":848,"column":38}},"365":{"start":{"line":849,"column":6},"end":{"line":849,"column":15}},"366":{"start":{"line":853,"column":2},"end":{"line":868,"column":3}},"367":{"start":{"line":854,"column":4},"end":{"line":860,"column":66}},"368":{"start":{"line":855,"column":6},"end":{"line":859,"column":7}},"369":{"start":{"line":856,"column":8},"end":{"line":856,"column":28}},"370":{"start":{"line":857,"column":8},"end":{"line":857,"column":55}},"371":{"start":{"line":858,"column":8},"end":{"line":858,"column":50}},"372":{"start":{"line":862,"column":4},"end":{"line":864,"column":14}},"373":{"start":{"line":863,"column":6},"end":{"line":863,"column":41}},"374":{"start":{"line":865,"column":4},"end":{"line":867,"column":14}},"375":{"start":{"line":866,"column":6},"end":{"line":866,"column":44}},"376":{"start":{"line":871,"column":2},"end":{"line":887,"column":14}},"377":{"start":{"line":875,"column":8},"end":{"line":885,"column":10},"skip":true},"378":{"start":{"line":876,"column":35},"end":{"line":876,"column":51},"skip":true},"379":{"start":{"line":877,"column":32},"end":{"line":877,"column":48},"skip":true},"380":{"start":{"line":878,"column":32},"end":{"line":878,"column":50},"skip":true},"381":{"start":{"line":880,"column":12},"end":{"line":883,"column":15},"skip":true},"382":{"start":{"line":889,"column":2},"end":{"line":899,"column":14}},"383":{"start":{"line":891,"column":8},"end":{"line":891,"column":30}},"384":{"start":{"line":894,"column":8},"end":{"line":897,"column":10},"skip":true},"385":{"start":{"line":895,"column":32},"end":{"line":895,"column":50},"skip":true},"386":{"start":{"line":896,"column":32},"end":{"line":896,"column":60},"skip":true},"387":{"start":{"line":902,"column":2},"end":{"line":917,"column":10}},"388":{"start":{"line":904,"column":8},"end":{"line":904,"column":27}},"389":{"start":{"line":905,"column":8},"end":{"line":915,"column":10}},"390":{"start":{"line":907,"column":12},"end":{"line":907,"column":37}},"391":{"start":{"line":913,"column":12},"end":{"line":913,"column":39}},"392":{"start":{"line":922,"column":2},"end":{"line":931,"column":21}},"393":{"start":{"line":924,"column":18},"end":{"line":924,"column":45}},"394":{"start":{"line":927,"column":18},"end":{"line":927,"column":44}},"395":{"start":{"line":928,"column":18},"end":{"line":930,"column":20}},"396":{"start":{"line":929,"column":20},"end":{"line":929,"column":50}},"397":{"start":{"line":934,"column":2},"end":{"line":935,"column":69}},"398":{"start":{"line":935,"column":28},"end":{"line":935,"column":66}},"399":{"start":{"line":942,"column":2},"end":{"line":942,"column":45}},"400":{"start":{"line":945,"column":2},"end":{"line":945,"column":24}},"401":{"start":{"line":946,"column":2},"end":{"line":946,"column":28}},"402":{"start":{"line":949,"column":2},"end":{"line":949,"column":35}},"403":{"start":{"line":950,"column":2},"end":{"line":954,"column":3}},"404":{"start":{"line":951,"column":4},"end":{"line":951,"column":40}},"405":{"start":{"line":952,"column":4},"end":{"line":953,"column":44}},"406":{"start":{"line":957,"column":2},"end":{"line":969,"column":8}},"407":{"start":{"line":959,"column":8},"end":{"line":959,"column":44}},"408":{"start":{"line":962,"column":8},"end":{"line":968,"column":9}},"409":{"start":{"line":967,"column":10},"end":{"line":967,"column":42}},"410":{"start":{"line":972,"column":2},"end":{"line":987,"column":48}},"411":{"start":{"line":974,"column":8},"end":{"line":984,"column":9}},"412":{"start":{"line":981,"column":10},"end":{"line":981,"column":32}},"413":{"start":{"line":982,"column":10},"end":{"line":983,"column":34}},"414":{"start":{"line":983,"column":12},"end":{"line":983,"column":34}},"415":{"start":{"line":985,"column":8},"end":{"line":985,"column":24}},"416":{"start":{"line":987,"column":24},"end":{"line":987,"column":45}},"417":{"start":{"line":991,"column":2},"end":{"line":1011,"column":8}},"418":{"start":{"line":993,"column":8},"end":{"line":1003,"column":9}},"419":{"start":{"line":994,"column":10},"end":{"line":994,"column":27}},"420":{"start":{"line":995,"column":10},"end":{"line":1002,"column":11}},"421":{"start":{"line":997,"column":14},"end":{"line":997,"column":60}},"422":{"start":{"line":998,"column":14},"end":{"line":998,"column":20}},"423":{"start":{"line":1000,"column":14},"end":{"line":1000,"column":53}},"424":{"start":{"line":1001,"column":14},"end":{"line":1001,"column":20}},"425":{"start":{"line":1004,"column":8},"end":{"line":1004,"column":26}},"426":{"start":{"line":1007,"column":8},"end":{"line":1009,"column":9}},"427":{"start":{"line":1008,"column":10},"end":{"line":1008,"column":54}},"428":{"start":{"line":1010,"column":8},"end":{"line":1010,"column":26}},"429":{"start":{"line":1014,"column":2},"end":{"line":1014,"column":52}},"430":{"start":{"line":1015,"column":2},"end":{"line":1015,"column":123}},"431":{"start":{"line":1016,"column":2},"end":{"line":1016,"column":86}},"432":{"start":{"line":1017,"column":2},"end":{"line":1019,"column":4}},"433":{"start":{"line":1018,"column":4},"end":{"line":1018,"column":67}},"434":{"start":{"line":1021,"column":2},"end":{"line":1023,"column":4}},"435":{"start":{"line":1022,"column":4},"end":{"line":1022,"column":48}},"436":{"start":{"line":1026,"column":2},"end":{"line":1026,"column":32}},"437":{"start":{"line":1029,"column":2},"end":{"line":1029,"column":28}},"438":{"start":{"line":1032,"column":2},"end":{"line":1032,"column":27}},"439":{"start":{"line":1035,"column":2},"end":{"line":1035,"column":27}},"440":{"start":{"line":1038,"column":2},"end":{"line":1038,"column":34}},"441":{"start":{"line":1041,"column":2},"end":{"line":1041,"column":25}},"442":{"start":{"line":1045,"column":2},"end":{"line":1063,"column":7}},"443":{"start":{"line":1046,"column":4},"end":{"line":1046,"column":66}},"444":{"start":{"line":1047,"column":4},"end":{"line":1047,"column":65}},"445":{"start":{"line":1048,"column":4},"end":{"line":1062,"column":8}},"446":{"start":{"line":1050,"column":8},"end":{"line":1057,"column":9}},"447":{"start":{"line":1056,"column":10},"end":{"line":1056,"column":54}},"448":{"start":{"line":1058,"column":8},"end":{"line":1058,"column":21}},"449":{"start":{"line":1061,"column":8},"end":{"line":1061,"column":40}},"450":{"start":{"line":1070,"column":2},"end":{"line":1077,"column":56}},"451":{"start":{"line":1072,"column":6},"end":{"line":1074,"column":7}},"452":{"start":{"line":1073,"column":8},"end":{"line":1073,"column":56}},"453":{"start":{"line":1073,"column":44},"end":{"line":1073,"column":56}},"454":{"start":{"line":1075,"column":6},"end":{"line":1075,"column":23}},"455":{"start":{"line":1077,"column":22},"end":{"line":1077,"column":53}},"456":{"start":{"line":1079,"column":2},"end":{"line":1086,"column":60}},"457":{"start":{"line":1081,"column":6},"end":{"line":1083,"column":7}},"458":{"start":{"line":1082,"column":7},"end":{"line":1082,"column":55}},"459":{"start":{"line":1082,"column":43},"end":{"line":1082,"column":55}},"460":{"start":{"line":1084,"column":6},"end":{"line":1084,"column":23}},"461":{"start":{"line":1086,"column":22},"end":{"line":1086,"column":57}},"462":{"start":{"line":1089,"column":2},"end":{"line":1095,"column":3}},"463":{"start":{"line":1090,"column":4},"end":{"line":1090,"column":47}},"464":{"start":{"line":1091,"column":4},"end":{"line":1094,"column":5}},"465":{"start":{"line":1092,"column":6},"end":{"line":1092,"column":46}},"466":{"start":{"line":1093,"column":6},"end":{"line":1093,"column":43}},"467":{"start":{"line":1098,"column":2},"end":{"line":1104,"column":3}},"468":{"start":{"line":1099,"column":4},"end":{"line":1103,"column":5}},"469":{"start":{"line":1100,"column":6},"end":{"line":1100,"column":45}},"470":{"start":{"line":1102,"column":6},"end":{"line":1102,"column":37}},"471":{"start":{"line":1108,"column":2},"end":{"line":1184,"column":3}},"472":{"start":{"line":1109,"column":4},"end":{"line":1182,"column":5}},"473":{"start":{"line":1118,"column":6},"end":{"line":1181,"column":7}},"474":{"start":{"line":1120,"column":10},"end":{"line":1120,"column":38}},"475":{"start":{"line":1121,"column":10},"end":{"line":1123,"column":11}},"476":{"start":{"line":1122,"column":12},"end":{"line":1122,"column":46}},"477":{"start":{"line":1124,"column":10},"end":{"line":1124,"column":47}},"478":{"start":{"line":1125,"column":10},"end":{"line":1125,"column":16}},"479":{"start":{"line":1127,"column":10},"end":{"line":1127,"column":49}},"480":{"start":{"line":1128,"column":10},"end":{"line":1128,"column":68}},"481":{"start":{"line":1129,"column":10},"end":{"line":1129,"column":55}},"482":{"start":{"line":1130,"column":10},"end":{"line":1130,"column":86}},"483":{"start":{"line":1131,"column":10},"end":{"line":1131,"column":51}},"484":{"start":{"line":1132,"column":10},"end":{"line":1132,"column":79}},"485":{"start":{"line":1133,"column":10},"end":{"line":1133,"column":47}},"486":{"start":{"line":1134,"column":10},"end":{"line":1149,"column":11}},"487":{"start":{"line":1140,"column":14},"end":{"line":1140,"column":38}},"488":{"start":{"line":1141,"column":14},"end":{"line":1141,"column":20}},"489":{"start":{"line":1144,"column":14},"end":{"line":1144,"column":25}},"490":{"start":{"line":1147,"column":14},"end":{"line":1147,"column":56}},"491":{"start":{"line":1148,"column":14},"end":{"line":1148,"column":20}},"492":{"start":{"line":1150,"column":10},"end":{"line":1153,"column":12}},"493":{"start":{"line":1154,"column":10},"end":{"line":1166,"column":11}},"494":{"start":{"line":1155,"column":12},"end":{"line":1159,"column":14}},"495":{"start":{"line":1161,"column":12},"end":{"line":1165,"column":14}},"496":{"start":{"line":1167,"column":10},"end":{"line":1169,"column":11}},"497":{"start":{"line":1168,"column":12},"end":{"line":1168,"column":51}},"498":{"start":{"line":1170,"column":10},"end":{"line":1170,"column":16}},"499":{"start":{"line":1173,"column":10},"end":{"line":1178,"column":22}},"500":{"start":{"line":1179,"column":10},"end":{"line":1179,"column":30}},"501":{"start":{"line":1180,"column":10},"end":{"line":1180,"column":16}},"502":{"start":{"line":1183,"column":4},"end":{"line":1183,"column":18}},"503":{"start":{"line":1187,"column":2},"end":{"line":1206,"column":3}},"504":{"start":{"line":1188,"column":4},"end":{"line":1203,"column":5}},"505":{"start":{"line":1195,"column":6},"end":{"line":1195,"column":22}},"506":{"start":{"line":1196,"column":6},"end":{"line":1196,"column":22}},"507":{"start":{"line":1197,"column":6},"end":{"line":1202,"column":8}},"508":{"start":{"line":1204,"column":4},"end":{"line":1204,"column":42}},"509":{"start":{"line":1205,"column":4},"end":{"line":1205,"column":19}},"510":{"start":{"line":1214,"column":2},"end":{"line":1221,"column":3}},"511":{"start":{"line":1215,"column":4},"end":{"line":1215,"column":19}},"512":{"start":{"line":1216,"column":4},"end":{"line":1216,"column":61}},"513":{"start":{"line":1217,"column":4},"end":{"line":1217,"column":50}},"514":{"start":{"line":1218,"column":4},"end":{"line":1218,"column":51}},"515":{"start":{"line":1219,"column":4},"end":{"line":1219,"column":34}},"516":{"start":{"line":1220,"column":4},"end":{"line":1220,"column":16}},"517":{"start":{"line":1226,"column":2},"end":{"line":1255,"column":3}},"518":{"start":{"line":1227,"column":4},"end":{"line":1227,"column":18}},"519":{"start":{"line":1228,"column":4},"end":{"line":1228,"column":19}},"520":{"start":{"line":1229,"column":4},"end":{"line":1246,"column":5}},"521":{"start":{"line":1232,"column":8},"end":{"line":1232,"column":26}},"522":{"start":{"line":1233,"column":8},"end":{"line":1233,"column":14}},"523":{"start":{"line":1235,"column":8},"end":{"line":1235,"column":37}},"524":{"start":{"line":1236,"column":8},"end":{"line":1239,"column":10}},"525":{"start":{"line":1240,"column":8},"end":{"line":1240,"column":14}},"526":{"start":{"line":1243,"column":8},"end":{"line":1243,"column":39}},"527":{"start":{"line":1244,"column":8},"end":{"line":1244,"column":46}},"528":{"start":{"line":1245,"column":8},"end":{"line":1245,"column":14}},"529":{"start":{"line":1247,"column":4},"end":{"line":1253,"column":5}},"530":{"start":{"line":1252,"column":6},"end":{"line":1252,"column":81}},"531":{"start":{"line":1254,"column":4},"end":{"line":1254,"column":16}},"532":{"start":{"line":1260,"column":2},"end":{"line":1278,"column":3}},"533":{"start":{"line":1261,"column":4},"end":{"line":1275,"column":5}},"534":{"start":{"line":1268,"column":6},"end":{"line":1268,"column":22}},"535":{"start":{"line":1269,"column":6},"end":{"line":1274,"column":8}},"536":{"start":{"line":1276,"column":4},"end":{"line":1276,"column":42}},"537":{"start":{"line":1277,"column":4},"end":{"line":1277,"column":19}},"538":{"start":{"line":1281,"column":2},"end":{"line":1285,"column":3}},"539":{"start":{"line":1282,"column":4},"end":{"line":1284,"column":5}},"540":{"start":{"line":1283,"column":6},"end":{"line":1283,"column":32}},"541":{"start":{"line":1289,"column":2},"end":{"line":1306,"column":3}},"542":{"start":{"line":1290,"column":4},"end":{"line":1290,"column":28}},"543":{"start":{"line":1291,"column":4},"end":{"line":1291,"column":16}},"544":{"start":{"line":1292,"column":4},"end":{"line":1293,"column":52}},"545":{"start":{"line":1294,"column":4},"end":{"line":1305,"column":5}},"546":{"start":{"line":1295,"column":6},"end":{"line":1295,"column":46}},"547":{"start":{"line":1296,"column":6},"end":{"line":1296,"column":63}},"548":{"start":{"line":1297,"column":6},"end":{"line":1297,"column":63}},"549":{"start":{"line":1298,"column":6},"end":{"line":1298,"column":39}},"550":{"start":{"line":1299,"column":6},"end":{"line":1299,"column":28}},"551":{"start":{"line":1300,"column":6},"end":{"line":1300,"column":33}},"552":{"start":{"line":1302,"column":6},"end":{"line":1302,"column":70}},"553":{"start":{"line":1303,"column":6},"end":{"line":1303,"column":63}},"554":{"start":{"line":1304,"column":6},"end":{"line":1304,"column":39}},"555":{"start":{"line":1313,"column":2},"end":{"line":1373,"column":3}},"556":{"start":{"line":1314,"column":4},"end":{"line":1314,"column":71}},"557":{"start":{"line":1316,"column":4},"end":{"line":1322,"column":5}},"558":{"start":{"line":1317,"column":6},"end":{"line":1317,"column":50}},"559":{"start":{"line":1318,"column":6},"end":{"line":1320,"column":17}},"560":{"start":{"line":1321,"column":6},"end":{"line":1321,"column":31}},"561":{"start":{"line":1324,"column":4},"end":{"line":1333,"column":5}},"562":{"start":{"line":1325,"column":6},"end":{"line":1331,"column":7}},"563":{"start":{"line":1326,"column":8},"end":{"line":1326,"column":22}},"564":{"start":{"line":1327,"column":8},"end":{"line":1329,"column":9}},"565":{"start":{"line":1328,"column":10},"end":{"line":1328,"column":66}},"566":{"start":{"line":1330,"column":8},"end":{"line":1330,"column":42}},"567":{"start":{"line":1332,"column":6},"end":{"line":1332,"column":21}},"568":{"start":{"line":1335,"column":4},"end":{"line":1372,"column":8}},"569":{"start":{"line":1337,"column":8},"end":{"line":1337,"column":29}},"570":{"start":{"line":1338,"column":8},"end":{"line":1338,"column":30}},"571":{"start":{"line":1339,"column":8},"end":{"line":1360,"column":9}},"572":{"start":{"line":1340,"column":10},"end":{"line":1340,"column":23}},"573":{"start":{"line":1341,"column":10},"end":{"line":1341,"column":29}},"574":{"start":{"line":1342,"column":10},"end":{"line":1359,"column":12}},"575":{"start":{"line":1343,"column":12},"end":{"line":1356,"column":13}},"576":{"start":{"line":1344,"column":14},"end":{"line":1355,"column":15}},"577":{"start":{"line":1345,"column":16},"end":{"line":1345,"column":40}},"578":{"start":{"line":1346,"column":16},"end":{"line":1350,"column":18}},"579":{"start":{"line":1351,"column":16},"end":{"line":1351,"column":47}},"580":{"start":{"line":1353,"column":16},"end":{"line":1353,"column":66}},"581":{"start":{"line":1353,"column":53},"end":{"line":1353,"column":66}},"582":{"start":{"line":1354,"column":16},"end":{"line":1354,"column":49}},"583":{"start":{"line":1357,"column":12},"end":{"line":1357,"column":37}},"584":{"start":{"line":1358,"column":12},"end":{"line":1358,"column":27}},"585":{"start":{"line":1361,"column":8},"end":{"line":1361,"column":23}},"586":{"start":{"line":1364,"column":8},"end":{"line":1364,"column":30}},"587":{"start":{"line":1365,"column":8},"end":{"line":1369,"column":9}},"588":{"start":{"line":1366,"column":10},"end":{"line":1366,"column":23}},"589":{"start":{"line":1367,"column":10},"end":{"line":1367,"column":29}},"590":{"start":{"line":1368,"column":10},"end":{"line":1368,"column":33}},"591":{"start":{"line":1370,"column":8},"end":{"line":1370,"column":38}},"592":{"start":{"line":1371,"column":8},"end":{"line":1371,"column":23}},"593":{"start":{"line":1376,"column":2},"end":{"line":1389,"column":3}},"594":{"start":{"line":1377,"column":4},"end":{"line":1377,"column":30}},"595":{"start":{"line":1378,"column":4},"end":{"line":1378,"column":30}},"596":{"start":{"line":1379,"column":4},"end":{"line":1379,"column":18}},"597":{"start":{"line":1380,"column":4},"end":{"line":1383,"column":5}},"598":{"start":{"line":1381,"column":6},"end":{"line":1381,"column":29}},"599":{"start":{"line":1382,"column":6},"end":{"line":1382,"column":40}},"600":{"start":{"line":1384,"column":4},"end":{"line":1387,"column":5}},"601":{"start":{"line":1385,"column":6},"end":{"line":1385,"column":16}},"602":{"start":{"line":1386,"column":6},"end":{"line":1386,"column":27}},"603":{"start":{"line":1388,"column":4},"end":{"line":1388,"column":54}},"604":{"start":{"line":1400,"column":2},"end":{"line":1400,"column":29}},"605":{"start":{"line":1405,"column":2},"end":{"line":1405,"column":15}},"606":{"start":{"line":1412,"column":2},"end":{"line":1417,"column":3}},"607":{"start":{"line":1419,"column":2},"end":{"line":1440,"column":3}},"608":{"start":{"line":1420,"column":4},"end":{"line":1424,"column":5}},"609":{"start":{"line":1425,"column":4},"end":{"line":1431,"column":5}},"610":{"start":{"line":1427,"column":6},"end":{"line":1429,"column":7},"skip":true},"611":{"start":{"line":1428,"column":8},"end":{"line":1428,"column":60},"skip":true},"612":{"start":{"line":1430,"column":6},"end":{"line":1430,"column":13}},"613":{"start":{"line":1432,"column":4},"end":{"line":1435,"column":5}},"614":{"start":{"line":1433,"column":6},"end":{"line":1433,"column":21}},"615":{"start":{"line":1434,"column":6},"end":{"line":1434,"column":13}},"616":{"start":{"line":1436,"column":4},"end":{"line":1439,"column":6}},"617":{"start":{"line":1448,"column":2},"end":{"line":1457,"column":4}},"618":{"start":{"line":1449,"column":4},"end":{"line":1449,"column":29}},"619":{"start":{"line":1450,"column":4},"end":{"line":1455,"column":6}},"620":{"start":{"line":1451,"column":6},"end":{"line":1451,"column":27}},"621":{"start":{"line":1452,"column":6},"end":{"line":1452,"column":60}},"622":{"start":{"line":1453,"column":6},"end":{"line":1453,"column":26}},"623":{"start":{"line":1454,"column":6},"end":{"line":1454,"column":20}},"624":{"start":{"line":1456,"column":4},"end":{"line":1456,"column":16}},"625":{"start":{"line":1459,"column":2},"end":{"line":1459,"column":18}},"626":{"start":{"line":1467,"column":2},"end":{"line":1500,"column":3}},"627":{"start":{"line":1468,"column":4},"end":{"line":1468,"column":37}},"628":{"start":{"line":1469,"column":4},"end":{"line":1469,"column":33}},"629":{"start":{"line":1470,"column":4},"end":{"line":1470,"column":37}},"630":{"start":{"line":1471,"column":4},"end":{"line":1471,"column":14}},"631":{"start":{"line":1472,"column":4},"end":{"line":1472,"column":14}},"632":{"start":{"line":1473,"column":4},"end":{"line":1473,"column":14}},"633":{"start":{"line":1474,"column":4},"end":{"line":1474,"column":14}},"634":{"start":{"line":1475,"column":4},"end":{"line":1475,"column":17}},"635":{"start":{"line":1476,"column":4},"end":{"line":1476,"column":17}},"636":{"start":{"line":1477,"column":4},"end":{"line":1477,"column":22}},"637":{"start":{"line":1478,"column":4},"end":{"line":1478,"column":36}},"638":{"start":{"line":1479,"column":4},"end":{"line":1479,"column":16}},"639":{"start":{"line":1480,"column":4},"end":{"line":1480,"column":39}},"640":{"start":{"line":1480,"column":27},"end":{"line":1480,"column":39}},"641":{"start":{"line":1481,"column":4},"end":{"line":1498,"column":5}},"642":{"start":{"line":1482,"column":6},"end":{"line":1482,"column":16}},"643":{"start":{"line":1483,"column":6},"end":{"line":1483,"column":18}},"644":{"start":{"line":1484,"column":6},"end":{"line":1484,"column":26}},"645":{"start":{"line":1485,"column":6},"end":{"line":1485,"column":25}},"646":{"start":{"line":1486,"column":6},"end":{"line":1496,"column":7}},"647":{"start":{"line":1487,"column":8},"end":{"line":1487,"column":33}},"648":{"start":{"line":1488,"column":8},"end":{"line":1488,"column":33}},"649":{"start":{"line":1489,"column":8},"end":{"line":1489,"column":58}},"650":{"start":{"line":1490,"column":8},"end":{"line":1494,"column":39}},"651":{"start":{"line":1495,"column":8},"end":{"line":1495,"column":12}},"652":{"start":{"line":1497,"column":6},"end":{"line":1497,"column":12}},"653":{"start":{"line":1499,"column":4},"end":{"line":1499,"column":16}},"654":{"start":{"line":1503,"column":2},"end":{"line":1511,"column":3}},"655":{"start":{"line":1504,"column":4},"end":{"line":1510,"column":7}},"656":{"start":{"line":1514,"column":2},"end":{"line":1554,"column":3}},"657":{"start":{"line":1515,"column":4},"end":{"line":1523,"column":5}},"658":{"start":{"line":1524,"column":4},"end":{"line":1546,"column":5}},"659":{"start":{"line":1525,"column":6},"end":{"line":1525,"column":24}},"660":{"start":{"line":1526,"column":6},"end":{"line":1526,"column":23}},"661":{"start":{"line":1527,"column":6},"end":{"line":1527,"column":24}},"662":{"start":{"line":1528,"column":6},"end":{"line":1528,"column":23}},"663":{"start":{"line":1529,"column":6},"end":{"line":1529,"column":28}},"664":{"start":{"line":1530,"column":6},"end":{"line":1530,"column":32}},"665":{"start":{"line":1531,"column":6},"end":{"line":1545,"column":7}},"666":{"start":{"line":1532,"column":8},"end":{"line":1532,"column":12}},"667":{"start":{"line":1533,"column":8},"end":{"line":1533,"column":12}},"668":{"start":{"line":1534,"column":8},"end":{"line":1536,"column":9}},"669":{"start":{"line":1535,"column":10},"end":{"line":1535,"column":58}},"670":{"start":{"line":1538,"column":11},"end":{"line":1545,"column":7}},"671":{"start":{"line":1539,"column":8},"end":{"line":1539,"column":12}},"672":{"start":{"line":1540,"column":8},"end":{"line":1540,"column":52}},"673":{"start":{"line":1543,"column":8},"end":{"line":1543,"column":12}},"674":{"start":{"line":1544,"column":8},"end":{"line":1544,"column":48}},"675":{"start":{"line":1547,"column":4},"end":{"line":1549,"column":5}},"676":{"start":{"line":1548,"column":6},"end":{"line":1548,"column":50}},"677":{"start":{"line":1550,"column":4},"end":{"line":1552,"column":5}},"678":{"start":{"line":1551,"column":6},"end":{"line":1551,"column":46}},"679":{"start":{"line":1553,"column":4},"end":{"line":1553,"column":16}},"680":{"start":{"line":1557,"column":2},"end":{"line":1583,"column":3}},"681":{"start":{"line":1558,"column":4},"end":{"line":1563,"column":5}},"682":{"start":{"line":1565,"column":4},"end":{"line":1582,"column":5}},"683":{"start":{"line":1566,"column":6},"end":{"line":1566,"column":34}},"684":{"start":{"line":1567,"column":6},"end":{"line":1580,"column":7}},"685":{"start":{"line":1568,"column":8},"end":{"line":1568,"column":31}},"686":{"start":{"line":1569,"column":8},"end":{"line":1578,"column":9}},"687":{"start":{"line":1570,"column":10},"end":{"line":1570,"column":33}},"688":{"start":{"line":1571,"column":10},"end":{"line":1571,"column":49}},"689":{"start":{"line":1573,"column":10},"end":{"line":1573,"column":80}},"690":{"start":{"line":1574,"column":10},"end":{"line":1576,"column":29}},"691":{"start":{"line":1577,"column":10},"end":{"line":1577,"column":20}},"692":{"start":{"line":1579,"column":8},"end":{"line":1579,"column":20}},"693":{"start":{"line":1581,"column":6},"end":{"line":1581,"column":76}},"694":{"start":{"line":1600,"column":0},"end":{"line":1600,"column":49}},"695":{"start":{"line":1600,"column":6},"end":{"line":1600,"column":33}}},"branchMap":{"1":{"line":17,"type":"cond-expr","locations":[{"start":{"line":18,"column":7},"end":{"line":29,"column":9}},{"start":{"line":30,"column":6},"end":{"line":32,"column":30}}]},"2":{"line":18,"type":"cond-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":27}},{"start":{"line":20,"column":9},"end":{"line":28,"column":11}}]},"3":{"line":20,"type":"cond-expr","locations":[{"start":{"line":21,"column":10},"end":{"line":21,"column":26}},{"start":{"line":22,"column":11},"end":{"line":27,"column":13}}]},"4":{"line":22,"type":"cond-expr","locations":[{"start":{"line":23,"column":12},"end":{"line":23,"column":37}},{"start":{"line":24,"column":13},"end":{"line":26,"column":38}}]},"5":{"line":24,"type":"cond-expr","locations":[{"start":{"line":25,"column":14},"end":{"line":25,"column":24}},{"start":{"line":26,"column":14},"end":{"line":26,"column":38}}]},"6":{"line":30,"type":"cond-expr","locations":[{"start":{"line":31,"column":8},"end":{"line":31,"column":27}},{"start":{"line":31,"column":30},"end":{"line":31,"column":34}}]},"7":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":54,"column":4}},{"start":{"line":54,"column":4},"end":{"line":54,"column":4}}]},"8":{"line":70,"type":"cond-expr","locations":[{"start":{"line":71,"column":6},"end":{"line":71,"column":25}},{"start":{"line":72,"column":7},"end":{"line":74,"column":39}}]},"9":{"line":72,"type":"cond-expr","locations":[{"start":{"line":73,"column":8},"end":{"line":73,"column":35}},{"start":{"line":74,"column":8},"end":{"line":74,"column":39}}]},"10":{"line":73,"type":"binary-expr","locations":[{"start":{"line":73,"column":20},"end":{"line":73,"column":24}},{"start":{"line":73,"column":28},"end":{"line":73,"column":34}}]},"11":{"line":74,"type":"binary-expr","locations":[{"start":{"line":74,"column":24},"end":{"line":74,"column":28}},{"start":{"line":74,"column":32},"end":{"line":74,"column":38}}]},"12":{"line":92,"type":"binary-expr","locations":[{"start":{"line":92,"column":11},"end":{"line":92,"column":31}},{"start":{"line":92,"column":35},"end":{"line":92,"column":63}},{"start":{"line":93,"column":11},"end":{"line":93,"column":24}}]},"13":{"line":107,"type":"cond-expr","locations":[{"start":{"line":107,"column":51},"end":{"line":107,"column":75}},{"start":{"line":107,"column":78},"end":{"line":107,"column":83}}]},"14":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":6},"end":{"line":166,"column":6}},{"start":{"line":166,"column":6},"end":{"line":166,"column":6}}]},"15":{"line":172,"type":"if","locations":[{"start":{"line":172,"column":4},"end":{"line":172,"column":4}},{"start":{"line":172,"column":4},"end":{"line":172,"column":4}}]},"16":{"line":173,"type":"if","locations":[{"start":{"line":173,"column":6},"end":{"line":173,"column":6}},{"start":{"line":173,"column":6},"end":{"line":173,"column":6}}]},"17":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":4},"end":{"line":193,"column":4}},{"start":{"line":193,"column":4},"end":{"line":193,"column":4}}]},"18":{"line":194,"type":"binary-expr","locations":[{"start":{"line":194,"column":6},"end":{"line":194,"column":12}},{"start":{"line":195,"column":6},"end":{"line":195,"column":37}}]},"19":{"line":212,"type":"binary-expr","locations":[{"start":{"line":212,"column":16},"end":{"line":212,"column":23}},{"start":{"line":212,"column":27},"end":{"line":212,"column":43}}]},"20":{"line":213,"type":"binary-expr","locations":[{"start":{"line":213,"column":18},"end":{"line":213,"column":24}},{"start":{"line":214,"column":19},"end":{"line":214,"column":49}},{"start":{"line":215,"column":18},"end":{"line":215,"column":50}}]},"21":{"line":216,"type":"cond-expr","locations":[{"start":{"line":216,"column":23},"end":{"line":216,"column":36}},{"start":{"line":216,"column":39},"end":{"line":216,"column":41}}]},"22":{"line":217,"type":"binary-expr","locations":[{"start":{"line":217,"column":16},"end":{"line":217,"column":25}},{"start":{"line":217,"column":29},"end":{"line":217,"column":36}}]},"23":{"line":218,"type":"binary-expr","locations":[{"start":{"line":218,"column":20},"end":{"line":218,"column":29}},{"start":{"line":218,"column":34},"end":{"line":218,"column":40}},{"start":{"line":218,"column":44},"end":{"line":218,"column":56}}]},"24":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":4},"end":{"line":221,"column":4}},{"start":{"line":221,"column":4},"end":{"line":221,"column":4}}]},"25":{"line":221,"type":"binary-expr","locations":[{"start":{"line":221,"column":8},"end":{"line":221,"column":15}},{"start":{"line":221,"column":19},"end":{"line":221,"column":30}}]},"26":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":6},"end":{"line":223,"column":6}},{"start":{"line":223,"column":6},"end":{"line":223,"column":6}}]},"27":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":8},"end":{"line":224,"column":8}},{"start":{"line":224,"column":8},"end":{"line":224,"column":8}}]},"28":{"line":224,"type":"binary-expr","locations":[{"start":{"line":224,"column":12},"end":{"line":224,"column":30}},{"start":{"line":224,"column":34},"end":{"line":224,"column":55}}]},"29":{"line":227,"type":"if","locations":[{"start":{"line":227,"column":13},"end":{"line":227,"column":13}},{"start":{"line":227,"column":13},"end":{"line":227,"column":13}}]},"30":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":4},"end":{"line":232,"column":4}},{"start":{"line":232,"column":4},"end":{"line":232,"column":4}}]},"31":{"line":233,"type":"if","locations":[{"start":{"line":233,"column":6},"end":{"line":233,"column":6}},{"start":{"line":233,"column":6},"end":{"line":233,"column":6}}]},"32":{"line":235,"type":"if","locations":[{"start":{"line":235,"column":8},"end":{"line":235,"column":8}},{"start":{"line":235,"column":8},"end":{"line":235,"column":8}}]},"33":{"line":256,"type":"if","locations":[{"start":{"line":256,"column":8},"end":{"line":256,"column":8}},{"start":{"line":256,"column":8},"end":{"line":256,"column":8}}]},"34":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":10},"end":{"line":257,"column":10}},{"start":{"line":257,"column":10},"end":{"line":257,"column":10}}]},"35":{"line":261,"type":"if","locations":[{"start":{"line":261,"column":12},"end":{"line":261,"column":12}},{"start":{"line":261,"column":12},"end":{"line":261,"column":12}}]},"36":{"line":265,"type":"if","locations":[{"start":{"line":265,"column":14},"end":{"line":265,"column":14}},{"start":{"line":265,"column":14},"end":{"line":265,"column":14}}]},"37":{"line":278,"type":"if","locations":[{"start":{"line":278,"column":10},"end":{"line":278,"column":10}},{"start":{"line":278,"column":10},"end":{"line":278,"column":10}}]},"38":{"line":282,"type":"cond-expr","locations":[{"start":{"line":283,"column":6},"end":{"line":289,"column":7}},{"start":{"line":290,"column":7},"end":{"line":313,"column":9}}]},"39":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"40":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":10},"end":{"line":285,"column":10}},{"start":{"line":285,"column":10},"end":{"line":285,"column":10}}]},"41":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":10},"end":{"line":287,"column":10}},{"start":{"line":287,"column":10},"end":{"line":287,"column":10}}]},"42":{"line":290,"type":"cond-expr","locations":[{"start":{"line":291,"column":8},"end":{"line":291,"column":19}},{"start":{"line":292,"column":8},"end":{"line":313,"column":9}}]},"43":{"line":293,"type":"if","locations":[{"start":{"line":293,"column":10},"end":{"line":293,"column":10}},{"start":{"line":293,"column":10},"end":{"line":293,"column":10}}]},"44":{"line":297,"type":"if","locations":[{"start":{"line":297,"column":12},"end":{"line":297,"column":12}},{"start":{"line":297,"column":12},"end":{"line":297,"column":12}}]},"45":{"line":298,"type":"if","locations":[{"start":{"line":298,"column":14},"end":{"line":298,"column":14}},{"start":{"line":298,"column":14},"end":{"line":298,"column":14}}]},"46":{"line":299,"type":"if","locations":[{"start":{"line":299,"column":16},"end":{"line":299,"column":16}},{"start":{"line":299,"column":16},"end":{"line":299,"column":16}}]},"47":{"line":306,"type":"if","locations":[{"start":{"line":306,"column":16},"end":{"line":306,"column":16}},{"start":{"line":306,"column":16},"end":{"line":306,"column":16}}]},"48":{"line":321,"type":"if","locations":[{"start":{"line":321,"column":6},"end":{"line":321,"column":6}},{"start":{"line":321,"column":6},"end":{"line":321,"column":6}}]},"49":{"line":333,"type":"switch","locations":[{"start":{"line":334,"column":8},"end":{"line":334,"column":22}},{"start":{"line":335,"column":8},"end":{"line":335,"column":22}},{"start":{"line":336,"column":8},"end":{"line":357,"column":16}},{"start":{"line":358,"column":8},"end":{"line":360,"column":16}},{"start":{"line":361,"column":8},"end":{"line":361,"column":22}},{"start":{"line":362,"column":8},"end":{"line":369,"column":11}},{"start":{"line":370,"column":8},"end":{"line":435,"column":16}}]},"50":{"line":338,"type":"if","locations":[{"start":{"line":338,"column":10},"end":{"line":338,"column":10}},{"start":{"line":338,"column":10},"end":{"line":338,"column":10}}]},"51":{"line":339,"type":"binary-expr","locations":[{"start":{"line":339,"column":12},"end":{"line":339,"column":24}},{"start":{"line":340,"column":12},"end":{"line":340,"column":48}}]},"52":{"line":342,"type":"if","locations":[{"start":{"line":342,"column":12},"end":{"line":342,"column":12}},{"start":{"line":342,"column":12},"end":{"line":342,"column":12}}]},"53":{"line":348,"type":"if","locations":[{"start":{"line":348,"column":12},"end":{"line":348,"column":12}},{"start":{"line":348,"column":12},"end":{"line":348,"column":12}}]},"54":{"line":363,"type":"if","locations":[{"start":{"line":363,"column":10},"end":{"line":363,"column":10}},{"start":{"line":363,"column":10},"end":{"line":363,"column":10}}]},"55":{"line":367,"type":"if","locations":[{"start":{"line":367,"column":17},"end":{"line":367,"column":17}},{"start":{"line":367,"column":17},"end":{"line":367,"column":17}}]},"56":{"line":372,"type":"if","locations":[{"start":{"line":372,"column":10},"end":{"line":372,"column":10}},{"start":{"line":372,"column":10},"end":{"line":372,"column":10}}]},"57":{"line":374,"type":"if","locations":[{"start":{"line":374,"column":12},"end":{"line":374,"column":12}},{"start":{"line":374,"column":12},"end":{"line":374,"column":12}}]},"58":{"line":377,"type":"switch","locations":[{"start":{"line":378,"column":16},"end":{"line":378,"column":30}},{"start":{"line":379,"column":16},"end":{"line":379,"column":30}},{"start":{"line":380,"column":16},"end":{"line":382,"column":24}},{"start":{"line":383,"column":16},"end":{"line":389,"column":24}},{"start":{"line":390,"column":16},"end":{"line":403,"column":19}},{"start":{"line":404,"column":16},"end":{"line":406,"column":24}}]},"59":{"line":391,"type":"if","locations":[{"start":{"line":391,"column":18},"end":{"line":391,"column":18}},{"start":{"line":391,"column":18},"end":{"line":391,"column":18}}]},"60":{"line":394,"type":"if","locations":[{"start":{"line":394,"column":18},"end":{"line":394,"column":18}},{"start":{"line":394,"column":18},"end":{"line":394,"column":18}}]},"61":{"line":399,"type":"if","locations":[{"start":{"line":399,"column":22},"end":{"line":399,"column":22}},{"start":{"line":399,"column":22},"end":{"line":399,"column":22}}]},"62":{"line":409,"type":"if","locations":[{"start":{"line":409,"column":17},"end":{"line":409,"column":17}},{"start":{"line":409,"column":17},"end":{"line":409,"column":17}}]},"63":{"line":412,"type":"cond-expr","locations":[{"start":{"line":413,"column":16},"end":{"line":413,"column":44}},{"start":{"line":414,"column":16},"end":{"line":414,"column":23}}]},"64":{"line":416,"type":"if","locations":[{"start":{"line":416,"column":17},"end":{"line":416,"column":17}},{"start":{"line":416,"column":17},"end":{"line":416,"column":17}}]},"65":{"line":418,"type":"if","locations":[{"start":{"line":418,"column":17},"end":{"line":418,"column":17}},{"start":{"line":418,"column":17},"end":{"line":418,"column":17}}]},"66":{"line":420,"type":"if","locations":[{"start":{"line":420,"column":17},"end":{"line":420,"column":17}},{"start":{"line":420,"column":17},"end":{"line":420,"column":17}}]},"67":{"line":422,"type":"if","locations":[{"start":{"line":422,"column":17},"end":{"line":422,"column":17}},{"start":{"line":422,"column":17},"end":{"line":422,"column":17}}]},"68":{"line":424,"type":"if","locations":[{"start":{"line":424,"column":17},"end":{"line":424,"column":17}},{"start":{"line":424,"column":17},"end":{"line":424,"column":17}}]},"69":{"line":430,"type":"if","locations":[{"start":{"line":430,"column":17},"end":{"line":430,"column":17}},{"start":{"line":430,"column":17},"end":{"line":430,"column":17}}]},"70":{"line":455,"type":"if","locations":[{"start":{"line":455,"column":6},"end":{"line":455,"column":6}},{"start":{"line":455,"column":6},"end":{"line":455,"column":6}}]},"71":{"line":458,"type":"if","locations":[{"start":{"line":458,"column":8},"end":{"line":458,"column":8}},{"start":{"line":458,"column":8},"end":{"line":458,"column":8}}]},"72":{"line":476,"type":"binary-expr","locations":[{"start":{"line":476,"column":24},"end":{"line":476,"column":39}},{"start":{"line":476,"column":43},"end":{"line":476,"column":72}}]},"73":{"line":492,"type":"switch","locations":[{"start":{"line":493,"column":8},"end":{"line":496,"column":16}},{"start":{"line":497,"column":8},"end":{"line":502,"column":16}},{"start":{"line":503,"column":8},"end":{"line":511,"column":16}}]},"74":{"line":498,"type":"if","locations":[{"start":{"line":498,"column":10},"end":{"line":498,"column":10}},{"start":{"line":498,"column":10},"end":{"line":498,"column":10}}]},"75":{"line":504,"type":"if","locations":[{"start":{"line":504,"column":10},"end":{"line":504,"column":10}},{"start":{"line":504,"column":10},"end":{"line":504,"column":10}}]},"76":{"line":505,"type":"binary-expr","locations":[{"start":{"line":505,"column":12},"end":{"line":505,"column":55}},{"start":{"line":506,"column":12},"end":{"line":506,"column":49}}]},"77":{"line":534,"type":"binary-expr","locations":[{"start":{"line":534,"column":11},"end":{"line":534,"column":40}},{"start":{"line":535,"column":12},"end":{"line":535,"column":54}},{"start":{"line":536,"column":12},"end":{"line":536,"column":38}}]},"78":{"line":554,"type":"if","locations":[{"start":{"line":554,"column":4},"end":{"line":554,"column":4}},{"start":{"line":554,"column":4},"end":{"line":554,"column":4}}]},"79":{"line":554,"type":"binary-expr","locations":[{"start":{"line":554,"column":8},"end":{"line":554,"column":44}},{"start":{"line":554,"column":48},"end":{"line":554,"column":50}}]},"80":{"line":594,"type":"if","locations":[{"start":{"line":594,"column":6},"end":{"line":594,"column":6}},{"start":{"line":594,"column":6},"end":{"line":594,"column":6}}]},"81":{"line":595,"type":"binary-expr","locations":[{"start":{"line":595,"column":8},"end":{"line":595,"column":39}},{"start":{"line":596,"column":8},"end":{"line":596,"column":49}}]},"82":{"line":601,"type":"cond-expr","locations":[{"start":{"line":601,"column":34},"end":{"line":601,"column":44}},{"start":{"line":601,"column":47},"end":{"line":601,"column":54}}]},"83":{"line":613,"type":"cond-expr","locations":[{"start":{"line":614,"column":8},"end":{"line":614,"column":25}},{"start":{"line":615,"column":8},"end":{"line":615,"column":26}}]},"84":{"line":628,"type":"cond-expr","locations":[{"start":{"line":629,"column":6},"end":{"line":629,"column":11}},{"start":{"line":629,"column":14},"end":{"line":629,"column":24}}]},"85":{"line":634,"type":"if","locations":[{"start":{"line":634,"column":4},"end":{"line":634,"column":4}},{"start":{"line":634,"column":4},"end":{"line":634,"column":4}}]},"86":{"line":645,"type":"if","locations":[{"start":{"line":645,"column":4},"end":{"line":645,"column":4}},{"start":{"line":645,"column":4},"end":{"line":645,"column":4}}]},"87":{"line":654,"type":"if","locations":[{"start":{"line":654,"column":6},"end":{"line":654,"column":6}},{"start":{"line":654,"column":6},"end":{"line":654,"column":6}}]},"88":{"line":668,"type":"if","locations":[{"start":{"line":668,"column":4},"end":{"line":668,"column":4}},{"start":{"line":668,"column":4},"end":{"line":668,"column":4}}]},"89":{"line":668,"type":"binary-expr","locations":[{"start":{"line":668,"column":8},"end":{"line":668,"column":10}},{"start":{"line":668,"column":14},"end":{"line":668,"column":16}}]},"90":{"line":695,"type":"if","locations":[{"start":{"line":695,"column":6},"end":{"line":695,"column":6}},{"start":{"line":695,"column":6},"end":{"line":695,"column":6},"skip":true}]},"91":{"line":704,"type":"if","locations":[{"start":{"line":704,"column":4},"end":{"line":704,"column":4},"skip":true},{"start":{"line":704,"column":4},"end":{"line":704,"column":4},"skip":true}]},"92":{"line":705,"type":"binary-expr","locations":[{"start":{"line":705,"column":25},"end":{"line":705,"column":26},"skip":true},{"start":{"line":705,"column":31},"end":{"line":705,"column":51},"skip":true}]},"93":{"line":707,"type":"if","locations":[{"start":{"line":707,"column":9},"end":{"line":707,"column":9},"skip":true},{"start":{"line":707,"column":9},"end":{"line":707,"column":9},"skip":true}]},"94":{"line":707,"type":"binary-expr","locations":[{"start":{"line":707,"column":13},"end":{"line":707,"column":24},"skip":true},{"start":{"line":707,"column":28},"end":{"line":707,"column":50},"skip":true}]},"95":{"line":726,"type":"binary-expr","locations":[{"start":{"line":726,"column":13},"end":{"line":726,"column":31}},{"start":{"line":726,"column":35},"end":{"line":726,"column":65}}]},"96":{"line":727,"type":"binary-expr","locations":[{"start":{"line":727,"column":11},"end":{"line":727,"column":13}},{"start":{"line":727,"column":17},"end":{"line":727,"column":52}}]},"97":{"line":734,"type":"if","locations":[{"start":{"line":734,"column":4},"end":{"line":734,"column":4}},{"start":{"line":734,"column":4},"end":{"line":734,"column":4}}]},"98":{"line":734,"type":"binary-expr","locations":[{"start":{"line":734,"column":8},"end":{"line":734,"column":14}},{"start":{"line":734,"column":18},"end":{"line":734,"column":41}}]},"99":{"line":736,"type":"if","locations":[{"start":{"line":736,"column":6},"end":{"line":736,"column":6}},{"start":{"line":736,"column":6},"end":{"line":736,"column":6}}]},"100":{"line":738,"type":"binary-expr","locations":[{"start":{"line":738,"column":11},"end":{"line":738,"column":17}},{"start":{"line":738,"column":21},"end":{"line":738,"column":33}}]},"101":{"line":744,"type":"if","locations":[{"start":{"line":744,"column":4},"end":{"line":744,"column":4}},{"start":{"line":744,"column":4},"end":{"line":744,"column":4}}]},"102":{"line":746,"type":"if","locations":[{"start":{"line":746,"column":11},"end":{"line":746,"column":11}},{"start":{"line":746,"column":11},"end":{"line":746,"column":11}}]},"103":{"line":748,"type":"if","locations":[{"start":{"line":748,"column":11},"end":{"line":748,"column":11}},{"start":{"line":748,"column":11},"end":{"line":748,"column":11}}]},"104":{"line":759,"type":"if","locations":[{"start":{"line":759,"column":6},"end":{"line":759,"column":6}},{"start":{"line":759,"column":6},"end":{"line":759,"column":6}}]},"105":{"line":772,"type":"binary-expr","locations":[{"start":{"line":772,"column":11},"end":{"line":772,"column":24}},{"start":{"line":772,"column":28},"end":{"line":772,"column":43}}]},"106":{"line":781,"type":"binary-expr","locations":[{"start":{"line":781,"column":15},"end":{"line":781,"column":27}},{"start":{"line":781,"column":32},"end":{"line":781,"column":64}}]},"107":{"line":792,"type":"if","locations":[{"start":{"line":792,"column":4},"end":{"line":792,"column":4}},{"start":{"line":792,"column":4},"end":{"line":792,"column":4}}]},"108":{"line":796,"type":"if","locations":[{"start":{"line":796,"column":8},"end":{"line":796,"column":8}},{"start":{"line":796,"column":8},"end":{"line":796,"column":8}}]},"109":{"line":796,"type":"binary-expr","locations":[{"start":{"line":796,"column":12},"end":{"line":796,"column":42}},{"start":{"line":796,"column":46},"end":{"line":796,"column":66}}]},"110":{"line":814,"type":"switch","locations":[{"start":{"line":815,"column":6},"end":{"line":818,"column":14}},{"start":{"line":819,"column":6},"end":{"line":821,"column":14}},{"start":{"line":822,"column":6},"end":{"line":824,"column":14}}]},"111":{"line":871,"type":"cond-expr","locations":[{"start":{"line":872,"column":6},"end":{"line":886,"column":7}},{"start":{"line":887,"column":6},"end":{"line":887,"column":13}}]},"112":{"line":889,"type":"cond-expr","locations":[{"start":{"line":890,"column":6},"end":{"line":898,"column":7}},{"start":{"line":899,"column":6},"end":{"line":899,"column":13}}]},"113":{"line":902,"type":"cond-expr","locations":[{"start":{"line":903,"column":6},"end":{"line":916,"column":7}},{"start":{"line":917,"column":6},"end":{"line":917,"column":9}}]},"114":{"line":922,"type":"binary-expr","locations":[{"start":{"line":922,"column":16},"end":{"line":922,"column":29}},{"start":{"line":923,"column":17},"end":{"line":931,"column":19}}]},"115":{"line":934,"type":"binary-expr","locations":[{"start":{"line":934,"column":13},"end":{"line":934,"column":25}},{"start":{"line":935,"column":14},"end":{"line":935,"column":68}}]},"116":{"line":952,"type":"binary-expr","locations":[{"start":{"line":952,"column":11},"end":{"line":952,"column":31}},{"start":{"line":953,"column":11},"end":{"line":953,"column":42}}]},"117":{"line":957,"type":"cond-expr","locations":[{"start":{"line":958,"column":6},"end":{"line":960,"column":7}},{"start":{"line":961,"column":6},"end":{"line":969,"column":7}}]},"118":{"line":972,"type":"cond-expr","locations":[{"start":{"line":973,"column":6},"end":{"line":986,"column":7}},{"start":{"line":987,"column":6},"end":{"line":987,"column":47}}]},"119":{"line":972,"type":"binary-expr","locations":[{"start":{"line":972,"column":20},"end":{"line":972,"column":22}},{"start":{"line":972,"column":26},"end":{"line":972,"column":28}}]},"120":{"line":982,"type":"if","locations":[{"start":{"line":982,"column":10},"end":{"line":982,"column":10}},{"start":{"line":982,"column":10},"end":{"line":982,"column":10}}]},"121":{"line":991,"type":"cond-expr","locations":[{"start":{"line":992,"column":6},"end":{"line":1005,"column":7}},{"start":{"line":1006,"column":6},"end":{"line":1011,"column":7}}]},"122":{"line":991,"type":"binary-expr","locations":[{"start":{"line":991,"column":16},"end":{"line":991,"column":18}},{"start":{"line":991,"column":22},"end":{"line":991,"column":24}}]},"123":{"line":995,"type":"switch","locations":[{"start":{"line":996,"column":12},"end":{"line":998,"column":20}},{"start":{"line":999,"column":12},"end":{"line":1001,"column":20}}]},"124":{"line":1022,"type":"binary-expr","locations":[{"start":{"line":1022,"column":17},"end":{"line":1022,"column":19}},{"start":{"line":1022,"column":23},"end":{"line":1022,"column":26}}]},"125":{"line":1022,"type":"binary-expr","locations":[{"start":{"line":1022,"column":37},"end":{"line":1022,"column":39}},{"start":{"line":1022,"column":43},"end":{"line":1022,"column":46}}]},"126":{"line":1048,"type":"cond-expr","locations":[{"start":{"line":1049,"column":6},"end":{"line":1059,"column":7}},{"start":{"line":1060,"column":6},"end":{"line":1062,"column":7}}]},"127":{"line":1070,"type":"cond-expr","locations":[{"start":{"line":1071,"column":4},"end":{"line":1076,"column":5}},{"start":{"line":1077,"column":4},"end":{"line":1077,"column":55}}]},"128":{"line":1073,"type":"if","locations":[{"start":{"line":1073,"column":8},"end":{"line":1073,"column":8}},{"start":{"line":1073,"column":8},"end":{"line":1073,"column":8}}]},"129":{"line":1079,"type":"cond-expr","locations":[{"start":{"line":1080,"column":4},"end":{"line":1085,"column":5}},{"start":{"line":1086,"column":4},"end":{"line":1086,"column":59}}]},"130":{"line":1082,"type":"if","locations":[{"start":{"line":1082,"column":7},"end":{"line":1082,"column":7}},{"start":{"line":1082,"column":7},"end":{"line":1082,"column":7}}]},"131":{"line":1091,"type":"if","locations":[{"start":{"line":1091,"column":4},"end":{"line":1091,"column":4}},{"start":{"line":1091,"column":4},"end":{"line":1091,"column":4}}]},"132":{"line":1091,"type":"binary-expr","locations":[{"start":{"line":1091,"column":8},"end":{"line":1091,"column":23}},{"start":{"line":1091,"column":27},"end":{"line":1091,"column":65}}]},"133":{"line":1099,"type":"if","locations":[{"start":{"line":1099,"column":4},"end":{"line":1099,"column":4}},{"start":{"line":1099,"column":4},"end":{"line":1099,"column":4}}]},"134":{"line":1118,"type":"switch","locations":[{"start":{"line":1119,"column":8},"end":{"line":1125,"column":16}},{"start":{"line":1126,"column":8},"end":{"line":1170,"column":16}},{"start":{"line":1171,"column":8},"end":{"line":1180,"column":16}}]},"135":{"line":1121,"type":"if","locations":[{"start":{"line":1121,"column":10},"end":{"line":1121,"column":10}},{"start":{"line":1121,"column":10},"end":{"line":1121,"column":10}}]},"136":{"line":1130,"type":"cond-expr","locations":[{"start":{"line":1130,"column":33},"end":{"line":1130,"column":79}},{"start":{"line":1130,"column":83},"end":{"line":1130,"column":85}}]},"137":{"line":1132,"type":"cond-expr","locations":[{"start":{"line":1132,"column":31},"end":{"line":1132,"column":73}},{"start":{"line":1132,"column":76},"end":{"line":1132,"column":78}}]},"138":{"line":1134,"type":"switch","locations":[{"start":{"line":1139,"column":12},"end":{"line":1141,"column":20}},{"start":{"line":1143,"column":12},"end":{"line":1144,"column":25}},{"start":{"line":1146,"column":12},"end":{"line":1148,"column":20}}]},"139":{"line":1154,"type":"if","locations":[{"start":{"line":1154,"column":10},"end":{"line":1154,"column":10}},{"start":{"line":1154,"column":10},"end":{"line":1154,"column":10}}]},"140":{"line":1167,"type":"if","locations":[{"start":{"line":1167,"column":10},"end":{"line":1167,"column":10}},{"start":{"line":1167,"column":10},"end":{"line":1167,"column":10}}]},"141":{"line":1173,"type":"binary-expr","locations":[{"start":{"line":1173,"column":19},"end":{"line":1173,"column":51}},{"start":{"line":1174,"column":20},"end":{"line":1178,"column":21}}]},"142":{"line":1229,"type":"switch","locations":[{"start":{"line":1230,"column":6},"end":{"line":1230,"column":24}},{"start":{"line":1231,"column":6},"end":{"line":1233,"column":14}},{"start":{"line":1234,"column":6},"end":{"line":1240,"column":14}},{"start":{"line":1241,"column":6},"end":{"line":1241,"column":26}},{"start":{"line":1242,"column":6},"end":{"line":1245,"column":14}}]},"143":{"line":1292,"type":"binary-expr","locations":[{"start":{"line":1292,"column":16},"end":{"line":1292,"column":39}},{"start":{"line":1293,"column":16},"end":{"line":1293,"column":51}}]},"144":{"line":1294,"type":"if","locations":[{"start":{"line":1294,"column":4},"end":{"line":1294,"column":4}},{"start":{"line":1294,"column":4},"end":{"line":1294,"column":4}}]},"145":{"line":1318,"type":"cond-expr","locations":[{"start":{"line":1319,"column":8},"end":{"line":1319,"column":54}},{"start":{"line":1320,"column":8},"end":{"line":1320,"column":16}}]},"146":{"line":1325,"type":"if","locations":[{"start":{"line":1325,"column":6},"end":{"line":1325,"column":6}},{"start":{"line":1325,"column":6},"end":{"line":1325,"column":6}}]},"147":{"line":1327,"type":"if","locations":[{"start":{"line":1327,"column":8},"end":{"line":1327,"column":8}},{"start":{"line":1327,"column":8},"end":{"line":1327,"column":8}}]},"148":{"line":1335,"type":"cond-expr","locations":[{"start":{"line":1336,"column":6},"end":{"line":1362,"column":7}},{"start":{"line":1363,"column":6},"end":{"line":1372,"column":7}}]},"149":{"line":1339,"type":"if","locations":[{"start":{"line":1339,"column":8},"end":{"line":1339,"column":8}},{"start":{"line":1339,"column":8},"end":{"line":1339,"column":8}}]},"150":{"line":1343,"type":"if","locations":[{"start":{"line":1343,"column":12},"end":{"line":1343,"column":12}},{"start":{"line":1343,"column":12},"end":{"line":1343,"column":12}}]},"151":{"line":1344,"type":"if","locations":[{"start":{"line":1344,"column":14},"end":{"line":1344,"column":14}},{"start":{"line":1344,"column":14},"end":{"line":1344,"column":14}}]},"152":{"line":1353,"type":"if","locations":[{"start":{"line":1353,"column":16},"end":{"line":1353,"column":16}},{"start":{"line":1353,"column":16},"end":{"line":1353,"column":16}}]},"153":{"line":1365,"type":"if","locations":[{"start":{"line":1365,"column":8},"end":{"line":1365,"column":8}},{"start":{"line":1365,"column":8},"end":{"line":1365,"column":8}}]},"154":{"line":1380,"type":"if","locations":[{"start":{"line":1380,"column":4},"end":{"line":1380,"column":4}},{"start":{"line":1380,"column":4},"end":{"line":1380,"column":4}}]},"155":{"line":1382,"type":"binary-expr","locations":[{"start":{"line":1382,"column":13},"end":{"line":1382,"column":29}},{"start":{"line":1382,"column":33},"end":{"line":1382,"column":39}}]},"156":{"line":1384,"type":"if","locations":[{"start":{"line":1384,"column":4},"end":{"line":1384,"column":4}},{"start":{"line":1384,"column":4},"end":{"line":1384,"column":4}}]},"157":{"line":1388,"type":"binary-expr","locations":[{"start":{"line":1388,"column":11},"end":{"line":1388,"column":19}},{"start":{"line":1388,"column":24},"end":{"line":1388,"column":52}}]},"158":{"line":1416,"type":"cond-expr","locations":[{"start":{"line":1416,"column":48},"end":{"line":1416,"column":53}},{"start":{"line":1416,"column":56},"end":{"line":1416,"column":66}}]},"159":{"line":1423,"type":"binary-expr","locations":[{"start":{"line":1423,"column":18},"end":{"line":1423,"column":26}},{"start":{"line":1423,"column":30},"end":{"line":1423,"column":38}}]},"160":{"line":1423,"type":"binary-expr","locations":[{"start":{"line":1423,"column":53},"end":{"line":1423,"column":63}},{"start":{"line":1423,"column":67},"end":{"line":1423,"column":68}}]},"161":{"line":1423,"type":"binary-expr","locations":[{"start":{"line":1423,"column":73},"end":{"line":1423,"column":81}},{"start":{"line":1423,"column":85},"end":{"line":1423,"column":86}}]},"162":{"line":1425,"type":"if","locations":[{"start":{"line":1425,"column":4},"end":{"line":1425,"column":4}},{"start":{"line":1425,"column":4},"end":{"line":1425,"column":4}}]},"163":{"line":1425,"type":"binary-expr","locations":[{"start":{"line":1425,"column":8},"end":{"line":1425,"column":22}},{"start":{"line":1425,"column":26},"end":{"line":1425,"column":34}}]},"164":{"line":1427,"type":"if","locations":[{"start":{"line":1427,"column":6},"end":{"line":1427,"column":6},"skip":true},{"start":{"line":1427,"column":6},"end":{"line":1427,"column":6},"skip":true}]},"165":{"line":1427,"type":"binary-expr","locations":[{"start":{"line":1427,"column":10},"end":{"line":1427,"column":18},"skip":true},{"start":{"line":1427,"column":22},"end":{"line":1427,"column":30},"skip":true}]},"166":{"line":1432,"type":"if","locations":[{"start":{"line":1432,"column":4},"end":{"line":1432,"column":4}},{"start":{"line":1432,"column":4},"end":{"line":1432,"column":4}}]},"167":{"line":1489,"type":"cond-expr","locations":[{"start":{"line":1489,"column":51},"end":{"line":1489,"column":52}},{"start":{"line":1489,"column":55},"end":{"line":1489,"column":56}}]},"168":{"line":1490,"type":"cond-expr","locations":[{"start":{"line":1491,"column":27},"end":{"line":1492,"column":37}},{"start":{"line":1493,"column":27},"end":{"line":1494,"column":37}}]},"169":{"line":1491,"type":"cond-expr","locations":[{"start":{"line":1492,"column":28},"end":{"line":1492,"column":31}},{"start":{"line":1492,"column":34},"end":{"line":1492,"column":37}}]},"170":{"line":1493,"type":"cond-expr","locations":[{"start":{"line":1494,"column":28},"end":{"line":1494,"column":31}},{"start":{"line":1494,"column":34},"end":{"line":1494,"column":37}}]},"171":{"line":1524,"type":"binary-expr","locations":[{"start":{"line":1524,"column":11},"end":{"line":1524,"column":12}},{"start":{"line":1524,"column":16},"end":{"line":1524,"column":17}}]},"172":{"line":1531,"type":"if","locations":[{"start":{"line":1531,"column":6},"end":{"line":1531,"column":6}},{"start":{"line":1531,"column":6},"end":{"line":1531,"column":6}}]},"173":{"line":1531,"type":"binary-expr","locations":[{"start":{"line":1531,"column":10},"end":{"line":1531,"column":26}},{"start":{"line":1531,"column":30},"end":{"line":1531,"column":45}},{"start":{"line":1531,"column":49},"end":{"line":1531,"column":65}}]},"174":{"line":1534,"type":"if","locations":[{"start":{"line":1534,"column":8},"end":{"line":1534,"column":8}},{"start":{"line":1534,"column":8},"end":{"line":1534,"column":8}}]},"175":{"line":1538,"type":"if","locations":[{"start":{"line":1538,"column":11},"end":{"line":1538,"column":11}},{"start":{"line":1538,"column":11},"end":{"line":1538,"column":11}}]},"176":{"line":1538,"type":"binary-expr","locations":[{"start":{"line":1538,"column":15},"end":{"line":1538,"column":26}},{"start":{"line":1538,"column":30},"end":{"line":1538,"column":42}}]},"177":{"line":1565,"type":"if","locations":[{"start":{"line":1565,"column":4},"end":{"line":1565,"column":4}},{"start":{"line":1565,"column":4},"end":{"line":1565,"column":4},"skip":true}]},"178":{"line":1569,"type":"if","locations":[{"start":{"line":1569,"column":8},"end":{"line":1569,"column":8}},{"start":{"line":1569,"column":8},"end":{"line":1569,"column":8}}]},"179":{"line":1569,"type":"binary-expr","locations":[{"start":{"line":1569,"column":12},"end":{"line":1569,"column":35}},{"start":{"line":1569,"column":39},"end":{"line":1569,"column":61}},{"start":{"line":1569,"column":65},"end":{"line":1569,"column":87}}]},"180":{"line":1574,"type":"cond-expr","locations":[{"start":{"line":1575,"column":12},"end":{"line":1575,"column":27}},{"start":{"line":1575,"column":31},"end":{"line":1576,"column":27}}]},"181":{"line":1575,"type":"cond-expr","locations":[{"start":{"line":1576,"column":14},"end":{"line":1576,"column":23}},{"start":{"line":1576,"column":26},"end":{"line":1576,"column":27}}]}}}} \ No newline at end of file diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css deleted file mode 100644 index 29737bcb..00000000 --- a/coverage/lcov-report/base.css +++ /dev/null @@ -1,213 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.medium .chart { border:1px solid #f9cd0b; } -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } -/* light gray */ -span.cline-neutral { background: #eaeaea; } - -.cbranch-no { background: yellow !important; color: #111; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/coverage/lcov-report/hyperHTML/hyperhtml.js.html b/coverage/lcov-report/hyperHTML/hyperhtml.js.html deleted file mode 100644 index e69de29b..00000000 diff --git a/coverage/lcov-report/hyperHTML/index.html b/coverage/lcov-report/hyperHTML/index.html deleted file mode 100644 index 2d976b93..00000000 --- a/coverage/lcov-report/hyperHTML/index.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - Code coverage report for hyperHTML/ - - - - - - - -
-
-

- all files hyperHTML/ -

-
-
- 100% - Statements - 695/695 -
-
- 100% - Branches - 384/384 -
-
- 100% - Functions - 112/112 -
-
- 100% - Lines - 682/682 -
-
- 4 statements, 2 functions, 6 branches - Ignored      -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
index.js
100%695/695100%384/384100%112/112100%682/682
-
-
- - - - - - - diff --git a/coverage/lcov-report/hyperHTML/index.js.html b/coverage/lcov-report/hyperHTML/index.js.html deleted file mode 100644 index 1ed1159d..00000000 --- a/coverage/lcov-report/hyperHTML/index.js.html +++ /dev/null @@ -1,4866 +0,0 @@ - - - - Code coverage report for hyperHTML/index.js - - - - - - - -
-
-

- all files / hyperHTML/ index.js -

-
-
- 100% - Statements - 695/695 -
-
- 100% - Branches - 384/384 -
-
- 100% - Functions - 112/112 -
-
- 100% - Lines - 682/682 -
-
- 4 statements, 2 functions, 6 branches - Ignored      -
-
-
-
-

-
-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470 -471 -472 -473 -474 -475 -476 -477 -478 -479 -480 -481 -482 -483 -484 -485 -486 -487 -488 -489 -490 -491 -492 -493 -494 -495 -496 -497 -498 -499 -500 -501 -502 -503 -504 -505 -506 -507 -508 -509 -510 -511 -512 -513 -514 -515 -516 -517 -518 -519 -520 -521 -522 -523 -524 -525 -526 -527 -528 -529 -530 -531 -532 -533 -534 -535 -536 -537 -538 -539 -540 -541 -542 -543 -544 -545 -546 -547 -548 -549 -550 -551 -552 -553 -554 -555 -556 -557 -558 -559 -560 -561 -562 -563 -564 -565 -566 -567 -568 -569 -570 -571 -572 -573 -574 -575 -576 -577 -578 -579 -580 -581 -582 -583 -584 -585 -586 -587 -588 -589 -590 -591 -592 -593 -594 -595 -596 -597 -598 -599 -600 -601 -602 -603 -604 -605 -606 -607 -608 -609 -610 -611 -612 -613 -614 -615 -616 -617 -618 -619 -620 -621 -622 -623 -624 -625 -626 -627 -628 -629 -630 -631 -632 -633 -634 -635 -636 -637 -638 -639 -640 -641 -642 -643 -644 -645 -646 -647 -648 -649 -650 -651 -652 -653 -654 -655 -656 -657 -658 -659 -660 -661 -662 -663 -664 -665 -666 -667 -668 -669 -670 -671 -672 -673 -674 -675 -676 -677 -678 -679 -680 -681 -682 -683 -684 -685 -686 -687 -688 -689 -690 -691 -692 -693 -694 -695 -696 -697 -698 -699 -700 -701 -702 -703 -704 -705 -706 -707 -708 -709 -710 -711 -712 -713 -714 -715 -716 -717 -718 -719 -720 -721 -722 -723 -724 -725 -726 -727 -728 -729 -730 -731 -732 -733 -734 -735 -736 -737 -738 -739 -740 -741 -742 -743 -744 -745 -746 -747 -748 -749 -750 -751 -752 -753 -754 -755 -756 -757 -758 -759 -760 -761 -762 -763 -764 -765 -766 -767 -768 -769 -770 -771 -772 -773 -774 -775 -776 -777 -778 -779 -780 -781 -782 -783 -784 -785 -786 -787 -788 -789 -790 -791 -792 -793 -794 -795 -796 -797 -798 -799 -800 -801 -802 -803 -804 -805 -806 -807 -808 -809 -810 -811 -812 -813 -814 -815 -816 -817 -818 -819 -820 -821 -822 -823 -824 -825 -826 -827 -828 -829 -830 -831 -832 -833 -834 -835 -836 -837 -838 -839 -840 -841 -842 -843 -844 -845 -846 -847 -848 -849 -850 -851 -852 -853 -854 -855 -856 -857 -858 -859 -860 -861 -862 -863 -864 -865 -866 -867 -868 -869 -870 -871 -872 -873 -874 -875 -876 -877 -878 -879 -880 -881 -882 -883 -884 -885 -886 -887 -888 -889 -890 -891 -892 -893 -894 -895 -896 -897 -898 -899 -900 -901 -902 -903 -904 -905 -906 -907 -908 -909 -910 -911 -912 -913 -914 -915 -916 -917 -918 -919 -920 -921 -922 -923 -924 -925 -926 -927 -928 -929 -930 -931 -932 -933 -934 -935 -936 -937 -938 -939 -940 -941 -942 -943 -944 -945 -946 -947 -948 -949 -950 -951 -952 -953 -954 -955 -956 -957 -958 -959 -960 -961 -962 -963 -964 -965 -966 -967 -968 -969 -970 -971 -972 -973 -974 -975 -976 -977 -978 -979 -980 -981 -982 -983 -984 -985 -986 -987 -988 -989 -990 -991 -992 -993 -994 -995 -996 -997 -998 -999 -1000 -1001 -1002 -1003 -1004 -1005 -1006 -1007 -1008 -1009 -1010 -1011 -1012 -1013 -1014 -1015 -1016 -1017 -1018 -1019 -1020 -1021 -1022 -1023 -1024 -1025 -1026 -1027 -1028 -1029 -1030 -1031 -1032 -1033 -1034 -1035 -1036 -1037 -1038 -1039 -1040 -1041 -1042 -1043 -1044 -1045 -1046 -1047 -1048 -1049 -1050 -1051 -1052 -1053 -1054 -1055 -1056 -1057 -1058 -1059 -1060 -1061 -1062 -1063 -1064 -1065 -1066 -1067 -1068 -1069 -1070 -1071 -1072 -1073 -1074 -1075 -1076 -1077 -1078 -1079 -1080 -1081 -1082 -1083 -1084 -1085 -1086 -1087 -1088 -1089 -1090 -1091 -1092 -1093 -1094 -1095 -1096 -1097 -1098 -1099 -1100 -1101 -1102 -1103 -1104 -1105 -1106 -1107 -1108 -1109 -1110 -1111 -1112 -1113 -1114 -1115 -1116 -1117 -1118 -1119 -1120 -1121 -1122 -1123 -1124 -1125 -1126 -1127 -1128 -1129 -1130 -1131 -1132 -1133 -1134 -1135 -1136 -1137 -1138 -1139 -1140 -1141 -1142 -1143 -1144 -1145 -1146 -1147 -1148 -1149 -1150 -1151 -1152 -1153 -1154 -1155 -1156 -1157 -1158 -1159 -1160 -1161 -1162 -1163 -1164 -1165 -1166 -1167 -1168 -1169 -1170 -1171 -1172 -1173 -1174 -1175 -1176 -1177 -1178 -1179 -1180 -1181 -1182 -1183 -1184 -1185 -1186 -1187 -1188 -1189 -1190 -1191 -1192 -1193 -1194 -1195 -1196 -1197 -1198 -1199 -1200 -1201 -1202 -1203 -1204 -1205 -1206 -1207 -1208 -1209 -1210 -1211 -1212 -1213 -1214 -1215 -1216 -1217 -1218 -1219 -1220 -1221 -1222 -1223 -1224 -1225 -1226 -1227 -1228 -1229 -1230 -1231 -1232 -1233 -1234 -1235 -1236 -1237 -1238 -1239 -1240 -1241 -1242 -1243 -1244 -1245 -1246 -1247 -1248 -1249 -1250 -1251 -1252 -1253 -1254 -1255 -1256 -1257 -1258 -1259 -1260 -1261 -1262 -1263 -1264 -1265 -1266 -1267 -1268 -1269 -1270 -1271 -1272 -1273 -1274 -1275 -1276 -1277 -1278 -1279 -1280 -1281 -1282 -1283 -1284 -1285 -1286 -1287 -1288 -1289 -1290 -1291 -1292 -1293 -1294 -1295 -1296 -1297 -1298 -1299 -1300 -1301 -1302 -1303 -1304 -1305 -1306 -1307 -1308 -1309 -1310 -1311 -1312 -1313 -1314 -1315 -1316 -1317 -1318 -1319 -1320 -1321 -1322 -1323 -1324 -1325 -1326 -1327 -1328 -1329 -1330 -1331 -1332 -1333 -1334 -1335 -1336 -1337 -1338 -1339 -1340 -1341 -1342 -1343 -1344 -1345 -1346 -1347 -1348 -1349 -1350 -1351 -1352 -1353 -1354 -1355 -1356 -1357 -1358 -1359 -1360 -1361 -1362 -1363 -1364 -1365 -1366 -1367 -1368 -1369 -1370 -1371 -1372 -1373 -1374 -1375 -1376 -1377 -1378 -1379 -1380 -1381 -1382 -1383 -1384 -1385 -1386 -1387 -1388 -1389 -1390 -1391 -1392 -1393 -1394 -1395 -1396 -1397 -1398 -1399 -1400 -1401 -1402 -1403 -1404 -1405 -1406 -1407 -1408 -1409 -1410 -1411 -1412 -1413 -1414 -1415 -1416 -1417 -1418 -1419 -1420 -1421 -1422 -1423 -1424 -1425 -1426 -1427 -1428 -1429 -1430 -1431 -1432 -1433 -1434 -1435 -1436 -1437 -1438 -1439 -1440 -1441 -1442 -1443 -1444 -1445 -1446 -1447 -1448 -1449 -1450 -1451 -1452 -1453 -1454 -1455 -1456 -1457 -1458 -1459 -1460 -1461 -1462 -1463 -1464 -1465 -1466 -1467 -1468 -1469 -1470 -1471 -1472 -1473 -1474 -1475 -1476 -1477 -1478 -1479 -1480 -1481 -1482 -1483 -1484 -1485 -1486 -1487 -1488 -1489 -1490 -1491 -1492 -1493 -1494 -1495 -1496 -1497 -1498 -1499 -1500 -1501 -1502 -1503 -1504 -1505 -1506 -1507 -1508 -1509 -1510 -1511 -1512 -1513 -1514 -1515 -1516 -1517 -1518 -1519 -1520 -1521 -1522 -1523 -1524 -1525 -1526 -1527 -1528 -1529 -1530 -1531 -1532 -1533 -1534 -1535 -1536 -1537 -1538 -1539 -1540 -1541 -1542 -1543 -1544 -1545 -1546 -1547 -1548 -1549 -1550 -1551 -1552 -1553 -1554 -1555 -1556 -1557 -1558 -1559 -1560 -1561 -1562 -1563 -1564 -1565 -1566 -1567 -1568 -1569 -1570 -1571 -1572 -1573 -1574 -1575 -1576 -1577 -1578 -1579 -1580 -1581 -1582 -1583 -1584 -1585 -1586 -1587 -1588 -1589 -1590 -1591 -1592 -1593 -1594 -1595 -1596 -1597 -1598 -1599 -16002ร— -  -  -  -  -  -  -  -  -  -2ร— -  -  -2ร— -  -1ร— -20ร— -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2ร— -28ร— -32ร— -32ร— -32ร— -32ร— -  -  -  -  -  -2ร— -229ร— -  -  -2ร— -4ร— -2ร— -  -4ร— -  -  -  -  -2ร— -2ร— -  -  -  -  -2ร— -1ร— -73ร— -  -  -  -  -  -  -  -  -  -  -  -2ร— -1ร— -2ร— -  -  -  -  -  -9ร— -9ร— -  -  -  -  -  -  -  -  -  -5ร— -  -4ร— -  -  -5ร— -5ร— -9ร— -5ร— -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2ร— -2ร— -2ร— -2ร— -2ร— -  -  -2ร— -2ร— -  -2ร— -2ร— -2ร— -2ร— -2ร— -  -  -  -  -  -1ร— -113ร— -113ร— -113ร— -  -  -2ร— -95ร— -  -  -  -  -  -  -  -  -  -  -53ร— -  -53ร— -48ร— -  -  -95ร— -95ร— -95ร— -53ร— -38ร— -  -15ร— -15ร— -41ร— -  -  -53ร— -  -95ร— -  -  -  -  -  -  -  -1ร— -311ร— -311ร— -  -  -  -170ร— -  -141ร— -  -309ร— -  -  -  -  -  -  -1ร— -59ร— -  -  -  -  -  -  -  -  -  -  -  -59ร— -24ร— -24ร— -16ร— -2ร— -  -14ร— -12ร— -  -  -  -59ร— -22ร— -4ร— -4ร— -2ร— -  -  -2ร— -2ร— -3ร— -  -  -  -2ร— -  -4ร— -  -  -2ร— -2ร— -  -  -  -22ร— -31ร— -25ร— -20ร— -  -  -20ร— -  -  -  -16ร— -  -  -4ร— -4ร— -  -12ร— -  -  -  -  -6ร— -6ร— -6ร— -  -  -  -59ร— -  -32ร— -20ร— -20ร— -20ร— -  -  -  -  -  -65ร— -47ร— -  -  -47ร— -43ร— -4ร— -  -2ร— -2ร— -  -  -39ร— -39ร— -2ร— -2ร— -  -  -  -  -  -  -  -  -  -1ร— -4ร— -4ร— -6ร— -4ร— -4ร— -  -  -  -  -  -  -1ร— -113ร— -113ร— -308ร— -  -  -  -126ร— -126ร— -  -  -  -51ร— -28ร— -28ร— -  -  -75ร— -75ร— -2ร— -  -73ร— -  -  -  -  -  -126ร— -  -4ร— -4ร— -  -  -178ร— -8ร— -8ร— -8ร— -170ร— -2ร— -  -  -170ร— -170ร— -84ร— -84ร— -5ร— -  -79ร— -  -  -  -24ร— -24ร— -  -10ร— -10ร— -12ร— -  -10ร— -10ร— -  -45ร— -12ร— -  -45ร— -4ร— -4ร— -  -41ร— -88ร— -4ร— -  -  -  -  -41ร— -41ร— -  -  -86ร— -24ร— -  -  -  -  -  -62ร— -4ร— -58ร— -10ร— -48ร— -4ร— -44ร— -4ร— -40ร— -28ร— -28ร— -28ร— -28ร— -28ร— -12ร— -4ร— -  -8ร— -  -170ร— -  -  -  -  -  -  -  -  -  -1ร— -128ร— -  -  -  -  -  -  -  -65ร— -65ร— -57ร— -  -57ร— -  -  -  -1ร— -  -1ร— -  -1ร— -  -1ร— -  -1ร— -  -56ร— -56ร— -  -  -56ร— -56ร— -  -  -  -  -  -  -1ร— -247ร— -  -  -  -  -  -345ร— -345ร— -  -128ร— -128ร— -128ร— -  -70ร— -68ร— -68ร— -  -70ร— -  -147ร— -  -  -  -4ร— -4ร— -  -147ร— -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2ร— -  -  -  -  -2ร— -  -  -  -  -  -2ร— -2ร— -2ร— -2ร— -  -  -  -  -2ร— -  -  -  -  -2ร— -2ร— -229ร— -2ร— -  -  -  -  -  -  -  -2ร— -  -  -2ร— -  -  -  -  -  -  -1ร— -4ร— -  -  -  -1ร— -2ร— -  -  -  -1ร— -69ร— -  -  -  -  -  -  -  -102ร— -102ร— -  -  -  -73ร— -  -  -69ร— -  -  -  -1ร— -155ร— -  -  -  -  -1ร— -147ร— -  -  -  -  -  -  -  -1ร— -145ร— -145ร— -145ร— -  -  -  -  -  -  -  -  -145ร— -145ร— -145ร— -  -69ร— -  -  -  -  -  -  -69ร— -  -145ร— -  -  -  -1ร— -1ร— -1ร— -  -144ร— -144ร— -76ร— -  -  -68ร— -  -  -145ร— -  -  -  -1ร— -2ร— -2ร— -2ร— -1ร— -1ร— -1ร— -  -1ร— -1ร— -1ร— -  -2ร— -  -  -  -1ร— -79ร— -  -  -  -1ร— -7ร— -  -  -  -  -  -5ร— -  -5ร— -5ร— -  -  -  -  -  -1ร— -  -5ร— -3ร— -  -2ร— -1ร— -  -  -2ร— -  -  -  -  -1ร— -  -  -5ร— -  -  -  -  -1ร— -6ร— -6ร— -6ร— -  -  -  -  -1ร— -57ร— -57ร— -6ร— -6ร— -  -57ร— -  -  -  -1ร— -10ร— -10ร— -2ร— -8ร— -2ร— -6ร— -2ร— -  -4ร— -  -  -  -  -1ร— -12ร— -10ร— -10ร— -8ร— -  -  -  -  -  -1ร— -86ร— -  -  -  -1ร— -107ร— -  -  -  -  -1ร— -6ร— -6ร— -  -38ร— -  -  -16ร— -  -  -  -  -  -1ร— -65ร— -65ร— -44ร— -  -21ร— -19ร— -9ร— -9ร— -  -  -  -  -  -  -1ร— -170ร— -24ร— -  -  -  -  -1ร— -176ร— -176ร— -  -  -113ร— -113ร— -  -59ร— -59ร— -  -4ร— -4ร— -  -176ร— -  -  -  -1ร— -128ร— -  -  -  -  -  -  -2ร— -2ร— -2ร— -  -2ร— -2ร— -1ร— -  -1ร— -3ร— -3ร— -3ร— -  -  -  -2ร— -2ร— -2ร— -2ร— -2ร— -2ร— -  -  -  -1ร— -1ร— -  -1ร— -2ร— -  -  -  -  -2ร— -  -  -  -4ร— -1ร— -187ร— -1ร— -  -100ร— -  -  -  -  -  -  -  -  -2ร— -  -1ร— -  -  -1ร— -1ร— -2ร— -  -  -  -  -  -2ร— -  -1ร— -1ร— -  -85ร— -  -  -  -  -  -60ร— -  -  -  -  -  -  -  -  -2ร— -  -1ร— -  -  -1ร— -1ร— -109ร— -  -  -  -  -2ร— -25ร— -  -  -  -  -  -  -2ร— -  -  -2ร— -2ร— -  -  -2ร— -1ร— -228ร— -228ร— -  -  -  -  -2ร— -  -74ร— -  -  -5ร— -  -  -  -  -6ร— -  -  -  -  -2ร— -  -180ร— -  -  -  -  -  -  -432ร— -432ร— -223ร— -  -180ร— -  -109ร— -  -  -  -2ร— -  -90ร— -154ร— -154ร— -  -70ร— -70ร— -  -84ร— -84ร— -  -  -90ร— -  -  -94ร— -161ร— -  -94ร— -  -  -  -2ร— -2ร— -2ร— -2ร— -44ร— -  -  -2ร— -57ร— -  -  -  -2ร— -  -  -2ร— -  -  -2ร— -  -  -2ร— -  -  -2ร— -  -  -2ร— -  -  -  -2ร— -2ร— -2ร— -2ร— -  -232ร— -  -  -  -  -  -163ร— -  -232ร— -  -  -69ร— -  -  -  -  -  -  -  -  -2ร— -  -21ร— -15ร— -  -15ร— -  -21ร— -  -2ร— -  -18ร— -12ร— -  -14ร— -  -18ร— -  -  -1ร— -40ร— -40ร— -10ร— -10ร— -  -  -  -  -1ร— -36ร— -10ร— -  -26ร— -  -  -  -  -  -1ร— -46ร— -  -  -  -  -  -  -  -  -82ร— -  -8ร— -8ร— -6ร— -  -8ร— -8ร— -  -36ร— -36ร— -36ร— -36ร— -36ร— -36ร— -36ร— -36ร— -  -  -  -  -  -26ร— -26ร— -  -  -4ร— -  -  -10ร— -10ร— -  -36ร— -  -  -  -36ร— -6ร— -  -  -  -  -  -30ร— -  -  -  -  -  -36ร— -30ร— -  -36ร— -  -  -38ร— -  -  -  -  -  -38ร— -38ร— -  -  -46ร— -  -  -  -1ร— -32ร— -  -  -  -  -  -  -46ร— -46ร— -46ร— -  -  -  -  -  -  -32ร— -32ร— -  -  -  -  -  -  -  -  -1ร— -119ร— -119ร— -119ร— -119ร— -119ร— -119ร— -  -  -  -  -  -1ร— -128ร— -128ร— -128ร— -  -  -4ร— -4ร— -  -68ร— -68ร— -  -  -  -68ร— -  -  -56ร— -56ร— -56ร— -  -128ร— -  -  -  -  -107ร— -  -128ร— -  -  -  -  -  -1ร— -138ร— -  -  -  -  -  -  -130ร— -130ร— -  -  -  -  -  -  -138ร— -138ร— -  -  -  -1ร— -311ร— -347ร— -  -  -  -  -  -1ร— -170ร— -170ร— -170ร— -  -170ร— -138ร— -138ร— -138ร— -138ร— -137ร— -137ร— -  -32ร— -32ร— -32ร— -  -  -  -  -  -  -  -  -1ร— -67ร— -  -1ร— -67ร— -67ร— -  -  -67ร— -  -  -1ร— -103ร— -69ร— -69ร— -8ร— -  -69ร— -  -103ร— -  -  -67ร— -  -14ร— -14ร— -14ร— -10ร— -10ร— -10ร— -14ร— -10ร— -2ร— -2ร— -  -  -  -  -2ร— -  -8ร— -8ร— -  -  -14ร— -14ร— -  -  -14ร— -  -  -90ร— -90ร— -59ร— -59ร— -59ร— -  -90ร— -89ร— -  -  -  -  -1ร— -56ร— -56ร— -56ร— -56ร— -12ร— -12ร— -  -56ร— -29ร— -29ร— -  -56ร— -  -  -  -  -  -  -  -  -  -  -  -2ร— -  -  -  -  -2ร— -  -  -  -  -  -  -2ร— -  -  -  -  -  -  -1ร— -53ร— -  -  -  -  -53ร— -  -26ร— -26ร— -  -26ร— -  -27ร— -4ร— -4ร— -  -23ร— -  -  -  -  -  -  -  -  -  -  -  -2ร— -113ร— -113ร— -95ร— -95ร— -95ร— -95ร— -  -113ร— -  -  -2ร— -  -  -  -  -  -  -  -1ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -23ร— -42ร— -23ร— -38ร— -38ร— -38ร— -38ร— -38ร— -75ร— -75ร— -75ร— -75ร— -  -  -  -  -75ร— -  -38ร— -  -23ร— -  -  -  -1ร— -32ร— -  -  -  -  -  -  -  -  -  -1ร— -23ร— -  -  -  -  -  -  -  -  -23ร— -43ร— -43ร— -43ร— -43ร— -43ร— -43ร— -43ร— -33ร— -33ร— -33ร— -18ร— -  -  -10ร— -7ร— -7ร— -  -  -3ร— -3ร— -  -  -23ร— -2ร— -  -23ร— -2ร— -  -23ร— -  -  -  -1ร— -23ร— -  -  -  -  -  -  -23ร— -23ร— -23ร— -9ร— -9ร— -2ร— -2ร— -  -7ร— -7ร— -  -  -7ร— -  -9ร— -  -23ร— -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2ร—
var hyperHTML = (function (globalDocument, majinbuu) {'use strict';
- 
-  /*! (c) 2017 Andrea Giammarchi @WebReflection, (ISC) */
- 
-  // ---------------------------------------------
-  // hyperHTML Public API
-  // ---------------------------------------------
- 
-  // The document must be swap-able at runtime.
-  // Needed by both basicHTML and nativeHTML
-  hyper.document = globalDocument;
- 
-  // friendly destructuring
-  hyper.hyper = hyper;
- 
-  function hyper(HTML) {
-    return arguments.length < 2 ?
-      (HTML == null ?
-        wireContent('html') :
-        (typeof HTML === 'string' ?
-          wire(null, HTML) :
-          ('raw' in HTML ?
-            wireContent('html')(HTML) :
-            ('nodeType' in HTML ?
-              bind(HTML) :
-              wireWeakly(HTML, 'html')
-            )
-          )
-        )) :
-      ('raw' in HTML ?
-        wireContent('html') : wire
-      ).apply(null, arguments);
-  }
- 
-  // hyper.adopt(el) ๐Ÿฃ
-  // import an already live DOM structure
-  // described as TL
-  hyper.adopt = function adopt(node) {
-    return function () {
-      notAdopting = false;
-      render.apply(node, arguments);
-      notAdopting = true;
-      return node;
-    };
-  };
- 
-  // hyper.bind(el) โšก๏ธ
-  // render TL inside a DOM node used as context
-  hyper.bind = bind;
-  function bind(context) { return render.bind(context); }
- 
-  // hyper.define('transformer', callback) ๐ŸŒ€
-  hyper.define = function define(transformer, callback) {
-    if (!(transformer in transformers)) {
-      transformersKeys.push(transformer);
-    }
-    transformers[transformer] = callback;
-    // TODO: else throw ? console.warn ? who cares ?
-  };
- 
-  // hyper.escape('<html>') => '&lt;text&gt;' ๐Ÿƒ
-  hyper.escape = function escape(html) {
-    return html.replace(/[&<>'"]/g, fnEscape);
-  };
- 
-  // hyper.wire(obj, 'type:ID') โžฐ
-  // relate a renderer to a generic object
-  hyper.wire = wire;
-  function wire(obj, type) {
-    return arguments.length < 1 ?
-      wireContent('html') :
-      (obj == null ?
-        wireContent(type || 'html') :
-        wireWeakly(obj, type || 'html')
-      );
-  }
- 
-  // hyper.Component([initialState]) ๐Ÿป
-  // An overly-simplified Component class.
-  // For full Custom Elements support
-  // see HyperHTMLElement instead.
-  hyper.Component = Component;
-  function Component() {}
-  Object.defineProperties(
-    Component.prototype,
-    {
-      // same as HyperHTMLElement handleEvent
-      handleEvent: {value: function (e) {
-        // both IE < 11 and JSDOM lack dataset
-        var ct = e.currentTarget;
-        this[
-          ('getAttribute' in ct && ct.getAttribute('data-call')) ||
-          ('on' + e.type)
-        ](e);
-      }},
-      // returns its own HTML wire or create it once on comp.render()
-      html: lazyGetter('html', wireContent),
-      // returns its own SVG wire or create it once on comp.render()
-      svg: lazyGetter('svg', wireContent),
-      // same as HyperHTMLElement state
-      state: lazyGetter('state', function () { return this.defaultState; }),
-      // same as HyperHTMLElement get defaultState
-      defaultState: {get: function () { return {}; }},
-      // same as HyperHTMLElement setState
-      setState: {value: function (state) {
-        var target = this.state;
-        var source = typeof state === 'function' ? state.call(this, target) : state;
-        for (var key in source) target[key] = source[key];
-        this.render();
-      }}
-      // the render must be defined when extending hyper.Component
-      // the render **must** return either comp.html or comp.svg wire
-      // render() { return this.html`<p>that's it</p>`; }
-    }
-  );
- 
-  // - - - - - - - - - - - - - - - - - - - - - - -
- 
-  // ---------------------------------------------
-  // Constants
-  // ---------------------------------------------
- 
-  // Node.CONSTANTS
-  // without assuming Node is globally available
-  // since this project is used on the backend too
-  var ELEMENT_NODE = 1;
-  var ATTRIBUTE_NODE = 2;
-  var TEXT_NODE = 3;
-  var COMMENT_NODE = 8;
-  var DOCUMENT_FRAGMENT_NODE = 11;
- 
-  // SVG related
-  var OWNER_SVG_ELEMENT = 'ownerSVGElement';
-  var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
- 
-  var SHOULD_USE_ATTRIBUTE = /^style$/i;
-  var SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i;
-  var EXPANDO = '_hyper: ';
-  var UID = EXPANDO + ((Math.random() * new Date) | 0) + ';';
-  var UIDC = '<!--' + UID + '-->';
- 
-  // ---------------------------------------------
-  // DOM Manipulation
-  // ---------------------------------------------
- 
-  function Aura(node, childNodes) {
-    this.node = node;
-    this.childNodes = childNodes;
-    return majinbuu.aura(this, childNodes);
-  }
- 
-  Aura.prototype.splice = function splice(start) {
-    for (var
-      tmp,
-      ph = this.node,
-      cn = this.childNodes,
-      target = cn[start + (arguments[1] || 0)] || ph,
-      result = cn.splice.apply(cn, arguments),
-      pn = ph.parentNode,
-      i = 0,
-      length = result.length;
-      i < length; i++
-    ) {
-      tmp = result[i];
-      // TODO: this is not optimal (but necessary)
-      if (cn.indexOf(tmp) < 0) {
-        pn.removeChild(tmp);
-      }
-    }
-    i = 2;
-    length = arguments.length;
-    if (i < length) {
-      if ((length - i) === 1) {
-        tmp = arguments[i];
-      } else {
-        tmp = createDocumentFragment(pn.ownerDocument);
-        while (i < length) {
-          tmp.appendChild(arguments[i++]);
-        }
-      }
-      pn.insertBefore(tmp, target);
-    }
-    return result;
-  };
- 
-  // ---------------------------------------------
-  // hyperHTML Operations
-  // ---------------------------------------------
- 
-  // entry point for all TL => DOM operations
-  function render(template) {
-    var hyper = hypers.get(this);
-    if (
-      !hyper ||
-      hyper.template !== TL(template)
-    ) {
-      upgrade.apply(this, arguments);
-    } else {
-      update.apply(hyper.updates, arguments);
-    }
-    return this;
-  }
- 
-  // `<div class="${'attr'}"></div>`
-  // `<div onclick="${function () {... }}"></div>`
-  // `<div onclick="${{handleEvent(){ ... }}}"></div>`
-  // `<div contenteditable="${true}"></div>`
-  function setAttribute(attribute, removeAttributes, name) {
-    var
-      node = attribute.ownerElement,
-      isData = name === 'data',
-      isEvent = !isData && /^on/.test(name),
-      isSpecial = isData ||
-                  (isSpecialAttribute(node, name) &&
-                  !SHOULD_USE_ATTRIBUTE.test(name)),
-      type = isEvent ? name.slice(2) : '',
-      noOwner = isSpecial || isEvent,
-      wontUpgrade = isSpecial && (isData || name in node),
-      oldValue, specialAttr, upgrade
-    ;
-    if (isEvent || wontUpgrade) {
-      removeAttributes.push(node, name);
-      if (isEvent) {
-        if (type === CONNECTED || type === DISCONNECTED) {
-          components.add(node);
-        }
-        else if (name.toLowerCase() in node) {
-          type = type.toLowerCase();
-        }
-      }
-    }
-    if (isSpecial) {
-      if (!wontUpgrade) {
-        upgrade = toBeUpgraded.get(node);
-        if (!upgrade) {
-          upgrade = {
-            _: Object.create(null),
-            $: function () {
-              toBeUpgraded.delete(node);
-              for (var name in this._) {
-                this._[name].$();
-              }
-            }
-          };
-          toBeUpgraded.set(node, upgrade);
-        }
-        upgrade._[name] = {
-          _: null,
-          $: function () {
-            wontUpgrade = true;
-            specialAttr(this._);
-          }
-        };
-      }
-      specialAttr = function specialAttr(newValue) {
-        if (wontUpgrade) {
-          if (oldValue !== newValue) {
-            oldValue = newValue;
-            // WebKit moves the cursor if input.value
-            // is set again, even if same value
-            if (node[name] !== newValue) {
-              // let the browser handle the case
-              // input.value = null;
-              // input.value; // ''
-              if (newValue == null) {
-                // reflect the null intent,
-                // do not pass undefined!
-                node[name] = null;
-                node.removeAttribute(name);
-              } else {
-                node[name] = newValue;
-              }
-            }
-          }
-        } else {
-          attribute.value = newValue;
-          upgrade._[name]._ = newValue;
-          if (name in node) upgrade.$();
-        }
-      };
-    }
-    return isEvent ?
-      function eventAttr(newValue) {
-        if (oldValue !== newValue) {
-          if (oldValue) node.removeEventListener(type, oldValue, false);
-          oldValue = newValue;
-          if (newValue) node.addEventListener(type, newValue, false);
-        }
-      } :
-      (isSpecial ?
-        specialAttr :
-        function normalAttr(newValue) {
-          if (oldValue !== newValue) {
-            oldValue = newValue;
-            // avoid triggering again attributeChangeCallback
-            // if the value was identical
-            if (attribute.value !== newValue) {
-              if (newValue == null) {
-                if (!noOwner) {
-                  // TODO: should attribute.value = null here?
-                  noOwner = true;
-                  node.removeAttributeNode(attribute);
-                }
-              } else {
-                attribute.value = newValue;
-                if (noOwner) {
-                  noOwner = false;
-                  node.setAttributeNode(attribute);
-                }
-              }
-            }
-          }
-        }
-      );
-  }
- 
-  // `<style>${'text'}</style>`
-  function setTextContent(node) {
-    var oldValue;
-    return function (value) {
-      if (value !== oldValue) {
-        oldValue = value;
-        node.textContent = value;
-      }
-    };
-  }
- 
-  // `<p>${'any'}</p>`
-  // `<li>a</li>${'virtual'}<li>c</li>`
-  function setAnyContent(node, childNodes, aura) {
-    var oldValue;
-    return function anyContent(value) {
-      switch (typeof value) {
-        case 'string':
-        case 'number':
-        case 'boolean':
-          var length = childNodes.length;
-          if (
-            length === 1 &&
-            childNodes[0].nodeType === TEXT_NODE
-          ) {
-            if (oldValue !== value) {
-              oldValue = value;
-              childNodes[0].textContent = value;
-            }
-          } else {
-            oldValue = value;
-            if (length) {
-              aura.splice(0, length, createText(node, value));
-            } else {
-              childNodes[0] = node.parentNode.insertBefore(
-                createText(node, value),
-                node
-              );
-            }
-          }
-          break;
-        case 'function':
-          anyContent(value(node.parentNode, childNodes, 0));
-          break;
-        case 'object':
-        case 'undefined':
-          if (value == null) {
-            oldValue = value;
-            anyContent('');
-            break;
-          } else if (value instanceof Component) {
-            value = value.render();
-          }
-        default:
-          oldValue = value;
-          if (isArray(value)) {
-            var length = value.length;
-            if (length === 0) {
-              aura.splice(0);
-            } else {
-              switch (typeof value[0]) {
-                case 'string':
-                case 'number':
-                case 'boolean':
-                  anyContent({html: value});
-                  break;
-                case 'function':
-                  var parentNode = node.parentNode;
-                  for (var i = 0; i < length; i++) {
-                    value[i] = value[i](parentNode, childNodes, i);
-                  }
-                  anyContent(value.concat.apply([], value));
-                  break;
-                case 'object':
-                  if (isArray(value[0])) {
-                    value = value.concat.apply([], value);
-                  }
-                  if (isPromise_ish(value[0])) {
-                    Promise.all(value).then(anyContent);
-                    break;
-                  } else {
-                    for (var i = 0, length = value.length; i < length; i++) {
-                      if (value[i] instanceof Component) {
-                        value[i] = value[i].render();
-                      }
-                    }
-                  }
-                default:
-                  optimist(aura, value);
-                  break;
-              }
-            }
-          } else if (isNode_ish(value)) {
-            optimist(
-              aura,
-              value.nodeType === DOCUMENT_FRAGMENT_NODE ?
-                slice.call(value.childNodes) :
-                [value]
-            );
-          } else if (isPromise_ish(value)) {
-            value.then(anyContent);
-          } else if ('placeholder' in value) {
-            invokeAtDistance(value, anyContent);
-          } else if ('text' in value) {
-            anyContent(String(value.text));
-          } else if ('any' in value) {
-            anyContent(value.any);
-          } else if ('html' in value) {
-            var html = [].concat(value.html).join('');
-            aura.splice(0);
-            var fragment = createFragment(node, html);
-            childNodes.push.apply(childNodes, fragment.childNodes);
-            node.parentNode.insertBefore(fragment, node);
-          } else if ('length' in value) {
-            anyContent(slice.call(value));
-          } else {
-            anyContent(invokeTransformer(value, anyContent));
-          }
-          break;
-      }
-    };
-  }
- 
-  // ---------------------------------------------
-  // DOM Traversing
-  // ---------------------------------------------
- 
-  // look for attributes that contains the comment text
-  function attributesSeeker(node, paths, parts) {
-    for (var
-      name, realName, attrs,
-      attribute,
-      cache = Object.create(null),
-      attributes = node.attributes,
-      i = 0, length = attributes.length;
-      i < length; i++
-    ) {
-      attribute = attributes[i];
-      if (attribute.value === UID) {
-        name = attribute.name;
-        // this is an IE < 11 thing only
-        if (name in cache) {
-          // attributes with unrecognized values
-          // are duplicated, even if same attribute, across the node
-          // to fix it, you need to remove it
-          node.removeAttributeNode(attribute);
-          // put a value that won't (hopefully) bother IE
-          cache[name].value = '';
-          // and place the node back
-          node.setAttributeNode(cache[name]);
-          // this will decrease attributes count by 1
-          length--;
-          // so the loop should be decreased by 1 too
-          i--;
-        } else {
-          realName = parts.shift().replace(/^(?:|[\S\s]*?\s)(\S+?)=['"]?$/, '$1');
-          attrs = node.attributes;
-          // fallback is needed in both jsdom
-          // and in not-so-standard browsers/engines
-          cache[name] = attrs[realName] || attrs[realName.toLowerCase()];
-          paths.push(Path('attr', cache[name], realName));
-        }
-      }
-    }
-  }
- 
-  // walk the fragment tree in search of comments
-  function hyperSeeker(node, paths, parts) {
-    for (var
-      child,
-      childNodes = node.childNodes,
-      length = childNodes.length,
-      i = 0; i < length; i++
-    ) {
-      child = childNodes[i];
-      switch (child.nodeType) {
-        case ELEMENT_NODE:
-          attributesSeeker(child, paths, parts);
-          hyperSeeker(child, paths, parts);
-          break;
-        case COMMENT_NODE:
-          if (child.textContent === UID) {
-            parts.shift();
-            paths.push(Path('any', child));
-          }
-          break;
-        case TEXT_NODE:
-          if (
-            SHOULD_USE_TEXT_CONTENT.test(node.nodeName) &&
-            trim.call(child.textContent) === UIDC
-          ) {
-            parts.shift();
-            paths.push(Path('text', node));
-          }
-          break;
-      }
-    }
-  }
- 
-  // ---------------------------------------------
-  // Features detection / ugly UA sniffs
-  // ---------------------------------------------
-  /*
-  var importNode = 'importNode' in globalDocument ?
-    function (doc, node) {
-      return doc.importNode(node, true);
-    } :
-    function (doc, node) {
-      return node;
-    };
-  */
- 
-  var featureFragment = createDocumentFragment(globalDocument);
- 
-  // Firefox < 55 has non standard template literals.
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1108941
-  // TODO: is there any better way to feature detect this ?
-  var FF = typeof navigator === 'object' &&
-            /Firefox\/(\d+)/.test(navigator.userAgent) &&
-            parseFloat(RegExp.$1) < 55;
- 
-  // If attributes order is shuffled, threat the browser differently
-  // Usually this is a well known IE only limitation but some older FF does the same.
-  var IE =  (function () {
-              var p  = globalDocument.createElement('p');
-              p.innerHTML = '<i data-i="" class=""></i>';
-              return /class/i.test(p.firstChild.attributes[0].name);
-            }());
- 
- 
-  // beside IE, old WebKit browsers don't have `children` in DocumentFragment
-  var WK = !('children' in featureFragment);
- 
-  // both Firefox < 55 and TypeScript have issues with template literals
-  // this lazy defined callback should spot issues right away
-  // and in the best case scenario become a no-op
-  var TL = function (template) {
-    if (template.propertyIsEnumerable('raw') || FF) TL = unique;
-    else TL = function (t) { return t; };
-    return TL(template);
-  };
- 
-  // ---------------------------------------------
-  // Helpers
-  // ---------------------------------------------
- 
-  // used to convert childNodes to Array
-  var slice = [].slice;
- 
-  // used to sanitize html
-  var oEscape = {
-    '&': '&amp;',
-    '<': '&lt;',
-    '>': '&gt;',
-    "'": '&#39;',
-    '"': '&quot;'
-  };
-  function fnEscape(m) {
-    return oEscape[m];
-  }
- 
-  // return content as html
-  function asHTML(html) {
-    return {html: html};
-  }
- 
-  // return a single node or an Array or nodes
-  function createContent(node) {
-    for (var
-      child,
-      content = [],
-      childNodes = node.childNodes,
-      i = 0,
-      length = childNodes.length;
-      i < length; i++
-    ) {
-      child = childNodes[i];
-      if (
-        child.nodeType === ELEMENT_NODE ||
-        trim.call(child.textContent).length !== 0
-      ) {
-        content.push(child);
-      }
-    }
-    return content.length === 1 ? content[0] : content;
-  }
- 
-  // just a minifier friendly indirection
-  function createDocumentFragment(document) {
-    return document.createDocumentFragment();
-  }
- 
-  // given a node, inject some html and return
-  // the resulting template document fragment
-  function createFragment(node, html) {
-    return (
-      OWNER_SVG_ELEMENT in node ?
-        createSVGFragment :
-        createHTMLFragment
-    )(node, html.replace(no, comments));
-  }
- 
-  // create fragment for HTML
-  function createHTMLFragment(node, html) {
-    var fragment;
-    var document = node.ownerDocument;
-    var container = document.createElement(
-      // TODO: this is a work around for A-Frame V0 based components
-      //       see: https://stackoverflow.com/questions/46797635/aframe-content-not-rendering-on-chrome-with-hyperhtml/46817370
-      // TODO: the following RegExp breaks: https://github.com/WebReflection/hyperHTML/issues/135
-      // /<([a-z][a-z0-9]*(?:-[a-z0-9]+)+)[\s\S]*?>[\s\S]*?<\/\1>/i.test(html) ?
-      /<(a-\w+)[\s\S]*?>[\s\S]*?<\/\1>/.test(html) ?
-      'div' : 'template'
-    );
-    // var container = document.createElement('template');
-    var hasContent = 'content' in container;
-    var needsTableWrap = false;
-    if (!hasContent) {
-      // DO NOT MOVE THE FOLLOWING LINE ELSEWHERE
-      fragment = createDocumentFragment(document);
-      // (a jsdom + nodejs tests coverage gotcha)
- 
-      // el.innerHTML = '<td></td>'; is not possible
-      // if the content is a partial internal table content
-      // it needs to be wrapped around once injected.
-      // HTMLTemplateElement does not suffer this issue.
-      needsTableWrap = /^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html);
-    }
-    if (needsTableWrap) {
-      // secure the RegExp.$1 result ASAP to avoid issues
-      // in case a non-browser DOM library uses RegExp internally
-      // when HTML content is injected (basicHTML / jsdom / others...)
-      var selector = RegExp.$1;
-      container.innerHTML = '<table>' + html + '</table>';
-      appendNodes(fragment, slice.call(container.querySelectorAll(selector)));
-    } else {
-      container.innerHTML = html;
-      if (hasContent) {
-        fragment = container.content;
-        // fragment = importNode(document, container.content);
-      } else {
-        appendNodes(fragment, slice.call(container.childNodes));
-      }
-    }
-    return fragment;
-  }
- 
-  // create a fragment for SVG
-  function createSVGFragment(node, html) {
-    var document = node.ownerDocument;
-    var fragment = createDocumentFragment(document);
-    if (IE || WK) {
-      var container = document.createElement('div');
-      container.innerHTML = '<svg xmlns="' + SVG_NAMESPACE + '">' + html + '</svg>';
-      appendNodes(fragment, slice.call(container.firstChild.childNodes));
-    } else {
-      var container = document.createElementNS(SVG_NAMESPACE, 'svg');
-      container.innerHTML = html;
-      appendNodes(fragment, slice.call(container.childNodes));
-    }
-    return fragment;
-  }
- 
-  // given a node, it does what is says
-  function createText(node, text) {
-    return node.ownerDocument.createTextNode(text);
-  }
- 
-  // dispatch same event through a list of nodes
-  function dispatchAll(nodes, type) {
-    for (var
-      e, node,
-      isConnected = type === CONNECTED,
-      i = 0, length = nodes.length;
-      i < length; i++
-    ) {
-      node = nodes[i];
-      /* istanbul ignore else */
-      Eif (node.nodeType === ELEMENT_NODE) {
-        e = dispatchTarget(node, isConnected, type, e);
-      }
-    }
-  }
- 
-  // per each inserted element, check initialization
-  function dispatchTarget(node, isConnected, type, e) {
-    /* istanbul ignore next */
-    if (components.has(node)) {
-      node.dispatchEvent(e || (e = new $Event(type)));
-    }
-    else Iif (isConnected && toBeUpgraded.has(node)) {
-      toBeUpgraded.get(node).$();
-    }
-    else {
-      for (var
-        nodes = getChildren(node),
-        i = 0, length = nodes.length;
-        i < length; i++
-      ) {
-        e = dispatchTarget(nodes[i], isConnected, type, e);
-      }
-    }
-    return e;
-  }
- 
-  // returns current customElements reference
-  // compatible with basicHTML too
-  function getCEClass(node) {
-    var doc = hyper.document;
-    var ce = doc.customElements || doc.defaultView.customElements;
-    return ce && ce.get(node.nodeName.toLowerCase());
-  }
- 
-  // verify that an attribute has
-  // a special meaning for the node
-  function isSpecialAttribute(node, name) {
-    var notSVG = !(OWNER_SVG_ELEMENT in node);
-    if (notSVG && /-/.test(node.nodeName)) {
-      var Class = getCEClass(node);
-      if (Class) node = Class.prototype;
-    }
-    return notSVG && name in node;
-  }
- 
-  // use a placeholder and resolve with the right callback
-  function invokeAtDistance(value, callback) {
-    callback(value.placeholder);
-    if ('text' in value) {
-      Promise.resolve(value.text).then(String).then(callback);
-    } else if ('any' in value) {
-      Promise.resolve(value.any).then(callback);
-    } else if ('html' in value) {
-      Promise.resolve(value.html).then(asHTML).then(callback);
-    } else {
-      Promise.resolve(invokeTransformer(value, callback)).then(callback);
-    }
-  }
- 
-  // last attempt to transform content
-  function invokeTransformer(object, callback) {
-    for (var key, i = 0, length = transformersKeys.length; i < length; i++) {
-      key = transformersKeys[i];
-      if (object.hasOwnProperty(key)) {
-        return transformers[key](object[key], callback);
-      }
-    }
-  }
- 
-  // quick and dirty Node check
-  function isNode_ish(value) {
-    return 'ELEMENT_NODE' in value;
-  }
- 
-  // quick and dirty Promise check
-  function isPromise_ish(value) {
-    return value != null && 'then' in value;
-  }
- 
-  // return a descriptor that lazily initialize a property
-  // unless it hasn't be previously set directly
-  function lazyGetter(type, fn) {
-    var secret = '_' + type + '$';
-    return {
-      get: function () {
-        return this[secret] || (this[type] = fn.call(this, type));
-      },
-      set: function (value) {
-        defineProperty(this, secret, {configurable: true, value: value});
-      }
-    };
-  }
- 
-  // uses majinbuu only if the two lists are different
-  function optimist(aura, value) {
-    var i = 0, length = aura.length;
-    if (value.length !== length) {
-      majinbuu(aura, value, hyper.MAX_LIST_SIZE);
-    } else {
-      for (; i < length--; i++) {
-        if (aura[length] !== value[length] || aura[i] !== value[i]) {
-          majinbuu(aura, value, hyper.MAX_LIST_SIZE);
-          return;
-        }
-      }
-    }
-  }
- 
-  // remove a list of [node, attribute]
-  function removeAttributeList(list) {
-    for (var i = 0, length = list.length; i < length; i++) {
-      list[i++].removeAttribute(list[i]);
-    }
-  }
- 
-  // specify the content to update
-  function setContent(info, target, removeAttributes, childNodes) {
-    var update;
-    switch (info.type) {
-      case 'any':
-        // TODO: don't pass the target, it shouldn't be needed
-        update = setAnyContent(target, childNodes, new Aura(target, childNodes));
-        break;
-      case 'attr':
-        update = setAttribute(target, removeAttributes, info.name);
-        break;
-      case 'text':
-        update = setTextContent(target);
-        break;
-    }
-    return update;
-  }
- 
-  // used for common path creation.
-  function Path(type, node, name) {
-    return {type: type, path: createPath(node), name: name};
-  }
- 
-  // ---------------------------------------------
-  // Hybrid Shims
-  // ---------------------------------------------
- 
-  var CONNECTED = 'connected';
-  var DISCONNECTED = 'dis' + CONNECTED;
-  var $Event;
- 
-  try {
-    new Event(CONNECTED);
-    $Event = Event;
-  } catch(o_O) {
-    $Event = function (type) {
-      var e = hyper.document.createEvent('Event');
-      e.initEvent(type, false, false);
-      return e;
-    };
-  }
- 
-  try {
-    (new MutationObserver(function (records) {
-      for (var record, i = 0, length = records.length; i < length; i++) {
-        record = records[i];
-        dispatchAll(record.removedNodes, DISCONNECTED);
-        dispatchAll(record.addedNodes, CONNECTED);
-      }
-    })).observe(globalDocument, {subtree: true, childList: true});
-  } catch(o_O) {
-    globalDocument.addEventListener('DOMNodeInserted', function (e) {
-      dispatchAll([e.target], CONNECTED);
-    }, false);
-    globalDocument.addEventListener('DOMNodeRemoved', function (e) {
-      dispatchAll([e.target], DISCONNECTED);
-    }, false);
-  }
- 
-  // WeakMap with partial UID fallback
-  var $WeakMap = typeof WeakMap === typeof $WeakMap ?
-      function () {
-        // NOT A POLYFILL: simplified ad-hoc for this library cases
-        /* istanbul ignore next */
-        return {
-          delete: function (obj) { delete obj[UID]; },
-          get: function (obj) { return obj[UID]; },
-          has: function (obj) { return UID in obj; },
-          set: function (obj, value) {
-            Object.defineProperty(obj, UID, {
-              configurable: true,
-              value: value
-            });
-          }
-        };
-      } :
-      WeakMap;
- 
-  var $WeakSet = typeof WeakSet === typeof $WeakSet ?
-      function () {
-        var wm = new $WeakMap;
-        // NOT A POLYFILL: simplified ad-hoc for this library cases
-        /* istanbul ignore next */
-        return {
-          add: function (obj) { wm.set(obj, true); },
-          has: function (obj) { return wm.get(obj) === true; }
-        };
-      } :
-      WeakSet;
- 
-  // Map with partial double Array fallback
-  var $Map = typeof Map === typeof $Map ?
-      function () {
-        var k = [], v = [];
-        return {
-          get: function (obj) {
-            return v[k.indexOf(obj)];
-          },
-          // being used with unique template literals
-          // there is never a case when a value is overwritten
-          // no need to check upfront for the indexOf
-          set: function (obj, value) {
-            v[k.push(obj) - 1] = value;
-          }
-        };
-      } :
-      Map;
- 
-  // TODO: which browser needs these partial polyfills here?
- 
-  // BB7 and webOS need this
-  var isArray = Array.isArray ||
-                (function () {
-                  var toString = {}.toString;
-                  // I once had an engine returning [array Array]
-                  // and I've got scared since!
-                  var s = toString.call([]);
-                  return function (a) {
-                    return toString.call(a) === s;
-                  };
-                }());
- 
-  // older WebKit need this
-  var trim = EXPANDO.trim ||
-              function () { return this.replace(/^\s+|\s+$/g, ''); };
- 
-  // ---------------------------------------------
-  // Shared variables
-  // ---------------------------------------------
- 
-  // recycled defineProperty shortcut
-  var defineProperty = Object.defineProperty;
- 
-  // transformers registry
-  var transformers = {};
-  var transformersKeys = [];
- 
-  // normalize Firefox issue with template literals
-  var templateObjects = {}, unique;
-  function unique(template) {
-    var key = '_' + template.join(UIDC);
-    return templateObjects[key] ||
-          (templateObjects[key] = template);
-  }
- 
-  // use native .append(...childNodes) where available
-  var appendNodes = 'append' in featureFragment ?
-      function (node, childNodes) {
-        node.append.apply(node, childNodes);
-      } :
-      function appendNodes(node, childNodes) {
-        for (var
-          i = 0,
-          length = childNodes.length;
-          i < length; i++
-        ) {
-          node.appendChild(childNodes[i]);
-        }
-      };
- 
-  // returns children or retrieve them in IE/Edge
-  var getChildren = WK || IE ?
-      function (node) {
-        for (var
-          child,
-          children = [],
-          childNodes = node.childNodes,
-          j = 0, i = 0, length = childNodes.length;
-          i < length; i++
-        ) {
-          child = childNodes[i];
-          if (child.nodeType === ELEMENT_NODE)
-            children[j++] = child;
-        }
-        return children;
-      } :
-      function (node) { return node.children; };
- 
-  // return the correct node walking through a path
-  // fixes IE/Edge issues with attributes and children (fixes old WebKit too)
-  var getNode = IE || WK ?
-      function (parentNode, path) {
-        for (var name, i = 0, length = path.length; i < length; i++) {
-          name = path[i++];
-          switch (name) {
-            case 'children':
-              parentNode = getChildren(parentNode)[path[i]];
-              break;
-            default:
-              parentNode = parentNode[name][path[i]];
-              break;
-          }
-        }
-        return parentNode;
-      } :
-      function (parentNode, path) {
-        for (var i = 0, length = path.length; i < length; i++) {
-          parentNode = parentNode[path[i++]][path[i]];
-        }
-        return parentNode;
-      };
- 
-  // sanitizes interpolations as comments
-  var attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+';
-  var no = new RegExp('(<[a-z]+[a-z0-9:_-]*)((?:' + attrName + '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*\/?>)', 'gi');
-  var findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi');
-  var comments = function ($0, $1, $2, $3) {
-    return $1 + $2.replace(findAttributes, replaceAttributes) + $3;
-  };
- 
-  var replaceAttributes = function ($0, $1, $2) {
-    return $1 + ($2 || '"') + UID + ($2 || '"');
-  };
- 
-  // list of components with connected/disconnected
-  var components = new $WeakSet;
- 
-  // [element] = {template, updates};
-  var hypers = new $WeakMap;
- 
-  // [element] = {template, updates};
-  var wires = new $WeakMap;
- 
-  // [template] = {fragment, paths};
-  var templates = new $Map;
- 
-  // [node] = onupgrade
-  var toBeUpgraded = new $WeakMap;
- 
-  // internal signal to switch adoption
-  var notAdopting = true;
- 
-  // IE 11 has problems with cloning templates too
-  // it "forgets" empty childNodes
-  var cloneNode = (function () {
-    featureFragment.appendChild(createText(featureFragment, 'g'));
-    featureFragment.appendChild(createText(featureFragment, ''));
-    return featureFragment.cloneNode(true).childNodes.length === 1 ?
-      function (node) {
-        for (var
-          clone = node.cloneNode(),
-          childNodes = node.childNodes || [],
-          i = 0, length = childNodes.length;
-          i < length; i++
-        ) {
-          clone.appendChild(cloneNode(childNodes[i]));
-        }
-        return clone;
-      } :
-      function (fragment) {
-        return fragment.cloneNode(true);
-      };
-  }());
- 
-  // ---------------------------------------------
-  // Adopting Nodes
-  // ---------------------------------------------
- 
-  // IE/Edge gotcha with comment nodes
-  var nextElementSibling = IE ?
-    function (node) {
-      while (node = node.nextSibling) {
-        if (node.nodeType === ELEMENT_NODE) return node;
-      }
-      return undefined;
-    } :
-    function (node) { return node.nextElementSibling; };
- 
-  var previousElementSibling = IE ?
-    function (node) {
-      while (node = node.previousSibling) {
-       if (node.nodeType === ELEMENT_NODE) return node;
-      }
-      return undefined;
-    } :
-    function (node) { return node.previousElementSibling; };
- 
-  // remove all text nodes from a virtual space
-  function removePreviousText(parentNode, node) {
-    var previousSibling = node.previousSibling;
-    if (previousSibling && previousSibling.nodeType === TEXT_NODE) {
-      parentNode.removeChild(previousSibling);
-      removePreviousText(parentNode, node);
-    }
-  }
- 
-  // avoid errors on obsolete platforms
-  function insertBefore(parentNode, target, after) {
-    if (after) {
-      parentNode.insertBefore(target, after);
-    } else {
-      parentNode.appendChild(target);
-    }
-  }
- 
-  // given an info, tries to find out the best option
-  // to replace or update the content
-  function discoverNode(parentNode, virtual, info, childNodes) {
-    for (var
-      target = parentNode,
-      document = parentNode.ownerDocument,
-      path = info.path,
-      virtualNode = getNode(virtual, path),
-      i = 0,
-      length = path.length;
-      i < length; i++
-    ) {
-      switch (path[i++]) {
-        case 'attributes':
-          var name = virtualNode.name;
-          if (!parentNode.hasAttribute(name)) {
-            parentNode.setAttribute(name, '');
-          }
-          target = parentNode.attributes[name];
-          break;
-        case 'childNodes':
-          var children = getChildren(parentNode);
-          var virtualChildren = getChildren(virtualNode.parentNode);
-          target = previousElementSibling(virtualNode);
-          var before = target ? (path.indexOf.call(virtualChildren, target) + 1) : -1;
-          target = nextElementSibling(virtualNode);
-          var after = target ? path.indexOf.call(virtualChildren, target) : -1;
-          target = document.createComment(UID);
-          switch (true) {
-            // `${'virtual'}` is actually resolved as `${'any'}`
-            // case before < 0 && after < 0: before = 0;
- 
-            // `</a>${'virtual'}`
-            case after < 0:
-              after = children.length;
-              break;
-            // `${'virtual'}<b>`
-            case before < 0:
-              before = 0;
-            // `</a>${'virtual'}<b>`
-            default:
-              after = -(virtualChildren.length - after);
-              break;
-          }
-          childNodes.push.apply(
-            childNodes,
-            slice.call(children, before, after)
-          );
-          if (childNodes.length) {
-            insertBefore(
-              parentNode,
-              target,
-              nextElementSibling(childNodes[childNodes.length - 1])
-            );
-          } else {
-            insertBefore(
-              parentNode,
-              target,
-              slice.call(children, after)[0]
-            );
-          }
-          if (childNodes.length === 0) {
-            removePreviousText(parentNode, target);
-          }
-          break;
-        default:
-          // if the node is not there, create it
-          target = getChildren(parentNode)[path[i]] ||
-                    parentNode.appendChild(
-                      parentNode.ownerDocument.createElement(
-                        getNode(virtual, path.slice(0, i + 1)).nodeName
-                      )
-                    );
-          parentNode = target;
-          break;
-      }
-    }
-    return target;
-  }
- 
-  // like createUpdates but for nodes with already a content
-  function discoverUpdates(fragment, paths) {
-    for (var
-      info, childNodes,
-      updates = [],
-      removeAttributes = [],
-      i = 0, length = paths.length;
-      i < length; i++
-    ) {
-      childNodes = [];
-      info = paths[i];
-      updates[i] = setContent(
-        info,
-        discoverNode(this, fragment, info, childNodes),
-        removeAttributes,
-        childNodes
-      );
-    }
-    removeAttributeList(removeAttributes);
-    return updates;
-  }
- 
-  // ---------------------------------------------
-  // Template related utilities
-  // ---------------------------------------------
- 
-  // given a unique template object
-  // create, parse, and store retrieved info
-  function createTemplate(template) {
-    var paths = [];
-    var fragment = createFragment(this, template.join(UIDC));
-    var info = {fragment: fragment, paths: paths};
-    hyperSeeker(fragment, paths, template.slice());
-    templates.set(template, info);
-    return info;
-  }
- 
-  // given a generic node, returns a path capable
-  // of retrieving such path back again.
-  // TODO: worth passing the index when available ?
-  function createPath(node) {
-    var path = [];
-    var parentNode;
-    switch(node.nodeType) {
-      case ELEMENT_NODE:
-      case DOCUMENT_FRAGMENT_NODE:
-        parentNode = node;
-        break;
-      case COMMENT_NODE:
-        parentNode = node.parentNode;
-        path.unshift(
-          'childNodes',
-          path.indexOf.call(parentNode.childNodes, node)
-        );
-        break;
-      case ATTRIBUTE_NODE:
-      default: // jsdom here does not provide a nodeType 2 ...
-        parentNode = node.ownerElement;
-        path.unshift('attributes', node.name);
-        break;
-    }
-    for (
-      node = parentNode;
-      parentNode = parentNode.parentNode;
-      node = parentNode
-    ) {
-      path.unshift('children', path.indexOf.call(getChildren(parentNode), node));
-    }
-    return path;
-  }
- 
-  // given a root node and a list of paths
-  // creates an array of updates to invoke
-  // whenever the next interpolation happens
-  function createUpdates(fragment, paths) {
-    for (var
-      info,
-      updates = [],
-      removeAttributes = [],
-      i = 0, length = paths.length;
-      i < length; i++
-    ) {
-      info = paths[i];
-      updates[i] = setContent(
-        info,
-        getNode(fragment, info.path),
-        removeAttributes,
-        []
-      );
-    }
-    removeAttributeList(removeAttributes);
-    return updates;
-  }
- 
-  // invokes each update function passing interpolated value
-  function update() {
-    for (var i = 1, length = arguments.length; i < length; i++) {
-      this[i - 1](arguments[i]);
-    }
-  }
- 
-  // create a template, if unknown
-  // upgrade a node to use such template for future updates
-  function upgrade(template) {
-    template = TL(template);
-    var updates;
-    var info =  templates.get(template) ||
-                createTemplate.call(this, template);
-    if (notAdopting) {
-      var fragment = cloneNode(info.fragment);
-      updates = createUpdates.call(this, fragment, info.paths);
-      hypers.set(this, {template: template, updates: updates});
-      update.apply(updates, arguments);
-      this.textContent = '';
-      this.appendChild(fragment);
-    } else {
-      updates = discoverUpdates.call(this, info.fragment, info.paths);
-      hypers.set(this, {template: template, updates: updates});
-      update.apply(updates, arguments);
-    }
-  }
- 
-  // ---------------------------------------------
-  // Wires
-  // ---------------------------------------------
- 
-  // create a new wire for generic DOM content
-  function wireContent(type) {
-    var adopter, content, container, fragment, render, setup, template;
- 
-    function before(document) {
-      fragment = createDocumentFragment(document);
-      container = type === 'svg' ?
-        document.createElementNS(SVG_NAMESPACE, 'svg') :
-        fragment;
-      render = bind(container);
-    }
- 
-    function after() {
-      if (setup) {
-        setup = false;
-        if (type === 'svg') {
-          appendNodes(fragment, slice.call(container.childNodes));
-        }
-        content = createContent(fragment);
-      }
-      return content;
-    }
- 
-    return type === 'adopt' ?
-      function adopt(statics) {
-        var args = arguments;
-        statics = TL(statics);
-        if (template !== statics) {
-          setup = true;
-          template = statics;
-          adopter = function (parentNode, children, i) {
-            if (setup) {
-              if (i < children.length) {
-                container = children[i];
-                fragment = {
-                  ownerDocument: container.ownerDocument,
-                  childNodes: [container],
-                  children: [container]
-                };
-                render = hyper.adopt(fragment);
-              } else {
-                if (OWNER_SVG_ELEMENT in parentNode) type = 'svg';
-                before(parentNode.ownerDocument);
-              }
-            }
-            render.apply(null, args);
-            return after();
-          };
-        }
-        return adopter;
-      } :
-      function update(statics) {
-        statics = TL(statics);
-        if (template !== statics) {
-          setup = true;
-          template = statics;
-          before(hyper.document);
-        }
-        render.apply(null, arguments);
-        return after();
-      };
-  }
- 
-  // setup a weak reference if needed and return a wire by ID
-  function wireWeakly(obj, type) {
-    var wire = wires.get(obj);
-    var i = type.indexOf(':');
-    var id = type;
-    if (-1 < i) {
-      id = type.slice(i + 1);
-      type = type.slice(0, i) || 'html';
-    }
-    if (!wire) {
-      wire = {};
-      wires.set(obj, wire);
-    }
-    return wire[id] || (wire[id] = wireContent(type));
-  }
- 
-  // avoid processing too many nodes
-  // this is about the algorithm used
-  // to calculate the least amount of DOM
-  // changes needed to show the a new list
-  // where there was another one.
-  // There is a limit, in terms of performance,
-  // on how big can the optimal computation be,
-  // so if you change this value be sure your
-  // target hardware is good enough.
-  hyper.MAX_LIST_SIZE = 1000;
- 
-  // ---------------------------------------------
-  // โšก๏ธ ๏ธ๏ธThe End โžฐ
-  // ---------------------------------------------
-  return hyper;
- 
-}(document, function () {'use strict';
- 
-  /*! Copyright (c) 2017, Andrea Giammarchi, @WebReflection */
- 
-  // grid operations
-  var
-    DELETE = 'del',
-    INSERT = 'ins',
-    SUBSTITUTE = 'sub',
-    TypedArray = /^u/.test(typeof Int32Array) ? Array : Int32Array
-  ;
- 
-  function majinbuu(from, to, MAX_SIZE) {
-    var
-      fromLength = from.length,
-      toLength = to.length,
-      TOO_MANY = (MAX_SIZE || Infinity) < Math.sqrt((fromLength || 1) * (toLength || 1))
-    ;
-    if (fromLength < 1 || TOO_MANY) {
-      /* istanbul ignore next */
-      Eif (toLength || TOO_MANY) {
-        from.splice.apply(from, [0, fromLength].concat(to));
-      }
-      return;
-    }
-    if (toLength < 1) {
-      from.splice(0);
-      return;
-    }
-    performOperations(
-      from,
-      getOperations(from, to, levenstein(from, to))
-    );
-  }
- 
-  // given an object that would like to intercept
-  // all splice operations performed through a list,
-  // wraps the list.splice method to delegate such object
-  // and it puts back original splice right before
-  // every invocation.
-  // Note: do not use the same list in two different aura
-  majinbuu.aura = function aura(splicer, list) {
-    var splice = list.splice;
-    list.splice = function hodor() {
-      list.splice = splice;
-      var result = splicer.splice.apply(splicer, arguments);
-      list.splice = hodor;
-      return result;
-    };
-    return list;
-  };
- 
-  return majinbuu;
- 
-  // Helpers - - - - - - - - - - - - - - - - - - - - - -
- 
-  // originally readapted from:
-  // http://webreflection.blogspot.co.uk/2009/02/levenshtein-algorithm-revisited-25.html
-  // then rewritten in C for Emscripten (see levenstein.c)
-  // then "screw you ASM" due no much gain but very bloated code
-  function levenstein(from, to) {
-    var fromLength = from.length + 1;
-    var toLength = to.length + 1;
-    var size = fromLength * toLength;
-    var x = 0;
-    var y = 0;
-    var X = 0;
-    var Y = 0;
-    var crow = 0;
-    var prow = 0;
-    var del, ins, sub;
-    var grid = new TypedArray(size);
-    grid[0] = 0;
-    while (++x < toLength) grid[x] = x;
-    while (++y < fromLength) {
-      X = x = 0;
-      prow = crow;
-      crow = y * toLength;
-      grid[crow + x] = y;
-      while (++x < toLength) {
-        del = grid[prow + x] + 1;
-        ins = grid[crow + X] + 1;
-        sub = grid[prow + X] + (from[Y] == to[X] ? 0 : 1);
-        grid[crow + x] = del < ins ?
-                          (del < sub ?
-                            del : sub) :
-                          (ins < sub ?
-                            ins : sub);
-        ++X;
-      };
-      Y = y;
-    }
-    return grid;
-  }
- 
-  // add operations (in reversed order)
-  function addOperation(list, type, x, y, count, items) {
-    list.unshift({
-      type: type,
-      x: x,
-      y: y,
-      count: count,
-      items: items
-    });
-  }
- 
-  // walk the Levenshtein grid bottom -> up
-  function getOperations(Y, X, grid) {
-    var
-      list = [],
-      YL = Y.length + 1,
-      XL = X.length + 1,
-      y = YL - 1,
-      x = XL - 1,
-      cell, top, left, diagonal,
-      crow, prow
-    ;
-    while (x && y) {
-      crow = y * XL + x;
-      prow = crow - XL;
-      cell = grid[crow];
-      top = grid[prow];
-      left = grid[crow - 1];
-      diagonal = grid[prow - 1];
-      if (diagonal <= left && diagonal <= top && diagonal <= cell) {
-        x--;
-        y--;
-        if (diagonal < cell) {
-          addOperation(list, SUBSTITUTE, x, y, 1, [X[x]]);
-        }
-      }
-      else if (left <= top && left <= cell) {
-        x--;
-        addOperation(list, INSERT, x, y, 0, [X[x]]);
-      }
-      else {
-        y--;
-        addOperation(list, DELETE, x, y, 1, []);
-      }
-    }
-    while (x--) {
-      addOperation(list, INSERT, x, y, 0, [X[x]]);
-    }
-    while (y--) {
-      addOperation(list, DELETE, x, y, 1, []);
-    }
-    return list;
-  }
- 
-  /* grouped operations */
-  function performOperations(target, operations) {
-    var
-      diff = 0,
-      i = 1,
-      length = operations.length,
-      curr, prev, op
-    ;
-    /* istanbul ignore else */
-    Eif (length) {
-      op = (prev = operations[0]);
-      while (i < length) {
-        curr = operations[i++];
-        if (prev.type === curr.type && (curr.x - prev.x) <= 1 && (curr.y - prev.y) <= 1) {
-          op.count += curr.count;
-          op.items = op.items.concat(curr.items);
-        } else {
-          target.splice.apply(target, [op.y + diff, op.count].concat(op.items));
-          diff += op.type === INSERT ?
-            op.items.length : (op.type === DELETE ?
-              -op.count : 0);
-          op = curr;
-        }
-        prev = curr;
-      }
-      target.splice.apply(target, [op.y + diff, op.count].concat(op.items));
-    }
-  }
- 
-  /* one-by-one operation (testing purpose)
-  function performOperations(target, operations) {
-    for (var op, diff = 0, i = 0, length = operations.length; i < length; i++) {
-      op = operations[i];
-      target.splice.apply(target, [op.y + diff, op.count].concat(op.items));
-      diff += op.type === INSERT ?
-                op.items.length : (op.type === DELETE ?
-                  -op.count : 0);
-    }
-  }
-  // */
- 
-}()));
- 
-// umd.KISS
-try { module.exports = hyperHTML; } catch(o_O) {}
-
-
- - - - - - - diff --git a/coverage/lcov-report/hyperHTML/min.js.html b/coverage/lcov-report/hyperHTML/min.js.html deleted file mode 100644 index b47e9034..00000000 --- a/coverage/lcov-report/hyperHTML/min.js.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - Code coverage report for hyperHTML/min.js - - - - - - - -
-
-

- all files / hyperHTML/ min.js -

-
-
- 82.88% - Statements - 92/111 -
-
- 64.23% - Branches - 88/137 -
-
- 82.35% - Functions - 28/34 -
-
- 100% - Lines - 2/2 -
-
-
-
-

-
-
1 -21ร— -28ร—
var hyperHTML=function(){"use strict";/*! (C) 2017 Andrea Giammarchi @WebReflection (MIT) */
-function e(e){return C in this&&this[C].s===e?y.apply(this,arguments):b.apply(this,arguments)}function t(e,t){for(var n,r=k?T:x,i=E.call(e.attributes),c=0,a=i.length;c<a;c++)n=i[c],n.value===r&&t.push(o(e,k?e.getAttributeNode(N.shift()):n))}function n(e,o){for(var a,l,u=E.call(e.childNodes),s=u.length,h=0;h<s;h++)switch(a=u[h],a.nodeType){case 1:t(a,o),n(a,o);break;case 8:a.textContent===T&&(1===s?(o.push(r(e)),e.removeChild(a)):!(h<1||1===u[h-1].nodeType)||h+1!==s&&1!==u[h+1].nodeType?(l=e.ownerDocument.createTextNode(""),o.push(c(l)),e.replaceChild(l,a)):o.push(i(a)));break;case 3:"STYLE"===e.nodeName&&a.textContent===x&&o.push(c(e))}}function r(e){return function t(n){switch(typeof n){case"string":e.innerHTML=n;break;case"number":case"boolean":e.textContent=n;break;default:if(Array.isArray(n))Iif(1===n.length)t(n[0]);else Iif("string"==typeof n[0])t(n.join(""));else{var r=l(e.childNodes,n);-1<r&&p(e,n,r)}else s(e,n)}}}function o(e,t){var n,r=t.name,o="on"===r.slice(0,2),i=r in e&&!w.test(r);return i&&e.removeAttribute(r),i?function(t){n!==t&&(n=t,e[r]=o&&"handleEvent"in t?t.handleEvent.bind(t):t)}:function(e){n!==e&&(t.value=n=e)}}function i(e){var t=document.createDocumentFragment(),n=[];return function r(o){var i,c=e.parentNode;switch(typeof o){case"string":case"number":case"boolean":h(n,0),u(t,o),n=E.call(t.childNodes),c.insertBefore(t,e);break;default:Array.isArray(o)?0===o.length?r(o[0]):"string"==typeof o[0]?r(o.join("")):-1<(i=l(n,o))&&(h(n,i),o=o.slice(i),a(t,o),c.insertBefore(t,e),n.push.apply(n,o)):(h(n,0),n=11===o.nodeType?E.call(o.childNodes):[o],c.insertBefore(o,e))}}}function c(e){var t;return function(n){t!==n&&(e.textContent=t=n)}}function a(e,t){for(var n=0,r=t.length;n<r;n++)e.appendChild(t[n])}function l(e,t){Iif(e===t)return-1;for(var n=0,r=e.length,o=t.length;n<r;){if(!(n<o&&e[n]===t[n]))return n;n++}return n===o?-1:n}function u(e,t){var n=k&&/^[^\S]*?<(t(?:head|body|foot|r|d|h))/i.test(t),r=e.ownerDocument.createElement("template");r.innerHTML=n?"<table>"+t+"</table>":t,n&&(r={childNodes:r.querySelectorAll(RegExp.$1)}),a(e,E.call((r.content||r).childNodes))}function s(e,t){switch(t.nodeType){case 1:var n=e.childNodes;if(0<n.length&&n[0]===t){h(n,1);break}d(e,t);break;case 11:-1<l(e.childNodes,t.childNodes)&&d(e,t);break;case 3:e.textContent=t.textContent}}function h(e,t){for(var n,r=e.length;t<r--;)n=e[r],n.parentNode.removeChild(n)}function d(e,t){e.textContent="",e.appendChild(t)}function f(e){for(var t,n=[],r=e.childNodes,o=0,i=r.length;o<i;o++)t=r[o],(1===t.nodeType||0<D.call(t.textContent).length)&&n.push(t);return i=n.length,i<2?(t=i<1?e:n[0],function(){return t}):function(){return n}}function p(e,t,n){var r=e.ownerDocument.createDocumentFragment();0<n?(h(e.childNodes,n),a(r,t.slice(n)),e.appendChild(r)):(a(r,t),d(e,r))}function g(t){var n,r,o,i,c,l;return function(u){return l!==u&&(c=!0,l=u,o=document.createDocumentFragment(),r="svg"===t?document.createElementNS("http://www.w3.org/2000/svg","svg"):o,i=e.bind(r)),i.apply(null,arguments),c&&(c=!1,"svg"===t&&a(o,E.call(r.childNodes)),n=f(o)),n()}}function m(e,t,n){return e[t]||(e[t]=g(n))}function v(e,t){var n=L.get(e)||(L.set(e,n={}),n),r=t.indexOf(":");return r<0?m(n,t,t):m(n,t.slice(r+1),t.slice(0,r)||"html")}function y(){for(var e=1,t=arguments.length,n=this[C].u;e<t;e++)n[e-1](arguments[e]);return this}function b(e){var t=[],r=e.join(x);return k?(N=[],u(this,r.replace(M,A))):1===this.nodeType?this.innerHTML=r:u(this,r),n(this,t),this[C]={s:e,u:t},y.apply(this,arguments)}e.wire=function(e,t){return arguments.length<1?g("html"):null==e?g(t||"html"):v(e,t||"html")};var N,w=/^style$/i,C="_hyper_html: ",T=C+(Math.random()*new Date|0)+";",x="<!--"+T+"-->",k="documentMode"in document,M=k&&new RegExp("([^\\S][a-z]+[a-z0-9_-]*=)(['\"])"+x+"\\2","g"),A=k&&function(e,t,n){return N.push(t.slice(1,-1)),t+n+T+n},D=C.trim||function(){return this.replace(/^\s+|\s+$/g,"")},E=[].slice,L=typeof WeakMap==typeof L?{get:function(e){return e[C]},set:function(e,t){Object.defineProperty(e,C,{configurable:!0,value:t})}}:new WeakMap;return e}();try{module.exports=hyperHTML}catch(e){}
-
-
- - - - - - - diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html deleted file mode 100644 index 251d8948..00000000 --- a/coverage/lcov-report/index.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - Code coverage report for All files - - - - - - - -
-
-

- / -

-
-
- 100% - Statements - 695/695 -
-
- 100% - Branches - 384/384 -
-
- 100% - Functions - 112/112 -
-
- 100% - Lines - 682/682 -
-
- 4 statements, 2 functions, 6 branches - Ignored      -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
hyperHTML/
100%695/695100%384/384100%112/112100%682/682
-
-
- - - - - - - diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cd..00000000 --- a/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e038..00000000 --- a/coverage/lcov-report/prettify.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a6..00000000 Binary files a/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js deleted file mode 100644 index 6c5034e4..00000000 --- a/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,158 +0,0 @@ -var addSorting = (function () { - "use strict"; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { return document.querySelector('.coverage-summary'); } - // returns the thead element of the summary table - function getTableHeader() { return getTable().querySelector('thead tr'); } - // returns the tbody element of the summary table - function getTableBody() { return getTable().querySelector('tbody'); } - // returns the th element for nth column - function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function (a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function (a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function () { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i =0 ; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index 186fba76..00000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,1299 +0,0 @@ -TN: -SF:/home/webreflection/code/hyperHTML/index.js -FN:1,(anonymous_1) -FN:16,hyper -FN:38,adopt -FN:39,(anonymous_4) -FN:50,bind -FN:53,define -FN:62,escape -FN:69,wire -FN:83,Component -FN:88,(anonymous_10) -FN:101,(anonymous_11) -FN:103,(anonymous_12) -FN:105,(anonymous_13) -FN:146,Aura -FN:152,splice -FN:191,render -FN:208,setAttribute -FN:238,(anonymous_18) -FN:249,(anonymous_19) -FN:255,specialAttr -FN:283,eventAttr -FN:292,normalAttr -FN:318,setTextContent -FN:320,(anonymous_24) -FN:330,setAnyContent -FN:332,anyContent -FN:445,attributesSeeker -FN:484,hyperSeeker -FN:540,(anonymous_29) -FN:553,(anonymous_30) -FN:555,(anonymous_31) -FN:574,fnEscape -FN:579,asHTML -FN:584,createContent -FN:605,createDocumentFragment -FN:611,createFragment -FN:620,createHTMLFragment -FN:665,createSVGFragment -FN:681,createText -FN:686,dispatchAll -FN:702,dispatchTarget -FN:724,getCEClass -FN:732,isSpecialAttribute -FN:742,invokeAtDistance -FN:756,invokeTransformer -FN:766,isNode_ish -FN:771,isPromise_ish -FN:777,lazyGetter -FN:780,(anonymous_49) -FN:783,(anonymous_50) -FN:790,optimist -FN:805,removeAttributeList -FN:812,setContent -FN:830,Path -FN:846,(anonymous_55) -FN:854,(anonymous_56) -FN:862,(anonymous_57) -FN:865,(anonymous_58) -FN:872,(anonymous_59) -FN:876,(anonymous_60) -FN:877,(anonymous_61) -FN:878,(anonymous_62) -FN:879,(anonymous_63) -FN:890,(anonymous_64) -FN:895,(anonymous_65) -FN:896,(anonymous_66) -FN:903,(anonymous_67) -FN:906,(anonymous_68) -FN:912,(anonymous_69) -FN:923,(anonymous_70) -FN:928,(anonymous_71) -FN:935,(anonymous_72) -FN:950,unique -FN:958,(anonymous_74) -FN:961,appendNodes -FN:973,(anonymous_76) -FN:987,(anonymous_77) -FN:992,(anonymous_78) -FN:1006,(anonymous_79) -FN:1017,(anonymous_80) -FN:1021,(anonymous_81) -FN:1045,(anonymous_82) -FN:1049,(anonymous_83) -FN:1060,(anonymous_84) -FN:1071,(anonymous_85) -FN:1077,(anonymous_86) -FN:1080,(anonymous_87) -FN:1086,(anonymous_88) -FN:1089,removePreviousText -FN:1098,insertBefore -FN:1108,discoverNode -FN:1187,discoverUpdates -FN:1214,createTemplate -FN:1226,createPath -FN:1260,createUpdates -FN:1281,update -FN:1289,upgrade -FN:1313,wireContent -FN:1316,before -FN:1324,after -FN:1336,adopt -FN:1342,(anonymous_102) -FN:1363,update -FN:1376,wireWeakly -FN:1407,(anonymous_105) -FN:1419,majinbuu -FN:1448,aura -FN:1450,hodor -FN:1467,levenstein -FN:1503,addOperation -FN:1514,getOperations -FN:1557,performOperations -FNF:112 -FNH:112 -FNDA:2,(anonymous_1) -FNDA:20,hyper -FNDA:28,adopt -FNDA:32,(anonymous_4) -FNDA:229,bind -FNDA:4,define -FNDA:2,escape -FNDA:73,wire -FNDA:13,Component -FNDA:9,(anonymous_10) -FNDA:5,(anonymous_11) -FNDA:4,(anonymous_12) -FNDA:5,(anonymous_13) -FNDA:113,Aura -FNDA:95,splice -FNDA:311,render -FNDA:59,setAttribute -FNDA:2,(anonymous_18) -FNDA:2,(anonymous_19) -FNDA:31,specialAttr -FNDA:32,eventAttr -FNDA:65,normalAttr -FNDA:4,setTextContent -FNDA:6,(anonymous_24) -FNDA:113,setAnyContent -FNDA:308,anyContent -FNDA:128,attributesSeeker -FNDA:247,hyperSeeker -FNDA:2,(anonymous_29) -FNDA:2,(anonymous_30) -FNDA:229,(anonymous_31) -FNDA:4,fnEscape -FNDA:2,asHTML -FNDA:69,createContent -FNDA:155,createDocumentFragment -FNDA:147,createFragment -FNDA:145,createHTMLFragment -FNDA:2,createSVGFragment -FNDA:79,createText -FNDA:7,dispatchAll -FNDA:5,dispatchTarget -FNDA:6,getCEClass -FNDA:57,isSpecialAttribute -FNDA:10,invokeAtDistance -FNDA:12,invokeTransformer -FNDA:86,isNode_ish -FNDA:107,isPromise_ish -FNDA:6,lazyGetter -FNDA:38,(anonymous_49) -FNDA:16,(anonymous_50) -FNDA:65,optimist -FNDA:170,removeAttributeList -FNDA:176,setContent -FNDA:128,Path -FNDA:3,(anonymous_55) -FNDA:2,(anonymous_56) -FNDA:1,(anonymous_57) -FNDA:2,(anonymous_58) -FNDA:4,(anonymous_59) -FNDA:1,(anonymous_60) -FNDA:187,(anonymous_61) -FNDA:0,(anonymous_62) -FNDA:100,(anonymous_63) -FNDA:1,(anonymous_64) -FNDA:0,(anonymous_65) -FNDA:2,(anonymous_66) -FNDA:1,(anonymous_67) -FNDA:85,(anonymous_68) -FNDA:60,(anonymous_69) -FNDA:1,(anonymous_70) -FNDA:109,(anonymous_71) -FNDA:25,(anonymous_72) -FNDA:228,unique -FNDA:74,(anonymous_74) -FNDA:5,appendNodes -FNDA:180,(anonymous_76) -FNDA:109,(anonymous_77) -FNDA:90,(anonymous_78) -FNDA:94,(anonymous_79) -FNDA:44,(anonymous_80) -FNDA:57,(anonymous_81) -FNDA:2,(anonymous_82) -FNDA:232,(anonymous_83) -FNDA:69,(anonymous_84) -FNDA:21,(anonymous_85) -FNDA:21,(anonymous_86) -FNDA:18,(anonymous_87) -FNDA:18,(anonymous_88) -FNDA:40,removePreviousText -FNDA:36,insertBefore -FNDA:46,discoverNode -FNDA:32,discoverUpdates -FNDA:119,createTemplate -FNDA:128,createPath -FNDA:138,createUpdates -FNDA:311,update -FNDA:170,upgrade -FNDA:67,wireContent -FNDA:67,before -FNDA:103,after -FNDA:14,adopt -FNDA:14,(anonymous_102) -FNDA:90,update -FNDA:56,wireWeakly -FNDA:2,(anonymous_105) -FNDA:53,majinbuu -FNDA:113,aura -FNDA:95,hodor -FNDA:23,levenstein -FNDA:32,addOperation -FNDA:23,getOperations -FNDA:23,performOperations -DA:1,2 -DA:11,2 -DA:14,2 -DA:16,1 -DA:17,20 -DA:38,2 -DA:39,28 -DA:40,32 -DA:41,32 -DA:42,32 -DA:43,32 -DA:49,2 -DA:50,229 -DA:53,2 -DA:54,4 -DA:55,2 -DA:57,4 -DA:62,2 -DA:63,2 -DA:68,2 -DA:69,1 -DA:70,73 -DA:82,2 -DA:83,1 -DA:84,2 -DA:90,9 -DA:91,9 -DA:101,5 -DA:103,4 -DA:106,5 -DA:107,5 -DA:108,9 -DA:109,5 -DA:126,2 -DA:127,2 -DA:128,2 -DA:129,2 -DA:130,2 -DA:133,2 -DA:134,2 -DA:136,2 -DA:137,2 -DA:138,2 -DA:139,2 -DA:140,2 -DA:146,1 -DA:147,113 -DA:148,113 -DA:149,113 -DA:152,2 -DA:153,95 -DA:164,53 -DA:166,53 -DA:167,48 -DA:170,95 -DA:171,95 -DA:172,95 -DA:173,53 -DA:174,38 -DA:176,15 -DA:177,15 -DA:178,41 -DA:181,53 -DA:183,95 -DA:191,1 -DA:192,311 -DA:193,311 -DA:197,170 -DA:199,141 -DA:201,309 -DA:208,1 -DA:209,59 -DA:221,59 -DA:222,24 -DA:223,24 -DA:224,16 -DA:225,2 -DA:227,14 -DA:228,12 -DA:232,59 -DA:233,22 -DA:234,4 -DA:235,4 -DA:236,2 -DA:239,2 -DA:240,2 -DA:241,3 -DA:245,2 -DA:247,4 -DA:250,2 -DA:251,2 -DA:255,22 -DA:256,31 -DA:257,25 -DA:258,20 -DA:261,20 -DA:265,16 -DA:268,4 -DA:269,4 -DA:271,12 -DA:276,6 -DA:277,6 -DA:278,6 -DA:282,59 -DA:284,32 -DA:285,20 -DA:286,20 -DA:287,20 -DA:293,65 -DA:294,47 -DA:297,47 -DA:298,43 -DA:299,4 -DA:301,2 -DA:302,2 -DA:305,39 -DA:306,39 -DA:307,2 -DA:308,2 -DA:318,1 -DA:319,4 -DA:320,4 -DA:321,6 -DA:322,4 -DA:323,4 -DA:330,1 -DA:331,113 -DA:332,113 -DA:333,308 -DA:337,126 -DA:338,126 -DA:342,51 -DA:343,28 -DA:344,28 -DA:347,75 -DA:348,75 -DA:349,2 -DA:351,73 -DA:357,126 -DA:359,4 -DA:360,4 -DA:363,178 -DA:364,8 -DA:365,8 -DA:366,8 -DA:367,170 -DA:368,2 -DA:371,170 -DA:372,170 -DA:373,84 -DA:374,84 -DA:375,5 -DA:377,79 -DA:381,24 -DA:382,24 -DA:384,10 -DA:385,10 -DA:386,12 -DA:388,10 -DA:389,10 -DA:391,45 -DA:392,12 -DA:394,45 -DA:395,4 -DA:396,4 -DA:398,41 -DA:399,88 -DA:400,4 -DA:405,41 -DA:406,41 -DA:409,86 -DA:410,24 -DA:416,62 -DA:417,4 -DA:418,58 -DA:419,10 -DA:420,48 -DA:421,4 -DA:422,44 -DA:423,4 -DA:424,40 -DA:425,28 -DA:426,28 -DA:427,28 -DA:428,28 -DA:429,28 -DA:430,12 -DA:431,4 -DA:433,8 -DA:435,170 -DA:445,1 -DA:446,128 -DA:454,65 -DA:455,65 -DA:456,57 -DA:458,57 -DA:462,1 -DA:464,1 -DA:466,1 -DA:468,1 -DA:470,1 -DA:472,56 -DA:473,56 -DA:476,56 -DA:477,56 -DA:484,1 -DA:485,247 -DA:491,345 -DA:492,345 -DA:494,128 -DA:495,128 -DA:496,128 -DA:498,70 -DA:499,68 -DA:500,68 -DA:502,70 -DA:504,147 -DA:508,4 -DA:509,4 -DA:511,147 -DA:529,2 -DA:534,2 -DA:540,2 -DA:541,2 -DA:542,2 -DA:543,2 -DA:548,2 -DA:553,2 -DA:554,2 -DA:555,229 -DA:556,2 -DA:564,2 -DA:567,2 -DA:574,1 -DA:575,4 -DA:579,1 -DA:580,2 -DA:584,1 -DA:585,69 -DA:593,102 -DA:594,102 -DA:598,73 -DA:601,69 -DA:605,1 -DA:606,155 -DA:611,1 -DA:612,147 -DA:620,1 -DA:621,145 -DA:622,145 -DA:623,145 -DA:632,145 -DA:633,145 -DA:634,145 -DA:636,69 -DA:643,69 -DA:645,145 -DA:649,1 -DA:650,1 -DA:651,1 -DA:653,144 -DA:654,144 -DA:655,76 -DA:658,68 -DA:661,145 -DA:665,1 -DA:666,2 -DA:667,2 -DA:668,2 -DA:669,1 -DA:670,1 -DA:671,1 -DA:673,1 -DA:674,1 -DA:675,1 -DA:677,2 -DA:681,1 -DA:682,79 -DA:686,1 -DA:687,7 -DA:693,5 -DA:695,5 -DA:696,5 -DA:702,1 -DA:704,5 -DA:705,3 -DA:707,2 -DA:708,1 -DA:711,2 -DA:716,1 -DA:719,5 -DA:724,1 -DA:725,6 -DA:726,6 -DA:727,6 -DA:732,1 -DA:733,57 -DA:734,57 -DA:735,6 -DA:736,6 -DA:738,57 -DA:742,1 -DA:743,10 -DA:744,10 -DA:745,2 -DA:746,8 -DA:747,2 -DA:748,6 -DA:749,2 -DA:751,4 -DA:756,1 -DA:757,12 -DA:758,10 -DA:759,10 -DA:760,8 -DA:766,1 -DA:767,86 -DA:771,1 -DA:772,107 -DA:777,1 -DA:778,6 -DA:779,6 -DA:781,38 -DA:784,16 -DA:790,1 -DA:791,65 -DA:792,65 -DA:793,44 -DA:795,21 -DA:796,19 -DA:797,9 -DA:798,9 -DA:805,1 -DA:806,170 -DA:807,24 -DA:812,1 -DA:813,176 -DA:814,176 -DA:817,113 -DA:818,113 -DA:820,59 -DA:821,59 -DA:823,4 -DA:824,4 -DA:826,176 -DA:830,1 -DA:831,128 -DA:838,2 -DA:839,2 -DA:840,2 -DA:842,2 -DA:843,2 -DA:844,1 -DA:846,1 -DA:847,3 -DA:848,3 -DA:849,3 -DA:853,2 -DA:854,2 -DA:855,2 -DA:856,2 -DA:857,2 -DA:858,2 -DA:862,1 -DA:863,1 -DA:865,1 -DA:866,2 -DA:871,2 -DA:875,4 -DA:876,1 -DA:877,187 -DA:878,1 -DA:880,100 -DA:889,2 -DA:891,1 -DA:894,1 -DA:895,1 -DA:896,2 -DA:902,2 -DA:904,1 -DA:905,1 -DA:907,85 -DA:913,60 -DA:922,2 -DA:924,1 -DA:927,1 -DA:928,1 -DA:929,109 -DA:934,2 -DA:935,25 -DA:942,2 -DA:945,2 -DA:946,2 -DA:949,2 -DA:950,1 -DA:951,228 -DA:952,228 -DA:957,2 -DA:959,74 -DA:962,5 -DA:967,6 -DA:972,2 -DA:974,180 -DA:981,432 -DA:982,432 -DA:983,223 -DA:985,180 -DA:987,109 -DA:991,2 -DA:993,90 -DA:994,154 -DA:995,154 -DA:997,70 -DA:998,70 -DA:1000,84 -DA:1001,84 -DA:1004,90 -DA:1007,94 -DA:1008,161 -DA:1010,94 -DA:1014,2 -DA:1015,2 -DA:1016,2 -DA:1017,2 -DA:1018,44 -DA:1021,2 -DA:1022,57 -DA:1026,2 -DA:1029,2 -DA:1032,2 -DA:1035,2 -DA:1038,2 -DA:1041,2 -DA:1045,2 -DA:1046,2 -DA:1047,2 -DA:1048,2 -DA:1050,232 -DA:1056,163 -DA:1058,232 -DA:1061,69 -DA:1070,2 -DA:1072,21 -DA:1073,15 -DA:1075,15 -DA:1077,21 -DA:1079,2 -DA:1081,18 -DA:1082,12 -DA:1084,14 -DA:1086,18 -DA:1089,1 -DA:1090,40 -DA:1091,40 -DA:1092,10 -DA:1093,10 -DA:1098,1 -DA:1099,36 -DA:1100,10 -DA:1102,26 -DA:1108,1 -DA:1109,46 -DA:1118,82 -DA:1120,8 -DA:1121,8 -DA:1122,6 -DA:1124,8 -DA:1125,8 -DA:1127,36 -DA:1128,36 -DA:1129,36 -DA:1130,36 -DA:1131,36 -DA:1132,36 -DA:1133,36 -DA:1134,36 -DA:1140,26 -DA:1141,26 -DA:1144,4 -DA:1147,10 -DA:1148,10 -DA:1150,36 -DA:1154,36 -DA:1155,6 -DA:1161,30 -DA:1167,36 -DA:1168,30 -DA:1170,36 -DA:1173,38 -DA:1179,38 -DA:1180,38 -DA:1183,46 -DA:1187,1 -DA:1188,32 -DA:1195,46 -DA:1196,46 -DA:1197,46 -DA:1204,32 -DA:1205,32 -DA:1214,1 -DA:1215,119 -DA:1216,119 -DA:1217,119 -DA:1218,119 -DA:1219,119 -DA:1220,119 -DA:1226,1 -DA:1227,128 -DA:1228,128 -DA:1229,128 -DA:1232,4 -DA:1233,4 -DA:1235,68 -DA:1236,68 -DA:1240,68 -DA:1243,56 -DA:1244,56 -DA:1245,56 -DA:1247,128 -DA:1252,107 -DA:1254,128 -DA:1260,1 -DA:1261,138 -DA:1268,130 -DA:1269,130 -DA:1276,138 -DA:1277,138 -DA:1281,1 -DA:1282,311 -DA:1283,347 -DA:1289,1 -DA:1290,170 -DA:1291,170 -DA:1292,170 -DA:1294,170 -DA:1295,138 -DA:1296,138 -DA:1297,138 -DA:1298,138 -DA:1299,137 -DA:1300,137 -DA:1302,32 -DA:1303,32 -DA:1304,32 -DA:1313,1 -DA:1314,67 -DA:1316,1 -DA:1317,67 -DA:1318,67 -DA:1321,67 -DA:1324,1 -DA:1325,103 -DA:1326,69 -DA:1327,69 -DA:1328,8 -DA:1330,69 -DA:1332,103 -DA:1335,67 -DA:1337,14 -DA:1338,14 -DA:1339,14 -DA:1340,10 -DA:1341,10 -DA:1342,10 -DA:1343,14 -DA:1344,10 -DA:1345,2 -DA:1346,2 -DA:1351,2 -DA:1353,8 -DA:1354,8 -DA:1357,14 -DA:1358,14 -DA:1361,14 -DA:1364,90 -DA:1365,90 -DA:1366,59 -DA:1367,59 -DA:1368,59 -DA:1370,90 -DA:1371,89 -DA:1376,1 -DA:1377,56 -DA:1378,56 -DA:1379,56 -DA:1380,56 -DA:1381,12 -DA:1382,12 -DA:1384,56 -DA:1385,29 -DA:1386,29 -DA:1388,56 -DA:1400,2 -DA:1405,2 -DA:1412,2 -DA:1419,1 -DA:1420,53 -DA:1425,53 -DA:1427,26 -DA:1428,26 -DA:1430,26 -DA:1432,27 -DA:1433,4 -DA:1434,4 -DA:1436,23 -DA:1448,2 -DA:1449,113 -DA:1450,113 -DA:1451,95 -DA:1452,95 -DA:1453,95 -DA:1454,95 -DA:1456,113 -DA:1459,2 -DA:1467,1 -DA:1468,23 -DA:1469,23 -DA:1470,23 -DA:1471,23 -DA:1472,23 -DA:1473,23 -DA:1474,23 -DA:1475,23 -DA:1476,23 -DA:1477,23 -DA:1478,23 -DA:1479,23 -DA:1480,42 -DA:1481,23 -DA:1482,38 -DA:1483,38 -DA:1484,38 -DA:1485,38 -DA:1486,38 -DA:1487,75 -DA:1488,75 -DA:1489,75 -DA:1490,75 -DA:1495,75 -DA:1497,38 -DA:1499,23 -DA:1503,1 -DA:1504,32 -DA:1514,1 -DA:1515,23 -DA:1524,23 -DA:1525,43 -DA:1526,43 -DA:1527,43 -DA:1528,43 -DA:1529,43 -DA:1530,43 -DA:1531,43 -DA:1532,33 -DA:1533,33 -DA:1534,33 -DA:1535,18 -DA:1538,10 -DA:1539,7 -DA:1540,7 -DA:1543,3 -DA:1544,3 -DA:1547,23 -DA:1548,2 -DA:1550,23 -DA:1551,2 -DA:1553,23 -DA:1557,1 -DA:1558,23 -DA:1565,23 -DA:1566,23 -DA:1567,23 -DA:1568,9 -DA:1569,9 -DA:1570,2 -DA:1571,2 -DA:1573,7 -DA:1574,7 -DA:1577,7 -DA:1579,9 -DA:1581,23 -DA:1600,2 -LF:682 -LH:682 -BRDA:17,1,0,14 -BRDA:17,1,1,6 -BRDA:18,2,0,2 -BRDA:18,2,1,12 -BRDA:20,3,0,2 -BRDA:20,3,1,10 -BRDA:22,4,0,2 -BRDA:22,4,1,8 -BRDA:24,5,0,4 -BRDA:24,5,1,4 -BRDA:30,6,0,2 -BRDA:30,6,1,4 -BRDA:54,7,0,2 -BRDA:54,7,1,2 -BRDA:70,8,0,15 -BRDA:70,8,1,58 -BRDA:72,9,0,6 -BRDA:72,9,1,52 -BRDA:73,10,0,6 -BRDA:73,10,1,2 -BRDA:74,11,0,52 -BRDA:74,11,1,26 -BRDA:92,12,0,9 -BRDA:92,12,1,7 -BRDA:92,12,2,7 -BRDA:107,13,0,2 -BRDA:107,13,1,3 -BRDA:166,14,0,48 -BRDA:166,14,1,5 -BRDA:172,15,0,53 -BRDA:172,15,1,42 -BRDA:173,16,0,38 -BRDA:173,16,1,15 -BRDA:193,17,0,170 -BRDA:193,17,1,141 -BRDA:194,18,0,311 -BRDA:194,18,1,183 -BRDA:212,19,0,59 -BRDA:212,19,1,57 -BRDA:213,20,0,59 -BRDA:213,20,1,57 -BRDA:213,20,2,22 -BRDA:216,21,0,16 -BRDA:216,21,1,43 -BRDA:217,22,0,59 -BRDA:217,22,1,37 -BRDA:218,23,0,59 -BRDA:218,23,1,22 -BRDA:218,23,2,20 -BRDA:221,24,0,24 -BRDA:221,24,1,35 -BRDA:221,25,0,59 -BRDA:221,25,1,43 -BRDA:223,26,0,16 -BRDA:223,26,1,8 -BRDA:224,27,0,2 -BRDA:224,27,1,14 -BRDA:224,28,0,16 -BRDA:224,28,1,15 -BRDA:227,29,0,12 -BRDA:227,29,1,2 -BRDA:232,30,0,22 -BRDA:232,30,1,37 -BRDA:233,31,0,4 -BRDA:233,31,1,18 -BRDA:235,32,0,2 -BRDA:235,32,1,2 -BRDA:256,33,0,25 -BRDA:256,33,1,6 -BRDA:257,34,0,20 -BRDA:257,34,1,5 -BRDA:261,35,0,16 -BRDA:261,35,1,4 -BRDA:265,36,0,4 -BRDA:265,36,1,12 -BRDA:278,37,0,2 -BRDA:278,37,1,4 -BRDA:282,38,0,16 -BRDA:282,38,1,43 -BRDA:284,39,0,20 -BRDA:284,39,1,12 -BRDA:285,40,0,4 -BRDA:285,40,1,16 -BRDA:287,41,0,18 -BRDA:287,41,1,2 -BRDA:290,42,0,12 -BRDA:290,42,1,31 -BRDA:293,43,0,47 -BRDA:293,43,1,18 -BRDA:297,44,0,43 -BRDA:297,44,1,4 -BRDA:298,45,0,4 -BRDA:298,45,1,39 -BRDA:299,46,0,2 -BRDA:299,46,1,2 -BRDA:306,47,0,2 -BRDA:306,47,1,37 -BRDA:321,48,0,4 -BRDA:321,48,1,2 -BRDA:333,49,0,112 -BRDA:333,49,1,124 -BRDA:333,49,2,126 -BRDA:333,49,3,4 -BRDA:333,49,4,172 -BRDA:333,49,5,178 -BRDA:333,49,6,170 -BRDA:338,50,0,51 -BRDA:338,50,1,75 -BRDA:339,51,0,126 -BRDA:339,51,1,53 -BRDA:342,52,0,28 -BRDA:342,52,1,23 -BRDA:348,53,0,2 -BRDA:348,53,1,73 -BRDA:363,54,0,8 -BRDA:363,54,1,170 -BRDA:367,55,0,2 -BRDA:367,55,1,168 -BRDA:372,56,0,84 -BRDA:372,56,1,86 -BRDA:374,57,0,5 -BRDA:374,57,1,79 -BRDA:377,58,0,16 -BRDA:377,58,1,24 -BRDA:377,58,2,24 -BRDA:377,58,3,10 -BRDA:377,58,4,45 -BRDA:377,58,5,41 -BRDA:391,59,0,12 -BRDA:391,59,1,33 -BRDA:394,60,0,4 -BRDA:394,60,1,41 -BRDA:399,61,0,4 -BRDA:399,61,1,84 -BRDA:409,62,0,24 -BRDA:409,62,1,62 -BRDA:412,63,0,8 -BRDA:412,63,1,16 -BRDA:416,64,0,4 -BRDA:416,64,1,58 -BRDA:418,65,0,10 -BRDA:418,65,1,48 -BRDA:420,66,0,4 -BRDA:420,66,1,44 -BRDA:422,67,0,4 -BRDA:422,67,1,40 -BRDA:424,68,0,28 -BRDA:424,68,1,12 -BRDA:430,69,0,4 -BRDA:430,69,1,8 -BRDA:455,70,0,57 -BRDA:455,70,1,8 -BRDA:458,71,0,1 -BRDA:458,71,1,56 -BRDA:476,72,0,56 -BRDA:476,72,1,4 -BRDA:492,73,0,128 -BRDA:492,73,1,70 -BRDA:492,73,2,147 -BRDA:498,74,0,68 -BRDA:498,74,1,2 -BRDA:504,75,0,4 -BRDA:504,75,1,143 -BRDA:505,76,0,147 -BRDA:505,76,1,4 -BRDA:534,77,0,2 -BRDA:534,77,1,1 -BRDA:534,77,2,1 -BRDA:554,78,0,1 -BRDA:554,78,1,1 -BRDA:554,79,0,2 -BRDA:554,79,1,2 -BRDA:594,80,0,73 -BRDA:594,80,1,29 -BRDA:595,81,0,102 -BRDA:595,81,1,43 -BRDA:601,82,0,61 -BRDA:601,82,1,8 -BRDA:613,83,0,2 -BRDA:613,83,1,145 -BRDA:628,84,0,1 -BRDA:628,84,1,144 -BRDA:634,85,0,69 -BRDA:634,85,1,76 -BRDA:645,86,0,1 -BRDA:645,86,1,144 -BRDA:654,87,0,76 -BRDA:654,87,1,68 -BRDA:668,88,0,1 -BRDA:668,88,1,1 -BRDA:668,89,0,2 -BRDA:668,89,1,1 -BRDA:695,90,0,5 -BRDA:695,90,1,0 -BRDA:704,91,0,3 -BRDA:704,91,1,2 -BRDA:705,92,0,3 -BRDA:705,92,1,3 -BRDA:707,93,0,0 -BRDA:707,93,1,2 -BRDA:707,94,0,2 -BRDA:707,94,1,0 -BRDA:726,95,0,6 -BRDA:726,95,1,6 -BRDA:727,96,0,6 -BRDA:727,96,1,6 -BRDA:734,97,0,6 -BRDA:734,97,1,51 -BRDA:734,98,0,57 -BRDA:734,98,1,57 -BRDA:736,99,0,4 -BRDA:736,99,1,2 -BRDA:738,100,0,57 -BRDA:738,100,1,57 -BRDA:744,101,0,2 -BRDA:744,101,1,8 -BRDA:746,102,0,2 -BRDA:746,102,1,6 -BRDA:748,103,0,2 -BRDA:748,103,1,4 -BRDA:759,104,0,8 -BRDA:759,104,1,2 -BRDA:772,105,0,107 -BRDA:772,105,1,107 -BRDA:781,106,0,38 -BRDA:781,106,1,14 -BRDA:792,107,0,44 -BRDA:792,107,1,21 -BRDA:796,108,0,9 -BRDA:796,108,1,10 -BRDA:796,109,0,19 -BRDA:796,109,1,10 -BRDA:814,110,0,113 -BRDA:814,110,1,59 -BRDA:814,110,2,4 -BRDA:871,111,0,1 -BRDA:871,111,1,1 -BRDA:889,112,0,1 -BRDA:889,112,1,1 -BRDA:902,113,0,1 -BRDA:902,113,1,1 -BRDA:922,114,0,2 -BRDA:922,114,1,1 -BRDA:934,115,0,2 -BRDA:934,115,1,1 -BRDA:952,116,0,228 -BRDA:952,116,1,60 -BRDA:957,117,0,1 -BRDA:957,117,1,1 -BRDA:972,118,0,1 -BRDA:972,118,1,1 -BRDA:972,119,0,2 -BRDA:972,119,1,1 -BRDA:982,120,0,223 -BRDA:982,120,1,209 -BRDA:991,121,0,1 -BRDA:991,121,1,1 -BRDA:991,122,0,2 -BRDA:991,122,1,1 -BRDA:995,123,0,70 -BRDA:995,123,1,84 -BRDA:1022,124,0,57 -BRDA:1022,124,1,30 -BRDA:1022,125,0,57 -BRDA:1022,125,1,30 -BRDA:1048,126,0,1 -BRDA:1048,126,1,1 -BRDA:1070,127,0,1 -BRDA:1070,127,1,1 -BRDA:1073,128,0,6 -BRDA:1073,128,1,9 -BRDA:1079,129,0,1 -BRDA:1079,129,1,1 -BRDA:1082,130,0,4 -BRDA:1082,130,1,8 -BRDA:1091,131,0,10 -BRDA:1091,131,1,30 -BRDA:1091,132,0,40 -BRDA:1091,132,1,16 -BRDA:1099,133,0,10 -BRDA:1099,133,1,26 -BRDA:1118,134,0,8 -BRDA:1118,134,1,36 -BRDA:1118,134,2,38 -BRDA:1121,135,0,6 -BRDA:1121,135,1,2 -BRDA:1130,136,0,8 -BRDA:1130,136,1,28 -BRDA:1132,137,0,10 -BRDA:1132,137,1,26 -BRDA:1134,138,0,26 -BRDA:1134,138,1,4 -BRDA:1134,138,2,10 -BRDA:1154,139,0,6 -BRDA:1154,139,1,30 -BRDA:1167,140,0,30 -BRDA:1167,140,1,6 -BRDA:1173,141,0,38 -BRDA:1173,141,1,8 -BRDA:1229,142,0,4 -BRDA:1229,142,1,4 -BRDA:1229,142,2,68 -BRDA:1229,142,3,18 -BRDA:1229,142,4,56 -BRDA:1292,143,0,170 -BRDA:1292,143,1,119 -BRDA:1294,144,0,138 -BRDA:1294,144,1,32 -BRDA:1318,145,0,8 -BRDA:1318,145,1,59 -BRDA:1325,146,0,69 -BRDA:1325,146,1,34 -BRDA:1327,147,0,8 -BRDA:1327,147,1,61 -BRDA:1335,148,0,8 -BRDA:1335,148,1,59 -BRDA:1339,149,0,10 -BRDA:1339,149,1,4 -BRDA:1343,150,0,10 -BRDA:1343,150,1,4 -BRDA:1344,151,0,2 -BRDA:1344,151,1,8 -BRDA:1353,152,0,2 -BRDA:1353,152,1,6 -BRDA:1365,153,0,59 -BRDA:1365,153,1,31 -BRDA:1380,154,0,12 -BRDA:1380,154,1,44 -BRDA:1382,155,0,12 -BRDA:1382,155,1,12 -BRDA:1384,156,0,29 -BRDA:1384,156,1,27 -BRDA:1388,157,0,56 -BRDA:1388,157,1,31 -BRDA:1416,158,0,1 -BRDA:1416,158,1,1 -BRDA:1423,159,0,53 -BRDA:1423,159,1,30 -BRDA:1423,160,0,53 -BRDA:1423,160,1,26 -BRDA:1423,161,0,53 -BRDA:1423,161,1,4 -BRDA:1425,162,0,26 -BRDA:1425,162,1,27 -BRDA:1425,163,0,53 -BRDA:1425,163,1,27 -BRDA:1427,164,0,26 -BRDA:1427,164,1,0 -BRDA:1427,165,0,26 -BRDA:1427,165,1,0 -BRDA:1432,166,0,4 -BRDA:1432,166,1,23 -BRDA:1489,167,0,21 -BRDA:1489,167,1,54 -BRDA:1490,168,0,18 -BRDA:1490,168,1,57 -BRDA:1491,169,0,8 -BRDA:1491,169,1,10 -BRDA:1493,170,0,14 -BRDA:1493,170,1,43 -BRDA:1524,171,0,66 -BRDA:1524,171,1,45 -BRDA:1531,172,0,33 -BRDA:1531,172,1,10 -BRDA:1531,173,0,43 -BRDA:1531,173,1,36 -BRDA:1531,173,2,33 -BRDA:1534,174,0,18 -BRDA:1534,174,1,15 -BRDA:1538,175,0,7 -BRDA:1538,175,1,3 -BRDA:1538,176,0,10 -BRDA:1538,176,1,7 -BRDA:1565,177,0,23 -BRDA:1565,177,1,0 -BRDA:1569,178,0,2 -BRDA:1569,178,1,7 -BRDA:1569,179,0,9 -BRDA:1569,179,1,5 -BRDA:1569,179,2,2 -BRDA:1574,180,0,2 -BRDA:1574,180,1,5 -BRDA:1575,181,0,2 -BRDA:1575,181,1,3 -BRF:384 -BRH:384 -end_of_record diff --git a/esm.js b/esm.js new file mode 100644 index 00000000..1ded632c --- /dev/null +++ b/esm.js @@ -0,0 +1,3 @@ +/*! (c) Andrea Giammarchi (ISC) */var hyperHTML=function(N){"use strict";var t={};try{t.WeakMap=WeakMap}catch(e){t.WeakMap=function(t,e){var n=e.defineProperty,r=e.hasOwnProperty,i=a.prototype;return i.delete=function(e){return this.has(e)&&delete e[this._]},i.get=function(e){return this.has(e)?e[this._]:void 0},i.has=function(e){return r.call(e,this._)},i.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},a;function a(e){n(this,"_",{value:"_@ungap/weakmap"+t++}),e&&e.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var s=t.WeakMap,i={};try{i.WeakSet=WeakSet}catch(e){!function(e,t){var n=r.prototype;function r(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},i.WeakSet=r}(Math.random(),Object.defineProperty)}function m(e,t,n,r,i,a){for(var o=("selectedIndex"in t),u=o;ro;)--c;l=u+r-c;var m=Array(l),y=s[c];for(--n;y;){for(var b=y.newi,w=y.oldi;b>>0;n"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=H(O),n=H("div");return n.innerHTML=''+e+"",F(t,n.firstChild.childNodes),t}:M)(e)});function F(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function H(e){return e===O?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var I,z,V,Z,G,q,B,J,K,Q,U=(z="appendChild",V="cloneNode",Z="createTextNode",q=(G="importNode")in(I=N),(B=I.createDocumentFragment())[z](I[Z]("g")),B[z](I[Z]("")),(q?I[G](B,!0):B[V](!0)).childNodes.length<2?function e(t,n){for(var r=t[V](),i=t.childNodes||[],a=i.length,o=0;n&&o

',J[K].childNodes[0].getAttribute(Q)==Y)||(Y="_dt: "+Y.slice(1,-1)+";",ee=!0)}catch(e){}var te="\x3c!--"+Y+"--\x3e",ne=8,re=1,ie=3,ae=/^(?:style|textarea)$/i,oe=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;var ue=" \\f\\n\\r\\t",ce="[^"+ue+"\\/>\"'=]+",le="["+ue+"]+"+ce,se="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",fe="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ce.replace("\\/","")+"))?)",he=new RegExp(se+le+fe+"+)(["+ue+"]*/?>)","g"),de=new RegExp(se+le+fe+"*)(["+ue+"]*/>)","g"),ve=new RegExp("("+le+"\\s*=\\s*)(['\"]?)"+te+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(ve,ge)+r}function ge(e,t,n){return t+(n||'"')+Y+(n||'"')}function me(e,t,n){return oe.test(t)?e:"<"+t+n+">"}var ye=ee?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort(function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1})}:function(e,t){return t.slice.call(e,0)};function be(e,t,n,r){for(var i=e.childNodes,a=i.length,o=0;o { + wm.set(id, component); + return component; + }; + const get = (Class, info, context, id) => { + const relation = info.get(Class) || relate(Class, info); + switch (typeof id) { + case 'object': + case 'function': + const wm = relation.w || (relation.w = new WeakMap); + return wm.get(id) || createEntry(wm, id, new Class(context)); + default: + const sm = relation.p || (relation.p = create(null)); + return sm[id] || (sm[id] = new Class(context)); + } + }; + const relate = (Class, info) => { + const relation = {w: null, p: null}; + info.set(Class, relation); + return relation; + }; + const set = context => { + const info = new Map; + children.set(context, info); + return info; + }; + // The Component Class + Object.defineProperties( + Component, + { + // Component.for(context[, id]) is a convenient way + // to automatically relate data/context to children components + // If not created yet, the new Component(context) is weakly stored + // and after that same instance would always be returned. + for: { + configurable: true, + value(context, id) { + return get( + this, + children.get(context) || set(context), + context, + id == null ? + 'default' : id + ); + } + } + } + ); + Object.defineProperties( + Component.prototype, + { + // all events are handled with the component as context + handleEvent: {value(e) { + const ct = e.currentTarget; + this[ + ('getAttribute' in ct && ct.getAttribute('data-call')) || + ('on' + e.type) + ](e); + }}, + // components will lazily define html or svg properties + // as soon as these are invoked within the .render() method + // Such render() method is not provided by the base class + // but it must be available through the Component extend. + // Declared components could implement a + // render(props) method too and use props as needed. + html: lazyGetter('html', content), + svg: lazyGetter('svg', content), + // the state is a very basic/simple mechanism inspired by Preact + state: lazyGetter('state', function () { return this.defaultState; }), + // it is possible to define a default state that'd be always an object otherwise + defaultState: {get() { return {}; }}, + // dispatch a bubbling, cancelable, custom event + // through the first known/available node + dispatch: {value(type, detail) { + const {_wire$} = this; + if (_wire$) { + const event = new CustomEvent(type, { + bubbles: true, + cancelable: true, + detail + }); + event.component = this; + return (_wire$.dispatchEvent ? + _wire$ : + _wire$.firstChild + ).dispatchEvent(event); + } + return false; + }}, + // setting some property state through a new object + // or a callback, triggers also automatically a render + // unless explicitly specified to not do so (render === false) + setState: {value(state, render) { + const target = this.state; + const source = typeof state === 'function' ? state.call(this, target) : state; + for (const key in source) target[key] = source[key]; + if (render !== false) + this.render(); + return this; + }} + } + ); +} + +// instead of a secret key I could've used a WeakMap +// However, attaching a property directly will result +// into better performance with thousands of components +// hanging around, and less memory pressure caused by the WeakMap const lazyGetter = (type, fn) => { const secret = '_' + type + '$'; return { get() { - return this[secret] || (this[type] = fn.call(this, type)); + return this[secret] || setValue(this, secret, fn.call(this, type)); }, set(value) { - Object.defineProperty(this, secret, {configurable: true, value: value}); + setValue(this, secret, value); } }; }; -function Component() {} +// shortcut to set value on get or set(value) +const setValue = (self, secret, value) => + Object.defineProperty(self, secret, { + configurable: true, + value: typeof value === 'function' ? + function () { + return (self._wire$ = value.apply(this, arguments)); + } : + value + })[secret] +; + Object.defineProperties( Component.prototype, { - // same as HyperHTMLElement handleEvent - handleEvent: {value(e) { - // both IE < 11 and JSDOM lack dataset - const ct = e.currentTarget; - this[ - ('getAttribute' in ct && ct.getAttribute('data-call')) || - ('on' + e.type) - ](e); - }}, - // returns its own HTML wire or create it once on comp.render() - html: lazyGetter('html', wire.content), - // returns its own SVG wire or create it once on comp.render() - svg: lazyGetter('svg', wire.content), - // same as HyperHTMLElement state - state: lazyGetter('state', function () { return this.defaultState; }), - // same as HyperHTMLElement get defaultState - defaultState: {get() { return {}; }}, - // same as HyperHTMLElement setState - setState: {value(state) { - const target = this.state; - const source = typeof state === 'function' ? state.call(this, target) : state; - for (const key in source) target[key] = source[key]; - this.render(); - }} - // the render must be defined when extending hyper.Component - // the render **must** return either comp.html or comp.svg wire - // render() { return this.html`

that's it

`; } + // used to distinguish better than instanceof + ELEMENT_NODE: {value: 1}, + nodeType: {value: -1} } ); diff --git a/esm/classes/Path.js b/esm/classes/Path.js deleted file mode 100644 index 9ecdb34d..00000000 --- a/esm/classes/Path.js +++ /dev/null @@ -1,43 +0,0 @@ -import { - ATTRIBUTE_NODE, - COMMENT_NODE, - DOCUMENT_FRAGMENT_NODE, - ELEMENT_NODE -} from '../shared/constants.js'; - -import {children} from '../shared/utils.js'; - -const createPath = node => { - const path = []; - let parentNode; - switch (node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - parentNode = node; - break; - case COMMENT_NODE: - parentNode = node.parentNode; - path.unshift( - 'childNodes', - path.indexOf.call(parentNode.childNodes, node) - ); - break; - case ATTRIBUTE_NODE: - default: // jsdom here does not provide a nodeType 2 ... - parentNode = node.ownerElement; - path.unshift('attributes', node.name); - break; - } - for ( - node = parentNode; - (parentNode = parentNode.parentNode); - node = parentNode - ) { - path.unshift('children', path.indexOf.call(children(parentNode), node)); - } - return path; -}; - -export default function Path(type, node, name) { - return {type, name, path: createPath(node)}; -} \ No newline at end of file diff --git a/esm/hyper/render.js b/esm/hyper/render.js new file mode 100644 index 00000000..b3c4c863 --- /dev/null +++ b/esm/hyper/render.js @@ -0,0 +1,38 @@ +import WeakMap from '@ungap/weakmap'; +import tta from '@ungap/template-tag-arguments'; + +import {OWNER_SVG_ELEMENT} from '../shared/constants.js'; +import {Tagger} from '../objects/Updates.js'; + +// a weak collection of contexts that +// are already known to hyperHTML +const bewitched = new WeakMap; + +// better known as hyper.bind(node), the render is +// the main tag function in charge of fully upgrading +// or simply updating, contexts used as hyperHTML targets. +// The `this` context is either a regular DOM node or a fragment. +function render() { + const wicked = bewitched.get(this); + const args = tta.apply(null, arguments); + if (wicked && wicked.template === args[0]) { + wicked.tagger.apply(null, args); + } else { + upgrade.apply(this, args); + } + return this; +} + +// an upgrade is in charge of collecting template info, +// parse it once, if unknown, to map all interpolations +// as single DOM callbacks, relate such template +// to the current context, and render it after cleaning the context up +function upgrade(template) { + const type = OWNER_SVG_ELEMENT in this ? 'svg' : 'html'; + const tagger = new Tagger(type); + bewitched.set(this, {tagger, template: template}); + this.textContent = ''; + this.appendChild(tagger.apply(null, arguments)); +} + +export default render; diff --git a/esm/hyper/wire.js b/esm/hyper/wire.js index 68ffff5a..3911fbc7 100644 --- a/esm/hyper/wire.js +++ b/esm/hyper/wire.js @@ -1,3 +1,82 @@ -const wire = {}; +import WeakMap from '@ungap/weakmap'; +import tta from '@ungap/template-tag-arguments'; +import Wire from 'hyperhtml-wire'; + +import {Tagger} from '../objects/Updates.js'; + +// all wires used per each context +const wires = new WeakMap; + +// A wire is a callback used as tag function +// to lazily relate a generic object to a template literal. +// hyper.wire(user)`
${user.name}
`; => the div#user +// This provides the ability to have a unique DOM structure +// related to a unique JS object through a reusable template literal. +// A wire can specify a type, as svg or html, and also an id +// via html:id or :id convention. Such :id allows same JS objects +// to be associated to different DOM structures accordingly with +// the used template literal without losing previously rendered parts. +const wire = (obj, type) => obj == null ? + content(type || 'html') : + weakly(obj, type || 'html'); + +// A wire content is a virtual reference to one or more nodes. +// It's represented by either a DOM node, or an Array. +// In both cases, the wire content role is to simply update +// all nodes through the list of related callbacks. +// In few words, a wire content is like an invisible parent node +// in charge of updating its content like a bound element would do. +const content = type => { + let wire, tagger, template; + return function () { + const args = tta.apply(null, arguments); + if (template !== args[0]) { + template = args[0]; + tagger = new Tagger(type); + wire = wireContent(tagger.apply(tagger, args)); + } else { + tagger.apply(tagger, args); + } + return wire; + }; +}; + +// wires are weakly created through objects. +// Each object can have multiple wires associated +// and this is thanks to the type + :id feature. +const weakly = (obj, type) => { + const i = type.indexOf(':'); + let wire = wires.get(obj); + let id = type; + if (-1 < i) { + id = type.slice(i + 1); + type = type.slice(0, i) || 'html'; + } + if (!wire) + wires.set(obj, wire = {}); + return wire[id] || (wire[id] = content(type)); +}; + +// A document fragment loses its nodes +// as soon as it is appended into another node. +// This has the undesired effect of losing wired content +// on a second render call, because (by then) the fragment would be empty: +// no longer providing access to those sub-nodes that ultimately need to +// stay associated with the original interpolation. +// To prevent hyperHTML from forgetting about a fragment's sub-nodes, +// fragments are instead returned as an Array of nodes or, if there's only one entry, +// as a single referenced node which, unlike fragments, will indeed persist +// wire content throughout multiple renderings. +// The initial fragment, at this point, would be used as unique reference to this +// array of nodes or to this single referenced node. +const wireContent = node => { + const childNodes = node.childNodes; + const {length} = childNodes; + return length === 1 ? + childNodes[0] : + (length ? new Wire(childNodes) : node); +}; + +export { content, weakly }; export default wire; diff --git a/esm/index.d.ts b/esm/index.d.ts new file mode 100644 index 00000000..02ce463a --- /dev/null +++ b/esm/index.d.ts @@ -0,0 +1,3 @@ +import hyper from ".."; +export * from '..'; +export default hyper; diff --git a/esm/index.js b/esm/index.js new file mode 100644 index 00000000..254708a6 --- /dev/null +++ b/esm/index.js @@ -0,0 +1,66 @@ +/*! (c) Andrea Giammarchi (ISC) */ +import WeakMap from '@ungap/weakmap'; +import WeakSet from '@ungap/essential-weakset'; + +import diff from 'domdiff'; +import Component, {setup} from './classes/Component.js'; +import Intent from './objects/Intent.js'; +import {observe, Tagger} from './objects/Updates.js'; +import wire, {content, weakly} from './hyper/wire.js'; +import render from './hyper/render.js'; + +// all functions are self bound to the right context +// you can do the following +// const {bind, wire} = hyperHTML; +// and use them right away: bind(node)`hello!`; +const bind = context => render.bind(context); +const define = Intent.define; +const tagger = Tagger.prototype; + +hyper.Component = Component; +hyper.bind = bind; +hyper.define = define; +hyper.diff = diff; +hyper.hyper = hyper; +hyper.observe = observe; +hyper.tagger = tagger; +hyper.wire = wire; + +// exported as shared utils +// for projects based on hyperHTML +// that don't necessarily need upfront polyfills +// i.e. those still targeting IE +hyper._ = { + WeakMap, + WeakSet +}; + +// the wire content is the lazy defined +// html or svg property of each hyper.Component +setup(content); + +// everything is exported directly or through the +// hyperHTML callback, when used as top level script +export {Component, bind, define, diff, hyper, observe, tagger, wire}; + +// by default, hyperHTML is a smart function +// that "magically" understands what's the best +// thing to do with passed arguments +export default function hyper(HTML) { + return arguments.length < 2 ? + (HTML == null ? + content('html') : + (typeof HTML === 'string' ? + hyper.wire(null, HTML) : + ('raw' in HTML ? + content('html')(HTML) : + ('nodeType' in HTML ? + hyper.bind(HTML) : + weakly(HTML, 'html') + ) + ) + )) : + ('raw' in HTML ? + content('html') : hyper.wire + ).apply(null, arguments); +} diff --git a/esm/main.js b/esm/main.js deleted file mode 100644 index c43c3a4d..00000000 --- a/esm/main.js +++ /dev/null @@ -1,6 +0,0 @@ -import './classes/Aura.js'; -import './classes/Component.js'; -import './classes/Path.js'; - -const hyper = function () {}; -export default hyper; diff --git a/esm/objects/Intent.js b/esm/objects/Intent.js new file mode 100644 index 00000000..a18dab89 --- /dev/null +++ b/esm/objects/Intent.js @@ -0,0 +1,39 @@ +const attributes = {}; +const intents = {}; +const keys = []; +const hasOwnProperty = intents.hasOwnProperty; + +let length = 0; + +export default { + + // used to invoke right away hyper:attributes + attributes, + + // hyperHTML.define('intent', (object, update) => {...}) + // can be used to define a third parts update mechanism + // when every other known mechanism failed. + // hyper.define('user', info => info.name); + // hyper(node)`

${{user}}

`; + define: (intent, callback) => { + if (intent.indexOf('-') < 0) { + if (!(intent in intents)) { + length = keys.push(intent); + } + intents[intent] = callback; + } else { + attributes[intent] = callback; + } + }, + + // this method is used internally as last resort + // to retrieve a value out of an object + invoke: (object, callback) => { + for (let i = 0; i < length; i++) { + let key = keys[i]; + if (hasOwnProperty.call(object, key)) { + return intents[key](object[key], callback); + } + } + } +}; diff --git a/esm/objects/Updates.js b/esm/objects/Updates.js new file mode 100644 index 00000000..103b45ff --- /dev/null +++ b/esm/objects/Updates.js @@ -0,0 +1,377 @@ +import CustomEvent from '@ungap/custom-event'; +import WeakSet from '@ungap/essential-weakset'; +import isArray from '@ungap/is-array'; +import createContent from '@ungap/create-content'; + +import disconnected from 'disconnected'; +import domdiff from 'domdiff'; +import domtagger from 'domtagger'; +import hyperStyle from 'hyperhtml-style'; +import Wire from 'hyperhtml-wire'; + +import { + CONNECTED, DISCONNECTED, + DOCUMENT_FRAGMENT_NODE, + OWNER_SVG_ELEMENT +} from '../shared/constants.js'; + +import Component from '../classes/Component.js'; +import Intent from './Intent.js'; + +const componentType = Component.prototype.nodeType; +const wireType = Wire.prototype.nodeType; + +const observe = disconnected({Event: CustomEvent, WeakSet}); + +export {Tagger, observe}; + +// returns an intent to explicitly inject content as html +const asHTML = html => ({html}); + +// returns nodes from wires and components +const asNode = (item, i) => { + switch (item.nodeType) { + case wireType: + // in the Wire case, the content can be + // removed, post-pended, inserted, or pre-pended and + // all these cases are handled by domdiff already + /* istanbul ignore next */ + return (1 / i) < 0 ? + (i ? item.remove(true) : item.lastChild) : + (i ? item.valueOf(true) : item.firstChild); + case componentType: + return asNode(item.render(), i); + default: + return item; + } +} + +// returns true if domdiff can handle the value +const canDiff = value => 'ELEMENT_NODE' in value; + +// borrowed from uhandlers +// https://github.com/WebReflection/uhandlers +const booleanSetter = (node, key, oldValue) => newValue => { + if (oldValue !== !!newValue) { + if ((oldValue = !!newValue)) + node.setAttribute(key, ''); + else + node.removeAttribute(key); + } +}; + +const hyperSetter = (node, name, svg) => svg ? + value => { + try { + node[name] = value; + } + catch (nope) { + node.setAttribute(name, value); + } + } : + value => { + node[name] = value; + }; + +// when a Promise is used as interpolation value +// its result must be parsed once resolved. +// This callback is in charge of understanding what to do +// with a returned value once the promise is resolved. +const invokeAtDistance = (value, callback) => { + callback(value.placeholder); + if ('text' in value) { + Promise.resolve(value.text).then(String).then(callback); + } else if ('any' in value) { + Promise.resolve(value.any).then(callback); + } else if ('html' in value) { + Promise.resolve(value.html).then(asHTML).then(callback); + } else { + Promise.resolve(Intent.invoke(value, callback)).then(callback); + } +}; + +// quick and dirty way to check for Promise/ish values +const isPromise_ish = value => value != null && 'then' in value; + +// list of attributes that should not be directly assigned +const readOnly = /^(?:form|list)$/i; + +// reused every slice time +const slice = [].slice; + +// simplifies text node creation +const text = (node, text) => node.ownerDocument.createTextNode(text); + +function Tagger(type) { + this.type = type; + return domtagger(this); +} + +Tagger.prototype = { + + // there are four kind of attributes, and related behavior: + // * events, with a name starting with `on`, to add/remove event listeners + // * special, with a name present in their inherited prototype, accessed directly + // * regular, accessed through get/setAttribute standard DOM methods + // * style, the only regular attribute that also accepts an object as value + // so that you can style=${{width: 120}}. In this case, the behavior has been + // fully inspired by Preact library and its simplicity. + attribute(node, name, original) { + const isSVG = OWNER_SVG_ELEMENT in node; + let oldValue; + // if the attribute is the style one + // handle it differently from others + if (name === 'style') + return hyperStyle(node, original, isSVG); + // direct accessors for and friends + else if (name.slice(0, 1) === '.') + return hyperSetter(node, name.slice(1), isSVG); + // boolean accessors for and friends + else if (name.slice(0, 1) === '?') + return booleanSetter(node, name.slice(1)); + // the name is an event one, + // add/remove event listeners accordingly + else if (/^on/.test(name)) { + let type = name.slice(2); + if (type === CONNECTED || type === DISCONNECTED) { + observe(node); + } + else if (name.toLowerCase() + in node) { + type = type.toLowerCase(); + } + return newValue => { + if (oldValue !== newValue) { + if (oldValue) + node.removeEventListener(type, oldValue, false); + oldValue = newValue; + if (newValue) + node.addEventListener(type, newValue, false); + } + }; + } + // the attribute is special ('value' in input) + // and it's not SVG *or* the name is exactly data, + // in this case assign the value directly + else if ( + name === 'data' || + (!isSVG && name in node && !readOnly.test(name)) + ) { + return newValue => { + if (oldValue !== newValue) { + oldValue = newValue; + if (node[name] !== newValue && newValue == null) { + // cleanup on null to avoid silly IE/Edge bug + node[name] = ''; + node.removeAttribute(name); + } + else + node[name] = newValue; + } + }; + } + else if (name in Intent.attributes) { + oldValue; + return any => { + const newValue = Intent.attributes[name](node, any); + if (oldValue !== newValue) { + oldValue = newValue; + if (newValue == null) + node.removeAttribute(name); + else + node.setAttribute(name, newValue); + } + }; + } + // in every other case, use the attribute node as it is + // update only the value, set it as node only when/if needed + else { + let owner = false; + const attribute = original.cloneNode(true); + return newValue => { + if (oldValue !== newValue) { + oldValue = newValue; + if (attribute.value !== newValue) { + if (newValue == null) { + if (owner) { + owner = false; + node.removeAttributeNode(attribute); + } + attribute.value = newValue; + } else { + attribute.value = newValue; + if (!owner) { + owner = true; + node.setAttributeNode(attribute); + } + } + } + } + }; + } + }, + + // in a hyper(node)`
${content}
` case + // everything could happen: + // * it's a JS primitive, stored as text + // * it's null or undefined, the node should be cleaned + // * it's a component, update the content by rendering it + // * it's a promise, update the content once resolved + // * it's an explicit intent, perform the desired operation + // * it's an Array, resolve all values if Promises and/or + // update the node with the resulting list of content + any(node, childNodes) { + const diffOptions = {node: asNode, before: node}; + const nodeType = OWNER_SVG_ELEMENT in node ? /* istanbul ignore next */ 'svg' : 'html'; + let fastPath = false; + let oldValue; + const anyContent = value => { + switch (typeof value) { + case 'string': + case 'number': + case 'boolean': + if (fastPath) { + if (oldValue !== value) { + oldValue = value; + childNodes[0].textContent = value; + } + } else { + fastPath = true; + oldValue = value; + childNodes = domdiff( + node.parentNode, + childNodes, + [text(node, value)], + diffOptions + ); + } + break; + case 'function': + anyContent(value(node)); + break; + case 'object': + case 'undefined': + if (value == null) { + fastPath = false; + childNodes = domdiff( + node.parentNode, + childNodes, + [], + diffOptions + ); + break; + } + default: + fastPath = false; + oldValue = value; + if (isArray(value)) { + if (value.length === 0) { + if (childNodes.length) { + childNodes = domdiff( + node.parentNode, + childNodes, + [], + diffOptions + ); + } + } else { + switch (typeof value[0]) { + case 'string': + case 'number': + case 'boolean': + anyContent({html: value}); + break; + case 'object': + if (isArray(value[0])) { + value = value.concat.apply([], value); + } + if (isPromise_ish(value[0])) { + Promise.all(value).then(anyContent); + break; + } + default: + childNodes = domdiff( + node.parentNode, + childNodes, + value, + diffOptions + ); + break; + } + } + } else if (canDiff(value)) { + childNodes = domdiff( + node.parentNode, + childNodes, + value.nodeType === DOCUMENT_FRAGMENT_NODE ? + slice.call(value.childNodes) : + [value], + diffOptions + ); + } else if (isPromise_ish(value)) { + value.then(anyContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, anyContent); + } else if ('text' in value) { + anyContent(String(value.text)); + } else if ('any' in value) { + anyContent(value.any); + } else if ('html' in value) { + childNodes = domdiff( + node.parentNode, + childNodes, + slice.call( + createContent( + [].concat(value.html).join(''), + nodeType + ).childNodes + ), + diffOptions + ); + } else if ('length' in value) { + anyContent(slice.call(value)); + } else { + anyContent(Intent.invoke(value, anyContent)); + } + break; + } + }; + return anyContent; + }, + + // style or textareas don't accept HTML as content + // it's pointless to transform or analyze anything + // different from text there but it's worth checking + // for possible defined intents. + text(node) { + let oldValue; + const textContent = value => { + if (oldValue !== value) { + oldValue = value; + const type = typeof value; + if (type === 'object' && value) { + if (isPromise_ish(value)) { + value.then(textContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, textContent); + } else if ('text' in value) { + textContent(String(value.text)); + } else if ('any' in value) { + textContent(value.any); + } else if ('html' in value) { + textContent([].concat(value.html).join('')); + } else if ('length' in value) { + textContent(slice.call(value).join('')); + } else { + textContent(Intent.invoke(value, textContent)); + } + } else if (type === 'function') { + textContent(value(node)); + } else { + node.textContent = value == null ? '' : value; + } + } + }; + return textContent; + } +}; diff --git a/esm/shared/constants.js b/esm/shared/constants.js index 34eeb4c0..667b8e9d 100644 --- a/esm/shared/constants.js +++ b/esm/shared/constants.js @@ -1,21 +1,12 @@ -// Node.CONSTANTS (not every engine has Node) +// Node.CONSTANTS +// 'cause some engine has no global Node defined +// (i.e. Node, NativeScript, basicHTML ... ) export const ELEMENT_NODE = 1; -export const ATTRIBUTE_NODE = 2; -export const TEXT_NODE = 3; -export const COMMENT_NODE = 8; export const DOCUMENT_FRAGMENT_NODE = 11; // SVG related constants export const OWNER_SVG_ELEMENT = 'ownerSVGElement'; -export const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Custom Elements / MutationObserver constants export const CONNECTED = 'connected'; export const DISCONNECTED = 'dis' + CONNECTED; - -// hyperHTML related constants -export const SHOULD_USE_ATTRIBUTE = /^style$/i; -export const SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i; -export const EXPANDO = '_hyper: '; -export const UID = EXPANDO + ((Math.random() * new Date) | 0) + ';'; -export const UIDC = ''; \ No newline at end of file diff --git a/esm/shared/easy-dom.js b/esm/shared/easy-dom.js deleted file mode 100644 index 7516ec21..00000000 --- a/esm/shared/easy-dom.js +++ /dev/null @@ -1,4 +0,0 @@ -export const create = (node, type) => doc(node).createElement(type); -export const doc = node => node.ownerDocument || node; -export const fragment = node => doc(node).createDocumentFragment(); -export const text = (node, text) => doc(node).createTextNode(text); diff --git a/esm/shared/features-detection.js b/esm/shared/features-detection.js deleted file mode 100644 index 1d5c3cf2..00000000 --- a/esm/shared/features-detection.js +++ /dev/null @@ -1,27 +0,0 @@ -import {create, fragment, text} from './easy-dom.js'; - -const testFragment = fragment(document); - -// DOM4 node.append(...many) -export const hasAppend = 'append' in testFragment; - -// beside IE, old WebKit browsers don't have `children` in DocumentFragment -export const hasChildren = 'children' in testFragment; - -// detect old browsers without HTMLTemplateElement content support -export const hasContent = 'content' in create(document, 'template'); - -// If attributes order is shuffled, threat the browser differently -// Usually this is a well known IE/Edge only issue but some older FF does the same. -const p = create(document, 'p'); -p.innerHTML = ''; -export const hasDoomedAttributes = /class/i.test(p.firstChild.attributes[0].name); - -// IE 11 has problems with cloning templates: it "forgets" empty childNodes -testFragment.appendChild(text(testFragment, 'g')); -testFragment.appendChild(text(testFragment, '')); -export const hasDoomedCloneNode = testFragment.cloneNode(true).childNodes.length === 1; - -// old browsers need to fallback to cloneNode -// Custom Elements V0 and V1 will work polyfilled -export const hasImportNode = 'importNode' in document; diff --git a/esm/shared/poorlyfills.js b/esm/shared/poorlyfills.js deleted file mode 100644 index 75060a06..00000000 --- a/esm/shared/poorlyfills.js +++ /dev/null @@ -1,56 +0,0 @@ -import {UID} from './constants.js'; - -let Event = global.Event; -try { - new Event('Event'); -} catch(o_O) { - Event = function (type) { - const e = document.createEvent('Event'); - e.initEvent(type, false, false); - return e; - }; -} -export {Event}; - -export const Map = global.Map || function Map() { - const keys = [], values = []; - return { - get(obj) { - return values[keys.indexOf(obj)]; - }, - set(obj, value) { - values[keys.push(obj) - 1] = value; - } - }; -}; - -export const WeakMap = global.WeakMap || function WeakMap() { - return { - delete(obj) { delete obj[UID]; }, - get(obj) { return obj[UID]; }, - has(obj) { return UID in obj; }, - set(obj, value) { - Object.defineProperty(obj, UID, { - configurable: true, - value - }); - } - }; -}; - -export const WeakSet = global.WeakSet || function WeakSet() { - const wm = new WeakMap; - return { - add(obj) { wm.set(obj, true); }, - has(obj) { return wm.get(obj) === true; } - }; -}; - -// TODO: which browser needs these partial polyfills here? -export const isArray = Array.isArray || (toString => - arr => toString.call(arr) === '[object Array]' -)({}.toString); - -export const trim = UID.trim || function () { - return this.replace(/^\s+|\s+$/g, ''); -}; diff --git a/esm/shared/utils.js b/esm/shared/utils.js deleted file mode 100644 index 9f92617a..00000000 --- a/esm/shared/utils.js +++ /dev/null @@ -1,138 +0,0 @@ -import {ELEMENT_NODE, SVG_NAMESPACE, UID, UIDC} from './constants.js'; -import {hasAppend, hasChildren, hasContent} from './features-detection.js'; -import {create, doc, fragment} from './easy-dom.js'; - -const slice = [].slice; - -// appends an array of nodes -// to a generic node/fragment -export const append = hasAppend ? - (node, childNodes) => { - node.append.apply(node, childNodes); - } : - (node, childNodes) => { - const length = childNodes.length; - for (let i = 0; i < length; i++) { - node.appendChild(childNodes[i]); - } - }; - -// given a node/fragment, returns its children -export const children = hasChildren ? - node => node.children : - node => { - const children = []; - const childNodes = node.childNodes; - const length = childNodes.length; - for (let j = 0, i = 0; i < length; i++) { - const child = childNodes[i]; - if (child.nodeType === ELEMENT_NODE) { - children[j++] = child; - } - } - return children; - }; - -// remove comments parts from attributes to avoid issues -// with either old browsers or SVG elements -export const cleanAttributes = html => html.replace(no, comments); -const attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+'; -const no = new RegExp( - '(<[a-z]+[a-z0-9:_-]*)((?:' + - attrName + - '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*/?>)', - 'gi' -); -const findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi'); -const comments = ($0, $1, $2, $3) => - $1 + $2.replace(findAttributes, replaceAttributes) + $3; -const replaceAttributes = ($0, $1, $2) => $1 + ($2 || '"') + UID + ($2 || '"'); - -// given a node/fragment and a path -// returns the target path, if any -export const node = hasChildren ? - (parentNode, path) => { - const length = path.length; - for (let i = 0; i < length; i++) { - parentNode = parentNode[path[i++]][path[i]]; - } - return parentNode; - } : - (parentNode, path) => { - const length = path.length; - for (let i = 0; i < length; i++) { - let name = path[i++]; - parentNode = name === 'children' ? - children(parentNode)[path[i]] : - parentNode[name][path[i]]; - } - return parentNode; - }; - -// lazy evaluated -export const unique = template => TL(template); -// TL returns a unique version of the template -// it needs lazy feature detection -// (cannot trust literals with transpiled code) -let TL = template => { - if ( - // TypeScript template literals are not standard - template.propertyIsEnumerable('raw') || - ( - // Firefox < 55 has not standard implementation neither - /Firefox\/(\d+)/.test((global.navigator || {}).userAgent) && - parseFloat(RegExp.$1) < 55 - ) - ) { - // in these cases, address templates once - const templateObjects = {}; - // but always return the same template - TL = template => { - const key = '_' + template.join(UID); - return templateObjects[key] || ( - templateObjects[key] = template - ); - }; - } - else { - // make TL an identity like function - TL = template => template; - } - return TL(template); -}; - -export const HTMLFragment = hasContent ? - (node, html) => { - const container = create(node, 'template'); - container.innerHTML = html; - return container.content; - } : - (node, html) => { - const container = create(node, 'template'); - const content = fragment(node); - if (/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html)) { - const selector = RegExp.$1; - container.innerHTML = '' + html + '
'; - append(content, slice.call(container.querySelectorAll(selector))); - } else { - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - } - return content; - }; - -export const SVGFragment = hasContent ? - (node, html) => { - const content = fragment(node); - const container = doc(node).createElementNS(SVG_NAMESPACE, 'svg'); - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - return content; - } : - (node, html) => { - const content = fragment(node); - const container = create(node, 'div'); - container.innerHTML = '' + html + ''; - append(content, slice.call(container.firstChild.childNodes)); - return content; - }; diff --git a/hyperhtml.js b/hyperhtml.js deleted file mode 100644 index 4c2fb814..00000000 --- a/hyperhtml.js +++ /dev/null @@ -1,1410 +0,0 @@ -var hyperHTML = (function (globalDocument, majinbuu) {'use strict'; - - /*! (c) 2017 Andrea Giammarchi @WebReflection, (ISC) */ - - // --------------------------------------------- - // hyperHTML Public API - // --------------------------------------------- - - // The document must be swap-able at runtime. - // Needed by both basicHTML and nativeHTML - hyper.document = globalDocument; - - // friendly destructuring - hyper.hyper = hyper; - - function hyper(HTML) { - return arguments.length < 2 ? - (HTML == null ? - wireContent('html') : - (typeof HTML === 'string' ? - wire(null, HTML) : - ('raw' in HTML ? - wireContent('html')(HTML) : - ('nodeType' in HTML ? - bind(HTML) : - wireWeakly(HTML, 'html') - ) - ) - )) : - ('raw' in HTML ? - wireContent('html') : wire - ).apply(null, arguments); - } - - // hyper.adopt(el) ๐Ÿฃ - // import an already live DOM structure - // described as TL - hyper.adopt = function adopt(node) { - return function () { - notAdopting = false; - render.apply(node, arguments); - notAdopting = true; - return node; - }; - }; - - // hyper.bind(el) โšก๏ธ - // render TL inside a DOM node used as context - hyper.bind = bind; - function bind(context) { return render.bind(context); } - - // hyper.define('transformer', callback) ๐ŸŒ€ - hyper.define = function define(transformer, callback) { - if (!(transformer in transformers)) { - transformersKeys.push(transformer); - } - transformers[transformer] = callback; - // TODO: else throw ? console.warn ? who cares ? - }; - - // hyper.escape('') => '<text>' ๐Ÿƒ - hyper.escape = function escape(html) { - return html.replace(/[&<>'"]/g, fnEscape); - }; - - // hyper.wire(obj, 'type:ID') โžฐ - // relate a renderer to a generic object - hyper.wire = wire; - function wire(obj, type) { - return arguments.length < 1 ? - wireContent('html') : - (obj == null ? - wireContent(type || 'html') : - wireWeakly(obj, type || 'html') - ); - } - - // hyper.Component([initialState]) ๐Ÿป - // An overly-simplified Component class. - // For full Custom Elements support - // see HyperHTMLElement instead. - hyper.Component = Component; - function Component() {} - Object.defineProperties( - Component.prototype, - { - // same as HyperHTMLElement handleEvent - handleEvent: {value: function (e) { - // both IE < 11 and JSDOM lack dataset - var ct = e.currentTarget; - this[ - ('getAttribute' in ct && ct.getAttribute('data-call')) || - ('on' + e.type) - ](e); - }}, - // returns its own HTML wire or create it once on comp.render() - html: lazyGetter('html', wireContent), - // returns its own SVG wire or create it once on comp.render() - svg: lazyGetter('svg', wireContent), - // same as HyperHTMLElement state - state: lazyGetter('state', function () { return this.defaultState; }), - // same as HyperHTMLElement get defaultState - defaultState: {get: function () { return {}; }}, - // same as HyperHTMLElement setState - setState: {value: function (state) { - var target = this.state; - var source = typeof state === 'function' ? state.call(this, target) : state; - for (var key in source) target[key] = source[key]; - this.render(); - }} - // the render must be defined when extending hyper.Component - // the render **must** return either comp.html or comp.svg wire - // render() { return this.html`

that's it

`; } - } - ); - - // - - - - - - - - - - - - - - - - - - - - - - - - - // --------------------------------------------- - // Constants - // --------------------------------------------- - - // Node.CONSTANTS - // without assuming Node is globally available - // since this project is used on the backend too - var ELEMENT_NODE = 1; - var ATTRIBUTE_NODE = 2; - var TEXT_NODE = 3; - var COMMENT_NODE = 8; - var DOCUMENT_FRAGMENT_NODE = 11; - - // SVG related - var OWNER_SVG_ELEMENT = 'ownerSVGElement'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - - var SHOULD_USE_ATTRIBUTE = /^style$/i; - var SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i; - var EXPANDO = '_hyper: '; - var UID = EXPANDO + ((Math.random() * new Date) | 0) + ';'; - var UIDC = ''; - - // --------------------------------------------- - // DOM Manipulation - // --------------------------------------------- - - function Aura(node, childNodes) { - this.node = node; - this.childNodes = childNodes; - return majinbuu.aura(this, childNodes); - } - - Aura.prototype.splice = function splice(start) { - for (var - tmp, - ph = this.node, - cn = this.childNodes, - target = cn[start + (arguments[1] || 0)] || ph, - result = cn.splice.apply(cn, arguments), - pn = ph.parentNode, - i = 0, - length = result.length; - i < length; i++ - ) { - tmp = result[i]; - // TODO: this is not optimal (but necessary) - if (cn.indexOf(tmp) < 0) { - pn.removeChild(tmp); - } - } - i = 2; - length = arguments.length; - if (i < length) { - if ((length - i) === 1) { - tmp = arguments[i]; - } else { - tmp = createDocumentFragment(pn.ownerDocument); - while (i < length) { - tmp.appendChild(arguments[i++]); - } - } - pn.insertBefore(tmp, target); - } - return result; - }; - - // --------------------------------------------- - // hyperHTML Operations - // --------------------------------------------- - - // entry point for all TL => DOM operations - function render(template) { - var hyper = hypers.get(this); - if ( - !hyper || - hyper.template !== TL(template) - ) { - upgrade.apply(this, arguments); - } else { - update.apply(hyper.updates, arguments); - } - return this; - } - - // `
` - // `
` - // `
` - // `
` - function setAttribute(attribute, removeAttributes, name) { - var - node = attribute.ownerElement, - isData = name === 'data', - isEvent = !isData && /^on/.test(name), - isSpecial = isData || - (isSpecialAttribute(node, name) && - !SHOULD_USE_ATTRIBUTE.test(name)), - type = isEvent ? name.slice(2) : '', - noOwner = isSpecial || isEvent, - wontUpgrade = isSpecial && (isData || name in node), - oldValue, specialAttr, upgrade - ; - if (isEvent || wontUpgrade) { - removeAttributes.push(node, name); - if (isEvent) { - if (type === CONNECTED || type === DISCONNECTED) { - components.add(node); - } - else if (name.toLowerCase() in node) { - type = type.toLowerCase(); - } - } - } - if (isSpecial) { - if (!wontUpgrade) { - upgrade = toBeUpgraded.get(node); - if (!upgrade) { - upgrade = { - _: Object.create(null), - $: function () { - toBeUpgraded.delete(node); - for (var name in this._) { - this._[name].$(); - } - } - }; - toBeUpgraded.set(node, upgrade); - } - upgrade._[name] = { - _: null, - $: function () { - wontUpgrade = true; - specialAttr(this._); - } - }; - } - specialAttr = function specialAttr(newValue) { - if (wontUpgrade) { - if (oldValue !== newValue) { - oldValue = newValue; - // WebKit moves the cursor if input.value - // is set again, even if same value - if (node[name] !== newValue) { - // let the browser handle the case - // input.value = null; - // input.value; // '' - if (newValue == null) { - // reflect the null intent, - // do not pass undefined! - node[name] = null; - node.removeAttribute(name); - } else { - node[name] = newValue; - } - } - } - } else { - attribute.value = newValue; - upgrade._[name]._ = newValue; - if (name in node) upgrade.$(); - } - }; - } - return isEvent ? - function eventAttr(newValue) { - if (oldValue !== newValue) { - if (oldValue) node.removeEventListener(type, oldValue, false); - oldValue = newValue; - if (newValue) node.addEventListener(type, newValue, false); - } - } : - (isSpecial ? - specialAttr : - function normalAttr(newValue) { - if (oldValue !== newValue) { - oldValue = newValue; - // avoid triggering again attributeChangeCallback - // if the value was identical - if (attribute.value !== newValue) { - if (newValue == null) { - if (!noOwner) { - // TODO: should attribute.value = null here? - noOwner = true; - node.removeAttributeNode(attribute); - } - } else { - attribute.value = newValue; - if (noOwner) { - noOwner = false; - node.setAttributeNode(attribute); - } - } - } - } - } - ); - } - - // `` - function setTextContent(node) { - var oldValue; - return function (value) { - if (value !== oldValue) { - oldValue = value; - node.textContent = value; - } - }; - } - - // `

${'any'}

` - // `
  • a
  • ${'virtual'}
  • c
  • ` - function setAnyContent(node, childNodes, aura) { - var oldValue; - return function anyContent(value) { - switch (typeof value) { - case 'string': - case 'number': - case 'boolean': - var length = childNodes.length; - if ( - length === 1 && - childNodes[0].nodeType === TEXT_NODE - ) { - if (oldValue !== value) { - oldValue = value; - childNodes[0].textContent = value; - } - } else { - oldValue = value; - if (length) { - aura.splice(0, length, createText(node, value)); - } else { - childNodes[0] = node.parentNode.insertBefore( - createText(node, value), - node - ); - } - } - break; - case 'function': - anyContent(value(node.parentNode, childNodes, 0)); - break; - case 'object': - case 'undefined': - if (value == null) { - oldValue = value; - anyContent(''); - break; - } else if (value instanceof Component) { - value = value.render(); - } - default: - oldValue = value; - if (isArray(value)) { - var length = value.length; - if (length === 0) { - aura.splice(0); - } else { - switch (typeof value[0]) { - case 'string': - case 'number': - case 'boolean': - anyContent({html: value}); - break; - case 'function': - var parentNode = node.parentNode; - for (var i = 0; i < length; i++) { - value[i] = value[i](parentNode, childNodes, i); - } - anyContent(value.concat.apply([], value)); - break; - case 'object': - if (isArray(value[0])) { - value = value.concat.apply([], value); - } - if (isPromise_ish(value[0])) { - Promise.all(value).then(anyContent); - break; - } else { - for (var i = 0, length = value.length; i < length; i++) { - if (value[i] instanceof Component) { - value[i] = value[i].render(); - } - } - } - default: - optimist(aura, value); - break; - } - } - } else if (isNode_ish(value)) { - optimist( - aura, - value.nodeType === DOCUMENT_FRAGMENT_NODE ? - slice.call(value.childNodes) : - [value] - ); - } else if (isPromise_ish(value)) { - value.then(anyContent); - } else if ('placeholder' in value) { - invokeAtDistance(value, anyContent); - } else if ('text' in value) { - anyContent(String(value.text)); - } else if ('any' in value) { - anyContent(value.any); - } else if ('html' in value) { - var html = [].concat(value.html).join(''); - aura.splice(0); - var fragment = createFragment(node, html); - childNodes.push.apply(childNodes, fragment.childNodes); - node.parentNode.insertBefore(fragment, node); - } else if ('length' in value) { - anyContent(slice.call(value)); - } else { - anyContent(invokeTransformer(value, anyContent)); - } - break; - } - }; - } - - // --------------------------------------------- - // DOM Traversing - // --------------------------------------------- - - // look for attributes that contains the comment text - function attributesSeeker(node, paths, parts) { - for (var - name, realName, attrs, - attribute, - cache = Object.create(null), - attributes = node.attributes, - i = 0, length = attributes.length; - i < length; i++ - ) { - attribute = attributes[i]; - if (attribute.value === UID) { - name = attribute.name; - // this is an IE < 11 thing only - if (name in cache) { - // attributes with unrecognized values - // are duplicated, even if same attribute, across the node - // to fix it, you need to remove it - node.removeAttributeNode(attribute); - // put a value that won't (hopefully) bother IE - cache[name].value = ''; - // and place the node back - node.setAttributeNode(cache[name]); - // this will decrease attributes count by 1 - length--; - // so the loop should be decreased by 1 too - i--; - } else { - realName = parts.shift().replace(/^(?:|[\S\s]*?\s)(\S+?)=['"]?$/, '$1'); - attrs = node.attributes; - // fallback is needed in both jsdom - // and in not-so-standard browsers/engines - cache[name] = attrs[realName] || attrs[realName.toLowerCase()]; - paths.push(Path('attr', cache[name], realName)); - } - } - } - } - - // walk the fragment tree in search of comments - function hyperSeeker(node, paths, parts) { - for (var - child, - childNodes = node.childNodes, - length = childNodes.length, - i = 0; i < length; i++ - ) { - child = childNodes[i]; - switch (child.nodeType) { - case ELEMENT_NODE: - attributesSeeker(child, paths, parts); - hyperSeeker(child, paths, parts); - break; - case COMMENT_NODE: - if (child.textContent === UID) { - parts.shift(); - paths.push(Path('any', child)); - } - break; - case TEXT_NODE: - if ( - SHOULD_USE_TEXT_CONTENT.test(node.nodeName) && - trim.call(child.textContent) === UIDC - ) { - parts.shift(); - paths.push(Path('text', node)); - } - break; - } - } - } - - // --------------------------------------------- - // Features detection / ugly UA sniffs - // --------------------------------------------- - /* - var importNode = 'importNode' in globalDocument ? - function (doc, node) { - return doc.importNode(node, true); - } : - function (doc, node) { - return node; - }; - */ - - var featureFragment = createDocumentFragment(globalDocument); - - // Firefox < 55 has non standard template literals. - // https://bugzilla.mozilla.org/show_bug.cgi?id=1108941 - // TODO: is there any better way to feature detect this ? - var FF = typeof navigator === 'object' && - /Firefox\/(\d+)/.test(navigator.userAgent) && - parseFloat(RegExp.$1) < 55; - - // If attributes order is shuffled, threat the browser differently - // Usually this is a well known IE only limitation but some older FF does the same. - var IE = (function () { - var p = globalDocument.createElement('p'); - p.innerHTML = ''; - return /class/i.test(p.firstChild.attributes[0].name); - }()); - - - // beside IE, old WebKit browsers don't have `children` in DocumentFragment - var WK = !('children' in featureFragment); - - // both Firefox < 55 and TypeScript have issues with template literals - // this lazy defined callback should spot issues right away - // and in the best case scenario become a no-op - var TL = function (template) { - if (template.propertyIsEnumerable('raw') || FF) TL = unique; - else TL = function (t) { return t; }; - return TL(template); - }; - - // --------------------------------------------- - // Helpers - // --------------------------------------------- - - // used to convert childNodes to Array - var slice = [].slice; - - // used to sanitize html - var oEscape = { - '&': '&', - '<': '<', - '>': '>', - "'": ''', - '"': '"' - }; - function fnEscape(m) { - return oEscape[m]; - } - - // return content as html - function asHTML(html) { - return {html: html}; - } - - // return a single node or an Array or nodes - function createContent(node) { - for (var - child, - content = [], - childNodes = node.childNodes, - i = 0, - length = childNodes.length; - i < length; i++ - ) { - child = childNodes[i]; - if ( - child.nodeType === ELEMENT_NODE || - trim.call(child.textContent).length !== 0 - ) { - content.push(child); - } - } - return content.length === 1 ? content[0] : content; - } - - // just a minifier friendly indirection - function createDocumentFragment(document) { - return document.createDocumentFragment(); - } - - // given a node, inject some html and return - // the resulting template document fragment - function createFragment(node, html) { - return ( - OWNER_SVG_ELEMENT in node ? - createSVGFragment : - createHTMLFragment - )(node, html.replace(no, comments)); - } - - // create fragment for HTML - function createHTMLFragment(node, html) { - var fragment; - var document = node.ownerDocument; - var container = document.createElement( - // TODO: this is a work around for A-Frame V0 based components - // see: https://stackoverflow.com/questions/46797635/aframe-content-not-rendering-on-chrome-with-hyperhtml/46817370 - // TODO: the following RegExp breaks: https://github.com/WebReflection/hyperHTML/issues/135 - // /<([a-z][a-z0-9]*(?:-[a-z0-9]+)+)[\s\S]*?>[\s\S]*?<\/\1>/i.test(html) ? - /<(a-\w+)[\s\S]*?>[\s\S]*?<\/\1>/.test(html) ? - 'div' : 'template' - ); - // var container = document.createElement('template'); - var hasContent = 'content' in container; - var needsTableWrap = false; - if (!hasContent) { - // DO NOT MOVE THE FOLLOWING LINE ELSEWHERE - fragment = createDocumentFragment(document); - // (a jsdom + nodejs tests coverage gotcha) - - // el.innerHTML = ''; is not possible - // if the content is a partial internal table content - // it needs to be wrapped around once injected. - // HTMLTemplateElement does not suffer this issue. - needsTableWrap = /^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html); - } - if (needsTableWrap) { - // secure the RegExp.$1 result ASAP to avoid issues - // in case a non-browser DOM library uses RegExp internally - // when HTML content is injected (basicHTML / jsdom / others...) - var selector = RegExp.$1; - container.innerHTML = '' + html + '
    '; - appendNodes(fragment, slice.call(container.querySelectorAll(selector))); - } else { - container.innerHTML = html; - if (hasContent) { - fragment = container.content; - // fragment = importNode(document, container.content); - } else { - appendNodes(fragment, slice.call(container.childNodes)); - } - } - return fragment; - } - - // create a fragment for SVG - function createSVGFragment(node, html) { - var document = node.ownerDocument; - var fragment = createDocumentFragment(document); - if (IE || WK) { - var container = document.createElement('div'); - container.innerHTML = '' + html + ''; - appendNodes(fragment, slice.call(container.firstChild.childNodes)); - } else { - var container = document.createElementNS(SVG_NAMESPACE, 'svg'); - container.innerHTML = html; - appendNodes(fragment, slice.call(container.childNodes)); - } - return fragment; - } - - // given a node, it does what is says - function createText(node, text) { - return node.ownerDocument.createTextNode(text); - } - - // dispatch same event through a list of nodes - function dispatchAll(nodes, type) { - for (var - e, node, - isConnected = type === CONNECTED, - i = 0, length = nodes.length; - i < length; i++ - ) { - node = nodes[i]; - /* istanbul ignore else */ - if (node.nodeType === ELEMENT_NODE) { - e = dispatchTarget(node, isConnected, type, e); - } - } - } - - // per each inserted element, check initialization - function dispatchTarget(node, isConnected, type, e) { - /* istanbul ignore next */ - if (components.has(node)) { - node.dispatchEvent(e || (e = new $Event(type))); - } - else if (isConnected && toBeUpgraded.has(node)) { - toBeUpgraded.get(node).$(); - } - else { - for (var - nodes = getChildren(node), - i = 0, length = nodes.length; - i < length; i++ - ) { - e = dispatchTarget(nodes[i], isConnected, type, e); - } - } - return e; - } - - // returns current customElements reference - // compatible with basicHTML too - function getCEClass(node) { - var doc = hyper.document; - var ce = doc.customElements || doc.defaultView.customElements; - return ce && ce.get(node.nodeName.toLowerCase()); - } - - // verify that an attribute has - // a special meaning for the node - function isSpecialAttribute(node, name) { - var notSVG = !(OWNER_SVG_ELEMENT in node); - if (notSVG && /-/.test(node.nodeName)) { - var Class = getCEClass(node); - if (Class) node = Class.prototype; - } - return notSVG && name in node; - } - - // use a placeholder and resolve with the right callback - function invokeAtDistance(value, callback) { - callback(value.placeholder); - if ('text' in value) { - Promise.resolve(value.text).then(String).then(callback); - } else if ('any' in value) { - Promise.resolve(value.any).then(callback); - } else if ('html' in value) { - Promise.resolve(value.html).then(asHTML).then(callback); - } else { - Promise.resolve(invokeTransformer(value, callback)).then(callback); - } - } - - // last attempt to transform content - function invokeTransformer(object, callback) { - for (var key, i = 0, length = transformersKeys.length; i < length; i++) { - key = transformersKeys[i]; - if (object.hasOwnProperty(key)) { - return transformers[key](object[key], callback); - } - } - } - - // quick and dirty Node check - function isNode_ish(value) { - return 'ELEMENT_NODE' in value; - } - - // quick and dirty Promise check - function isPromise_ish(value) { - return value != null && 'then' in value; - } - - // return a descriptor that lazily initialize a property - // unless it hasn't be previously set directly - function lazyGetter(type, fn) { - var secret = '_' + type + '$'; - return { - get: function () { - return this[secret] || (this[type] = fn.call(this, type)); - }, - set: function (value) { - defineProperty(this, secret, {configurable: true, value: value}); - } - }; - } - - // uses majinbuu only if the two lists are different - function optimist(aura, value) { - var i = 0, length = aura.length; - if (value.length !== length) { - majinbuu(aura, value, hyper.MAX_LIST_SIZE); - } else { - for (; i < length--; i++) { - if (aura[length] !== value[length] || aura[i] !== value[i]) { - majinbuu(aura, value, hyper.MAX_LIST_SIZE); - return; - } - } - } - } - - // remove a list of [node, attribute] - function removeAttributeList(list) { - for (var i = 0, length = list.length; i < length; i++) { - list[i++].removeAttribute(list[i]); - } - } - - // specify the content to update - function setContent(info, target, removeAttributes, childNodes) { - var update; - switch (info.type) { - case 'any': - // TODO: don't pass the target, it shouldn't be needed - update = setAnyContent(target, childNodes, new Aura(target, childNodes)); - break; - case 'attr': - update = setAttribute(target, removeAttributes, info.name); - break; - case 'text': - update = setTextContent(target); - break; - } - return update; - } - - // used for common path creation. - function Path(type, node, name) { - return {type: type, path: createPath(node), name: name}; - } - - // --------------------------------------------- - // Hybrid Shims - // --------------------------------------------- - - var CONNECTED = 'connected'; - var DISCONNECTED = 'dis' + CONNECTED; - var $Event; - - try { - new Event(CONNECTED); - $Event = Event; - } catch(o_O) { - $Event = function (type) { - var e = hyper.document.createEvent('Event'); - e.initEvent(type, false, false); - return e; - }; - } - - try { - (new MutationObserver(function (records) { - for (var record, i = 0, length = records.length; i < length; i++) { - record = records[i]; - dispatchAll(record.removedNodes, DISCONNECTED); - dispatchAll(record.addedNodes, CONNECTED); - } - })).observe(globalDocument, {subtree: true, childList: true}); - } catch(o_O) { - globalDocument.addEventListener('DOMNodeInserted', function (e) { - dispatchAll([e.target], CONNECTED); - }, false); - globalDocument.addEventListener('DOMNodeRemoved', function (e) { - dispatchAll([e.target], DISCONNECTED); - }, false); - } - - // WeakMap with partial UID fallback - var $WeakMap = typeof WeakMap === typeof $WeakMap ? - function () { - // NOT A POLYFILL: simplified ad-hoc for this library cases - /* istanbul ignore next */ - return { - delete: function (obj) { delete obj[UID]; }, - get: function (obj) { return obj[UID]; }, - has: function (obj) { return UID in obj; }, - set: function (obj, value) { - Object.defineProperty(obj, UID, { - configurable: true, - value: value - }); - } - }; - } : - WeakMap; - - var $WeakSet = typeof WeakSet === typeof $WeakSet ? - function () { - var wm = new $WeakMap; - // NOT A POLYFILL: simplified ad-hoc for this library cases - /* istanbul ignore next */ - return { - add: function (obj) { wm.set(obj, true); }, - has: function (obj) { return wm.get(obj) === true; } - }; - } : - WeakSet; - - // Map with partial double Array fallback - var $Map = typeof Map === typeof $Map ? - function () { - var k = [], v = []; - return { - get: function (obj) { - return v[k.indexOf(obj)]; - }, - // being used with unique template literals - // there is never a case when a value is overwritten - // no need to check upfront for the indexOf - set: function (obj, value) { - v[k.push(obj) - 1] = value; - } - }; - } : - Map; - - // TODO: which browser needs these partial polyfills here? - - // BB7 and webOS need this - var isArray = Array.isArray || - (function () { - var toString = {}.toString; - // I once had an engine returning [array Array] - // and I've got scared since! - var s = toString.call([]); - return function (a) { - return toString.call(a) === s; - }; - }()); - - // older WebKit need this - var trim = EXPANDO.trim || - function () { return this.replace(/^\s+|\s+$/g, ''); }; - - // --------------------------------------------- - // Shared variables - // --------------------------------------------- - - // recycled defineProperty shortcut - var defineProperty = Object.defineProperty; - - // transformers registry - var transformers = {}; - var transformersKeys = []; - - // normalize Firefox issue with template literals - var templateObjects = {}, unique; - function unique(template) { - var key = '_' + template.join(UIDC); - return templateObjects[key] || - (templateObjects[key] = template); - } - - // use native .append(...childNodes) where available - var appendNodes = 'append' in featureFragment ? - function (node, childNodes) { - node.append.apply(node, childNodes); - } : - function appendNodes(node, childNodes) { - for (var - i = 0, - length = childNodes.length; - i < length; i++ - ) { - node.appendChild(childNodes[i]); - } - }; - - // returns children or retrieve them in IE/Edge - var getChildren = WK || IE ? - function (node) { - for (var - child, - children = [], - childNodes = node.childNodes, - j = 0, i = 0, length = childNodes.length; - i < length; i++ - ) { - child = childNodes[i]; - if (child.nodeType === ELEMENT_NODE) - children[j++] = child; - } - return children; - } : - function (node) { return node.children; }; - - // return the correct node walking through a path - // fixes IE/Edge issues with attributes and children (fixes old WebKit too) - var getNode = IE || WK ? - function (parentNode, path) { - for (var name, i = 0, length = path.length; i < length; i++) { - name = path[i++]; - switch (name) { - case 'children': - parentNode = getChildren(parentNode)[path[i]]; - break; - default: - parentNode = parentNode[name][path[i]]; - break; - } - } - return parentNode; - } : - function (parentNode, path) { - for (var i = 0, length = path.length; i < length; i++) { - parentNode = parentNode[path[i++]][path[i]]; - } - return parentNode; - }; - - // sanitizes interpolations as comments - var attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+'; - var no = new RegExp('(<[a-z]+[a-z0-9:_-]*)((?:' + attrName + '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*\/?>)', 'gi'); - var findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi'); - var comments = function ($0, $1, $2, $3) { - return $1 + $2.replace(findAttributes, replaceAttributes) + $3; - }; - - var replaceAttributes = function ($0, $1, $2) { - return $1 + ($2 || '"') + UID + ($2 || '"'); - }; - - // list of components with connected/disconnected - var components = new $WeakSet; - - // [element] = {template, updates}; - var hypers = new $WeakMap; - - // [element] = {template, updates}; - var wires = new $WeakMap; - - // [template] = {fragment, paths}; - var templates = new $Map; - - // [node] = onupgrade - var toBeUpgraded = new $WeakMap; - - // internal signal to switch adoption - var notAdopting = true; - - // IE 11 has problems with cloning templates too - // it "forgets" empty childNodes - var cloneNode = (function () { - featureFragment.appendChild(createText(featureFragment, 'g')); - featureFragment.appendChild(createText(featureFragment, '')); - return featureFragment.cloneNode(true).childNodes.length === 1 ? - function (node) { - for (var - clone = node.cloneNode(), - childNodes = node.childNodes || [], - i = 0, length = childNodes.length; - i < length; i++ - ) { - clone.appendChild(cloneNode(childNodes[i])); - } - return clone; - } : - function (fragment) { - return fragment.cloneNode(true); - }; - }()); - - // --------------------------------------------- - // Adopting Nodes - // --------------------------------------------- - - // IE/Edge gotcha with comment nodes - var nextElementSibling = IE ? - function (node) { - while (node = node.nextSibling) { - if (node.nodeType === ELEMENT_NODE) return node; - } - return undefined; - } : - function (node) { return node.nextElementSibling; }; - - var previousElementSibling = IE ? - function (node) { - while (node = node.previousSibling) { - if (node.nodeType === ELEMENT_NODE) return node; - } - return undefined; - } : - function (node) { return node.previousElementSibling; }; - - // remove all text nodes from a virtual space - function removePreviousText(parentNode, node) { - var previousSibling = node.previousSibling; - if (previousSibling && previousSibling.nodeType === TEXT_NODE) { - parentNode.removeChild(previousSibling); - removePreviousText(parentNode, node); - } - } - - // avoid errors on obsolete platforms - function insertBefore(parentNode, target, after) { - if (after) { - parentNode.insertBefore(target, after); - } else { - parentNode.appendChild(target); - } - } - - // given an info, tries to find out the best option - // to replace or update the content - function discoverNode(parentNode, virtual, info, childNodes) { - for (var - target = parentNode, - document = parentNode.ownerDocument, - path = info.path, - virtualNode = getNode(virtual, path), - i = 0, - length = path.length; - i < length; i++ - ) { - switch (path[i++]) { - case 'attributes': - var name = virtualNode.name; - if (!parentNode.hasAttribute(name)) { - parentNode.setAttribute(name, ''); - } - target = parentNode.attributes[name]; - break; - case 'childNodes': - var children = getChildren(parentNode); - var virtualChildren = getChildren(virtualNode.parentNode); - target = previousElementSibling(virtualNode); - var before = target ? (path.indexOf.call(virtualChildren, target) + 1) : -1; - target = nextElementSibling(virtualNode); - var after = target ? path.indexOf.call(virtualChildren, target) : -1; - target = document.createComment(UID); - switch (true) { - // `${'virtual'}` is actually resolved as `${'any'}` - // case before < 0 && after < 0: before = 0; - - // `${'virtual'}` - case after < 0: - after = children.length; - break; - // `${'virtual'}` - case before < 0: - before = 0; - // `${'virtual'}` - default: - after = -(virtualChildren.length - after); - break; - } - childNodes.push.apply( - childNodes, - slice.call(children, before, after) - ); - if (childNodes.length) { - insertBefore( - parentNode, - target, - nextElementSibling(childNodes[childNodes.length - 1]) - ); - } else { - insertBefore( - parentNode, - target, - slice.call(children, after)[0] - ); - } - if (childNodes.length === 0) { - removePreviousText(parentNode, target); - } - break; - default: - // if the node is not there, create it - target = getChildren(parentNode)[path[i]] || - parentNode.appendChild( - parentNode.ownerDocument.createElement( - getNode(virtual, path.slice(0, i + 1)).nodeName - ) - ); - parentNode = target; - break; - } - } - return target; - } - - // like createUpdates but for nodes with already a content - function discoverUpdates(fragment, paths) { - for (var - info, childNodes, - updates = [], - removeAttributes = [], - i = 0, length = paths.length; - i < length; i++ - ) { - childNodes = []; - info = paths[i]; - updates[i] = setContent( - info, - discoverNode(this, fragment, info, childNodes), - removeAttributes, - childNodes - ); - } - removeAttributeList(removeAttributes); - return updates; - } - - // --------------------------------------------- - // Template related utilities - // --------------------------------------------- - - // given a unique template object - // create, parse, and store retrieved info - function createTemplate(template) { - var paths = []; - var fragment = createFragment(this, template.join(UIDC)); - var info = {fragment: fragment, paths: paths}; - hyperSeeker(fragment, paths, template.slice()); - templates.set(template, info); - return info; - } - - // given a generic node, returns a path capable - // of retrieving such path back again. - // TODO: worth passing the index when available ? - function createPath(node) { - var path = []; - var parentNode; - switch(node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - parentNode = node; - break; - case COMMENT_NODE: - parentNode = node.parentNode; - path.unshift( - 'childNodes', - path.indexOf.call(parentNode.childNodes, node) - ); - break; - case ATTRIBUTE_NODE: - default: // jsdom here does not provide a nodeType 2 ... - parentNode = node.ownerElement; - path.unshift('attributes', node.name); - break; - } - for ( - node = parentNode; - parentNode = parentNode.parentNode; - node = parentNode - ) { - path.unshift('children', path.indexOf.call(getChildren(parentNode), node)); - } - return path; - } - - // given a root node and a list of paths - // creates an array of updates to invoke - // whenever the next interpolation happens - function createUpdates(fragment, paths) { - for (var - info, - updates = [], - removeAttributes = [], - i = 0, length = paths.length; - i < length; i++ - ) { - info = paths[i]; - updates[i] = setContent( - info, - getNode(fragment, info.path), - removeAttributes, - [] - ); - } - removeAttributeList(removeAttributes); - return updates; - } - - // invokes each update function passing interpolated value - function update() { - for (var i = 1, length = arguments.length; i < length; i++) { - this[i - 1](arguments[i]); - } - } - - // create a template, if unknown - // upgrade a node to use such template for future updates - function upgrade(template) { - template = TL(template); - var updates; - var info = templates.get(template) || - createTemplate.call(this, template); - if (notAdopting) { - var fragment = cloneNode(info.fragment); - updates = createUpdates.call(this, fragment, info.paths); - hypers.set(this, {template: template, updates: updates}); - update.apply(updates, arguments); - this.textContent = ''; - this.appendChild(fragment); - } else { - updates = discoverUpdates.call(this, info.fragment, info.paths); - hypers.set(this, {template: template, updates: updates}); - update.apply(updates, arguments); - } - } - - // --------------------------------------------- - // Wires - // --------------------------------------------- - - // create a new wire for generic DOM content - function wireContent(type) { - var adopter, content, container, fragment, render, setup, template; - - function before(document) { - fragment = createDocumentFragment(document); - container = type === 'svg' ? - document.createElementNS(SVG_NAMESPACE, 'svg') : - fragment; - render = bind(container); - } - - function after() { - if (setup) { - setup = false; - if (type === 'svg') { - appendNodes(fragment, slice.call(container.childNodes)); - } - content = createContent(fragment); - } - return content; - } - - return type === 'adopt' ? - function adopt(statics) { - var args = arguments; - statics = TL(statics); - if (template !== statics) { - setup = true; - template = statics; - adopter = function (parentNode, children, i) { - if (setup) { - if (i < children.length) { - container = children[i]; - fragment = { - ownerDocument: container.ownerDocument, - childNodes: [container], - children: [container] - }; - render = hyper.adopt(fragment); - } else { - if (OWNER_SVG_ELEMENT in parentNode) type = 'svg'; - before(parentNode.ownerDocument); - } - } - render.apply(null, args); - return after(); - }; - } - return adopter; - } : - function update(statics) { - statics = TL(statics); - if (template !== statics) { - setup = true; - template = statics; - before(hyper.document); - } - render.apply(null, arguments); - return after(); - }; - } - - // setup a weak reference if needed and return a wire by ID - function wireWeakly(obj, type) { - var wire = wires.get(obj); - var i = type.indexOf(':'); - var id = type; - if (-1 < i) { - id = type.slice(i + 1); - type = type.slice(0, i) || 'html'; - } - if (!wire) { - wire = {}; - wires.set(obj, wire); - } - return wire[id] || (wire[id] = wireContent(type)); - } - - // avoid processing too many nodes - // this is about the algorithm used - // to calculate the least amount of DOM - // changes needed to show the a new list - // where there was another one. - // There is a limit, in terms of performance, - // on how big can the optimal computation be, - // so if you change this value be sure your - // target hardware is good enough. - hyper.MAX_LIST_SIZE = 1000; - - // --------------------------------------------- - // โšก๏ธ ๏ธ๏ธThe End โžฐ - // --------------------------------------------- - return hyper; - -}(document/*!majinbuu*/)); - -// umd.KISS -try { module.exports = hyperHTML; } catch(o_O) {} \ No newline at end of file diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..8fe28e62 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,51 @@ +type TemplateFunction = (template: TemplateStringsArray, ...values: any[]) => T; +export type BoundTemplateFunction = TemplateFunction; +export type WiredTemplateFunction = TemplateFunction; + +export declare class Component { + static for(this: new() => TComponent, context: object, identity?: any): TComponent; + handleEvent(e: Event): void; + html: WiredTemplateFunction; + svg: WiredTemplateFunction; + state: T; + get defaultState(): T; + setState(state: Partial | ((this: this, state: T) => Partial), render?: boolean): this; + dispatch(type: string, detail?: any): boolean; +} + +export declare function bind(element: T): BoundTemplateFunction; + +export declare function define(intent: string, callback: Function): void; + +export declare function wire(identity?: object | null, type?: 'html' | 'svg'): WiredTemplateFunction; +export declare function wire(identity?: object | null, type_id?: string): WiredTemplateFunction; + +export declare const hyper: { + Component: typeof Component; + bind: typeof bind; + define: typeof define; + hyper: typeof hyper; + wire: typeof wire; + + // hyper(null, 'html')`HTML` + (identity: null | undefined, type?: 'html' | 'svg'): WiredTemplateFunction; + + // hyper('html')`HTML` + (type: 'html' | 'svg'): WiredTemplateFunction; + + // hyper(element)`HTML` + (element: T): BoundTemplateFunction; + + // hyper`HTML` + (template: TemplateStringsArray, ...values: any[]): any; + + // hyper(obj, 'html:id')`HTML` + // hyper(obj)`HTML` + (identity: object, type?: 'html' | 'svg'): WiredTemplateFunction; + (identity: object, type_id?: string): WiredTemplateFunction; + + // hyper()`HTML` + (): WiredTemplateFunction; +}; + +export default hyper; diff --git a/index.js b/index.js index afa6bab0..f9649b1c 100644 --- a/index.js +++ b/index.js @@ -1,746 +1,1527 @@ -var hyperHTML = (function (globalDocument, majinbuu) {'use strict'; +var hyperHTML = (function (document) { + 'use strict'; - /*! (c) 2017 Andrea Giammarchi @WebReflection, (ISC) */ + /*! (c) Andrea Giammarchi - ISC */ + var self = {}; - // --------------------------------------------- - // hyperHTML Public API - // --------------------------------------------- + try { + self.WeakMap = WeakMap; + } catch (WeakMap) { + // this could be better but 90% of the time + // it's everything developers need as fallback + self.WeakMap = function (id, Object) { + + var dP = Object.defineProperty; + var hOP = Object.hasOwnProperty; + var proto = WeakMap.prototype; + + proto["delete"] = function (key) { + return this.has(key) && delete key[this._]; + }; - // The document must be swap-able at runtime. - // Needed by both basicHTML and nativeHTML - hyper.document = globalDocument; + proto.get = function (key) { + return this.has(key) ? key[this._] : void 0; + }; - // friendly destructuring - hyper.hyper = hyper; + proto.has = function (key) { + return hOP.call(key, this._); + }; - function hyper(HTML) { - return arguments.length < 2 ? - (HTML == null ? - wireContent('html') : - (typeof HTML === 'string' ? - wire(null, HTML) : - ('raw' in HTML ? - wireContent('html')(HTML) : - ('nodeType' in HTML ? - bind(HTML) : - wireWeakly(HTML, 'html') - ) - ) - )) : - ('raw' in HTML ? - wireContent('html') : wire - ).apply(null, arguments); + proto.set = function (key, value) { + dP(key, this._, { + configurable: true, + value: value + }); + return this; + }; + + return WeakMap; + + function WeakMap(iterable) { + dP(this, '_', { + value: '_@ungap/weakmap' + id++ + }); + if (iterable) iterable.forEach(add, this); + } + + function add(pair) { + this.set(pair[0], pair[1]); + } + }(Math.random(), Object); } - // hyper.adopt(el) ๐Ÿฃ - // import an already live DOM structure - // described as TL - hyper.adopt = function adopt(node) { - return function () { - notAdopting = false; - render.apply(node, arguments); - notAdopting = true; - return node; - }; - }; + var WeakMap$1 = self.WeakMap; - // hyper.bind(el) โšก๏ธ - // render TL inside a DOM node used as context - hyper.bind = bind; - function bind(context) { return render.bind(context); } + /*! (c) Andrea Giammarchi - ISC */ + var self$1 = {}; + + try { + self$1.WeakSet = WeakSet; + } catch (WeakSet) { + (function (id, dP) { + var proto = WeakSet.prototype; + + proto.add = function (object) { + if (!this.has(object)) dP(object, this._, { + value: true, + configurable: true + }); + return this; + }; + + proto.has = function (object) { + return this.hasOwnProperty.call(object, this._); + }; + + proto["delete"] = function (object) { + return this.has(object) && delete object[this._]; + }; + + self$1.WeakSet = WeakSet; + + function WeakSet() { + + dP(this, '_', { + value: '_@ungap/weakmap' + id++ + }); + } + })(Math.random(), Object.defineProperty); + } - // hyper.define('transformer', callback) ๐ŸŒ€ - hyper.define = function define(transformer, callback) { - if (!(transformer in transformers)) { - transformersKeys.push(transformer); + var WeakSet$1 = self$1.WeakSet; + + var _ref = [], + indexOf = _ref.indexOf; + + var append = function append(get, parent, children, start, end, before) { + var isSelect = ('selectedIndex' in parent); + var noSelection = isSelect; + + while (start < end) { + var child = get(children[start], 1); + parent.insertBefore(child, before); + + if (isSelect && noSelection && child.selected) { + noSelection = !noSelection; + var selectedIndex = parent.selectedIndex; + parent.selectedIndex = selectedIndex < 0 ? start : indexOf.call(parent.querySelectorAll('option'), child); + } + + start++; } - transformers[transformer] = callback; - // TODO: else throw ? console.warn ? who cares ? }; + var eqeq = function eqeq(a, b) { + return a == b; + }; + var identity = function identity(O) { + return O; + }; + var indexOf$1 = function indexOf(moreNodes, moreStart, moreEnd, lessNodes, lessStart, lessEnd, compare) { + var length = lessEnd - lessStart; + /* istanbul ignore if */ + + if (length < 1) return -1; + + while (moreEnd - moreStart >= length) { + var m = moreStart; + var l = lessStart; + + while (m < moreEnd && l < lessEnd && compare(moreNodes[m], lessNodes[l])) { + m++; + l++; + } + + if (l === lessEnd) return moreStart; + moreStart = m + 1; + } - // hyper.escape('') => '<text>' ๐Ÿƒ - hyper.escape = function escape(html) { - return html.replace(/[&<>'"]/g, fnEscape); + return -1; }; + var isReversed = function isReversed(futureNodes, futureEnd, currentNodes, currentStart, currentEnd, compare) { + while (currentStart < currentEnd && compare(currentNodes[currentStart], futureNodes[futureEnd - 1])) { + currentStart++; + futureEnd--; + } + return futureEnd === 0; + }; + var next = function next(get, list, i, length, before) { + return i < length ? get(list[i], 0) : 0 < i ? get(list[i - 1], -0).nextSibling : before; + }; + var remove = function remove(get, children, start, end) { + while (start < end) { + drop(get(children[start++], -1)); + } + }; // - - - - - - - - - - - - - - - - - - - + // diff related constants and utilities + // - - - - - - - - - - - - - - - - - - - - // hyper.wire(obj, 'type:ID') โžฐ - // relate a renderer to a generic object - hyper.wire = wire; - function wire(obj, type) { - return arguments.length < 1 ? - wireContent('html') : - (obj == null ? - wireContent(type || 'html') : - wireWeakly(obj, type || 'html') - ); - } + var DELETION = -1; + var INSERTION = 1; + var SKIP = 0; + var SKIP_OND = 50; - // hyper.Component([initialState]) ๐Ÿป - // An overly-simplified Component class. - // For full Custom Elements support - // see HyperHTMLElement instead. - hyper.Component = Component; - function Component() {} - Object.defineProperties( - Component.prototype, - { - // same as HyperHTMLElement handleEvent - handleEvent: {value: function (e) { - // both IE < 11 and JSDOM lack dataset - var ct = e.currentTarget; - this[ - ('getAttribute' in ct && ct.getAttribute('data-call')) || - ('on' + e.type) - ](e); - }}, - // returns its own HTML wire or create it once on comp.render() - html: lazyGetter('html', wireContent), - // returns its own SVG wire or create it once on comp.render() - svg: lazyGetter('svg', wireContent), - // same as HyperHTMLElement state - state: lazyGetter('state', function () { return this.defaultState; }), - // same as HyperHTMLElement get defaultState - defaultState: {get: function () { return {}; }}, - // same as HyperHTMLElement setState - setState: {value: function (state) { - var target = this.state; - var source = typeof state === 'function' ? state.call(this, target) : state; - for (var key in source) target[key] = source[key]; - this.render(); - }} - // the render must be defined when extending hyper.Component - // the render **must** return either comp.html or comp.svg wire - // render() { return this.html`

    that's it

    `; } + var HS = function HS(futureNodes, futureStart, futureEnd, futureChanges, currentNodes, currentStart, currentEnd, currentChanges) { + var k = 0; + /* istanbul ignore next */ + + var minLen = futureChanges < currentChanges ? futureChanges : currentChanges; + var link = Array(minLen++); + var tresh = Array(minLen); + tresh[0] = -1; + + for (var i = 1; i < minLen; i++) { + tresh[i] = currentEnd; } - ); - // - - - - - - - - - - - - - - - - - - - - - - - + var nodes = currentNodes.slice(currentStart, currentEnd); - // --------------------------------------------- - // Constants - // --------------------------------------------- + for (var _i = futureStart; _i < futureEnd; _i++) { + var index = nodes.indexOf(futureNodes[_i]); - // Node.CONSTANTS - // without assuming Node is globally available - // since this project is used on the backend too - var ELEMENT_NODE = 1; - var ATTRIBUTE_NODE = 2; - var TEXT_NODE = 3; - var COMMENT_NODE = 8; - var DOCUMENT_FRAGMENT_NODE = 11; - - // SVG related - var OWNER_SVG_ELEMENT = 'ownerSVGElement'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - - var SHOULD_USE_ATTRIBUTE = /^style$/i; - var SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i; - var EXPANDO = '_hyper: '; - var UID = EXPANDO + ((Math.random() * new Date) | 0) + ';'; - var UIDC = ''; - - // --------------------------------------------- - // DOM Manipulation - // --------------------------------------------- - - function Aura(node, childNodes) { - this.node = node; - this.childNodes = childNodes; - return majinbuu.aura(this, childNodes); - } + if (-1 < index) { + var idxInOld = index + currentStart; + k = findK(tresh, minLen, idxInOld); + /* istanbul ignore else */ - Aura.prototype.splice = function splice(start) { - for (var - tmp, - ph = this.node, - cn = this.childNodes, - target = cn[start + (arguments[1] || 0)] || ph, - result = cn.splice.apply(cn, arguments), - pn = ph.parentNode, - i = 0, - length = result.length; - i < length; i++ - ) { - tmp = result[i]; - // TODO: this is not optimal (but necessary) - if (cn.indexOf(tmp) < 0) { - pn.removeChild(tmp); + if (-1 < k) { + tresh[k] = idxInOld; + link[k] = { + newi: _i, + oldi: idxInOld, + prev: link[k - 1] + }; + } } } - i = 2; - length = arguments.length; - if (i < length) { - if ((length - i) === 1) { - tmp = arguments[i]; - } else { - tmp = createDocumentFragment(pn.ownerDocument); - while (i < length) { - tmp.appendChild(arguments[i++]); + + k = --minLen; + --currentEnd; + + while (tresh[k] > currentEnd) { + --k; + } + + minLen = currentChanges + futureChanges - k; + var diff = Array(minLen); + var ptr = link[k]; + --futureEnd; + + while (ptr) { + var _ptr = ptr, + newi = _ptr.newi, + oldi = _ptr.oldi; + + while (futureEnd > newi) { + diff[--minLen] = INSERTION; + --futureEnd; + } + + while (currentEnd > oldi) { + diff[--minLen] = DELETION; + --currentEnd; + } + + diff[--minLen] = SKIP; + --futureEnd; + --currentEnd; + ptr = ptr.prev; + } + + while (futureEnd >= futureStart) { + diff[--minLen] = INSERTION; + --futureEnd; + } + + while (currentEnd >= currentStart) { + diff[--minLen] = DELETION; + --currentEnd; + } + + return diff; + }; // this is pretty much the same petit-dom code without the delete map part + // https://github.com/yelouafi/petit-dom/blob/bd6f5c919b5ae5297be01612c524c40be45f14a7/src/vdom.js#L556-L561 + + + var OND = function OND(futureNodes, futureStart, rows, currentNodes, currentStart, cols, compare) { + var length = rows + cols; + var v = []; + var d, k, r, c, pv, cv, pd; + + outer: for (d = 0; d <= length; d++) { + /* istanbul ignore if */ + if (d > SKIP_OND) return null; + pd = d - 1; + /* istanbul ignore next */ + + pv = d ? v[d - 1] : [0, 0]; + cv = v[d] = []; + + for (k = -d; k <= d; k += 2) { + if (k === -d || k !== d && pv[pd + k - 1] < pv[pd + k + 1]) { + c = pv[pd + k + 1]; + } else { + c = pv[pd + k - 1] + 1; + } + + r = c - k; + + while (c < cols && r < rows && compare(currentNodes[currentStart + c], futureNodes[futureStart + r])) { + c++; + r++; } + + if (c === cols && r === rows) { + break outer; + } + + cv[d + k] = c; + } + } + + var diff = Array(d / 2 + length / 2); + var diffIdx = diff.length - 1; + + for (d = v.length - 1; d >= 0; d--) { + while (c > 0 && r > 0 && compare(currentNodes[currentStart + c - 1], futureNodes[futureStart + r - 1])) { + // diagonal edge = equality + diff[diffIdx--] = SKIP; + c--; + r--; + } + + if (!d) break; + pd = d - 1; + /* istanbul ignore next */ + + pv = d ? v[d - 1] : [0, 0]; + k = c - r; + + if (k === -d || k !== d && pv[pd + k - 1] < pv[pd + k + 1]) { + // vertical edge = insertion + r--; + diff[diffIdx--] = INSERTION; + } else { + // horizontal edge = deletion + c--; + diff[diffIdx--] = DELETION; } - pn.insertBefore(tmp, target); } - return result; + + return diff; }; - // --------------------------------------------- - // hyperHTML Operations - // --------------------------------------------- - - // entry point for all TL => DOM operations - function render(template) { - var hyper = hypers.get(this); - if ( - !hyper || - hyper.template !== TL(template) - ) { - upgrade.apply(this, arguments); - } else { - update.apply(hyper.updates, arguments); + var applyDiff = function applyDiff(diff, get, parentNode, futureNodes, futureStart, currentNodes, currentStart, currentLength, before) { + var live = []; + var length = diff.length; + var currentIndex = currentStart; + var i = 0; + + while (i < length) { + switch (diff[i++]) { + case SKIP: + futureStart++; + currentIndex++; + break; + + case INSERTION: + // TODO: bulk appends for sequential nodes + live.push(futureNodes[futureStart]); + append(get, parentNode, futureNodes, futureStart++, futureStart, currentIndex < currentLength ? get(currentNodes[currentIndex], 0) : before); + break; + + case DELETION: + currentIndex++; + break; + } } - return this; + + i = 0; + + while (i < length) { + switch (diff[i++]) { + case SKIP: + currentStart++; + break; + + case DELETION: + // TODO: bulk removes for sequential nodes + if (-1 < live.indexOf(currentNodes[currentStart])) currentStart++;else remove(get, currentNodes, currentStart++, currentStart); + break; + } + } + }; + + var findK = function findK(ktr, length, j) { + var lo = 1; + var hi = length; + + while (lo < hi) { + var mid = (lo + hi) / 2 >>> 0; + if (j < ktr[mid]) hi = mid;else lo = mid + 1; + } + + return lo; + }; + + var smartDiff = function smartDiff(get, parentNode, futureNodes, futureStart, futureEnd, futureChanges, currentNodes, currentStart, currentEnd, currentChanges, currentLength, compare, before) { + applyDiff(OND(futureNodes, futureStart, futureChanges, currentNodes, currentStart, currentChanges, compare) || HS(futureNodes, futureStart, futureEnd, futureChanges, currentNodes, currentStart, currentEnd, currentChanges), get, parentNode, futureNodes, futureStart, currentNodes, currentStart, currentLength, before); + }; + + var drop = function drop(node) { + return (node.remove || dropChild).call(node); + }; + + function dropChild() { + var parentNode = this.parentNode; + /* istanbul ignore else */ + + if (parentNode) parentNode.removeChild(this); } - // `
    ` - // `
    ` - // `
    ` - // `
    ` - function setAttribute(attribute, removeAttributes, name) { - var - node = attribute.ownerElement, - isData = name === 'data', - isEvent = !isData && /^on/.test(name), - isSpecial = isData || - (isSpecialAttribute(node, name) && - !SHOULD_USE_ATTRIBUTE.test(name)), - type = isEvent ? name.slice(2) : '', - noOwner = isSpecial || isEvent, - wontUpgrade = isSpecial && (isData || name in node), - oldValue, specialAttr, upgrade - ; - if (isEvent || wontUpgrade) { - removeAttributes.push(node, name); - if (isEvent) { - if (type === CONNECTED || type === DISCONNECTED) { - components.add(node); - } - else if (name.toLowerCase() in node) { - type = type.toLowerCase(); - } + /*! (c) 2018 Andrea Giammarchi (ISC) */ + + var domdiff = function domdiff(parentNode, // where changes happen + currentNodes, // Array of current items/nodes + futureNodes, // Array of future items/nodes + options // optional object with one of the following properties + // before: domNode + // compare(generic, generic) => true if same generic + // node(generic) => Node + ) { + if (!options) options = {}; + var compare = options.compare || eqeq; + var get = options.node || identity; + var before = options.before == null ? null : get(options.before, 0); + var currentLength = currentNodes.length; + var currentEnd = currentLength; + var currentStart = 0; + var futureEnd = futureNodes.length; + var futureStart = 0; // common prefix + + while (currentStart < currentEnd && futureStart < futureEnd && compare(currentNodes[currentStart], futureNodes[futureStart])) { + currentStart++; + futureStart++; + } // common suffix + + + while (currentStart < currentEnd && futureStart < futureEnd && compare(currentNodes[currentEnd - 1], futureNodes[futureEnd - 1])) { + currentEnd--; + futureEnd--; + } + + var currentSame = currentStart === currentEnd; + var futureSame = futureStart === futureEnd; // same list + + if (currentSame && futureSame) return futureNodes; // only stuff to add + + if (currentSame && futureStart < futureEnd) { + append(get, parentNode, futureNodes, futureStart, futureEnd, next(get, currentNodes, currentStart, currentLength, before)); + return futureNodes; + } // only stuff to remove + + + if (futureSame && currentStart < currentEnd) { + remove(get, currentNodes, currentStart, currentEnd); + return futureNodes; + } + + var currentChanges = currentEnd - currentStart; + var futureChanges = futureEnd - futureStart; + var i = -1; // 2 simple indels: the shortest sequence is a subsequence of the longest + + if (currentChanges < futureChanges) { + i = indexOf$1(futureNodes, futureStart, futureEnd, currentNodes, currentStart, currentEnd, compare); // inner diff + + if (-1 < i) { + append(get, parentNode, futureNodes, futureStart, i, get(currentNodes[currentStart], 0)); + append(get, parentNode, futureNodes, i + currentChanges, futureEnd, next(get, currentNodes, currentEnd, currentLength, before)); + return futureNodes; } } - if (isSpecial) { - if (!wontUpgrade) { - upgrade = toBeUpgraded.get(node); - if (!upgrade) { - upgrade = { - _: Object.create(null), - $: function () { - toBeUpgraded.delete(node); - for (var name in this._) { - this._[name].$(); - } - } - }; - toBeUpgraded.set(node, upgrade); + /* istanbul ignore else */ + else if (futureChanges < currentChanges) { + i = indexOf$1(currentNodes, currentStart, currentEnd, futureNodes, futureStart, futureEnd, compare); // outer diff + + if (-1 < i) { + remove(get, currentNodes, currentStart, i); + remove(get, currentNodes, i + futureChanges, currentEnd); + return futureNodes; } - upgrade._[name] = { - _: null, - $: function () { - wontUpgrade = true; - specialAttr(this._); + } // common case with one replacement for many nodes + // or many nodes replaced for a single one + + /* istanbul ignore else */ + + + if (currentChanges < 2 || futureChanges < 2) { + append(get, parentNode, futureNodes, futureStart, futureEnd, get(currentNodes[currentStart], 0)); + remove(get, currentNodes, currentStart, currentEnd); + return futureNodes; + } // the half match diff part has been skipped in petit-dom + // https://github.com/yelouafi/petit-dom/blob/bd6f5c919b5ae5297be01612c524c40be45f14a7/src/vdom.js#L391-L397 + // accordingly, I think it's safe to skip in here too + // if one day it'll come out like the speediest thing ever to do + // then I might add it in here too + // Extra: before going too fancy, what about reversed lists ? + // This should bail out pretty quickly if that's not the case. + + + if (currentChanges === futureChanges && isReversed(futureNodes, futureEnd, currentNodes, currentStart, currentEnd, compare)) { + append(get, parentNode, futureNodes, futureStart, futureEnd, next(get, currentNodes, currentEnd, currentLength, before)); + return futureNodes; + } // last resort through a smart diff + + + smartDiff(get, parentNode, futureNodes, futureStart, futureEnd, futureChanges, currentNodes, currentStart, currentEnd, currentChanges, currentLength, compare, before); + return futureNodes; + }; + + + + /*! (c) Andrea Giammarchi - ISC */ + var self$2 = {}; + self$2.CustomEvent = typeof CustomEvent === 'function' ? CustomEvent : function (__p__) { + CustomEvent[__p__] = new CustomEvent('').constructor[__p__]; + return CustomEvent; + + function CustomEvent(type, init) { + if (!init) init = {}; + var e = document.createEvent('CustomEvent'); + e.initCustomEvent(type, !!init.bubbles, !!init.cancelable, init.detail); + return e; + } + }('prototype'); + var CustomEvent$1 = self$2.CustomEvent; + + /*! (c) Andrea Giammarchi - ISC */ + var self$3 = {}; + + try { + self$3.Map = Map; + } catch (Map) { + self$3.Map = function Map() { + var i = 0; + var k = []; + var v = []; + return { + "delete": function _delete(key) { + var had = contains(key); + + if (had) { + k.splice(i, 1); + v.splice(i, 1); } - }; + + return had; + }, + forEach: function forEach(callback, context) { + k.forEach(function (key, i) { + callback.call(context, v[i], key, this); + }, this); + }, + get: function get(key) { + return contains(key) ? v[i] : void 0; + }, + has: function has(key) { + return contains(key); + }, + set: function set(key, value) { + v[contains(key) ? i : k.push(key) - 1] = value; + return this; + } + }; + + function contains(v) { + i = k.indexOf(v); + return -1 < i; } - specialAttr = function specialAttr(newValue) { - if (wontUpgrade) { - if (oldValue !== newValue) { - oldValue = newValue; - // WebKit moves the cursor if input.value - // is set again, even if same value - if (node[name] !== newValue) { - // let the browser handle the case - // input.value = null; - // input.value; // '' - if (newValue == null) { - // reflect the null intent, - // do not pass undefined! - node[name] = null; - node.removeAttribute(name); - } else { - node[name] = newValue; - } - } + }; + } + + var Map$1 = self$3.Map; + + // able to create Custom Elements like components + // including the ability to listen to connect/disconnect + // events via onconnect/ondisconnect attributes + // Components can be created imperatively or declaratively. + // The main difference is that declared components + // will not automatically render on setState(...) + // to simplify state handling on render. + + function Component() { + return this; // this is needed in Edge !!! + } // Component is lazily setup because it needs + // wire mechanism as lazy content + + function setup(content) { + // there are various weakly referenced variables in here + // and mostly are to use Component.for(...) static method. + var children = new WeakMap$1(); + var create = Object.create; + + var createEntry = function createEntry(wm, id, component) { + wm.set(id, component); + return component; + }; + + var get = function get(Class, info, context, id) { + var relation = info.get(Class) || relate(Class, info); + + switch (typeof(id)) { + case 'object': + case 'function': + var wm = relation.w || (relation.w = new WeakMap$1()); + return wm.get(id) || createEntry(wm, id, new Class(context)); + + default: + var sm = relation.p || (relation.p = create(null)); + return sm[id] || (sm[id] = new Class(context)); + } + }; + + var relate = function relate(Class, info) { + var relation = { + w: null, + p: null + }; + info.set(Class, relation); + return relation; + }; + + var set = function set(context) { + var info = new Map$1(); + children.set(context, info); + return info; + }; // The Component Class + + + Object.defineProperties(Component, { + // Component.for(context[, id]) is a convenient way + // to automatically relate data/context to children components + // If not created yet, the new Component(context) is weakly stored + // and after that same instance would always be returned. + "for": { + configurable: true, + value: function value(context, id) { + return get(this, children.get(context) || set(context), context, id == null ? 'default' : id); + } + } + }); + Object.defineProperties(Component.prototype, { + // all events are handled with the component as context + handleEvent: { + value: function value(e) { + var ct = e.currentTarget; + this['getAttribute' in ct && ct.getAttribute('data-call') || 'on' + e.type](e); + } + }, + // components will lazily define html or svg properties + // as soon as these are invoked within the .render() method + // Such render() method is not provided by the base class + // but it must be available through the Component extend. + // Declared components could implement a + // render(props) method too and use props as needed. + html: lazyGetter('html', content), + svg: lazyGetter('svg', content), + // the state is a very basic/simple mechanism inspired by Preact + state: lazyGetter('state', function () { + return this.defaultState; + }), + // it is possible to define a default state that'd be always an object otherwise + defaultState: { + get: function get() { + return {}; + } + }, + // dispatch a bubbling, cancelable, custom event + // through the first known/available node + dispatch: { + value: function value(type, detail) { + var _wire$ = this._wire$; + + if (_wire$) { + var event = new CustomEvent$1(type, { + bubbles: true, + cancelable: true, + detail: detail + }); + event.component = this; + return (_wire$.dispatchEvent ? _wire$ : _wire$.firstChild).dispatchEvent(event); } - } else { - attribute.value = newValue; - upgrade._[name]._ = newValue; - if (name in node) upgrade.$(); + + return false; } - }; + }, + // setting some property state through a new object + // or a callback, triggers also automatically a render + // unless explicitly specified to not do so (render === false) + setState: { + value: function value(state, render) { + var target = this.state; + var source = typeof state === 'function' ? state.call(this, target) : state; + + for (var key in source) { + target[key] = source[key]; + } + + if (render !== false) this.render(); + return this; + } + } + }); + } // instead of a secret key I could've used a WeakMap + // However, attaching a property directly will result + // into better performance with thousands of components + // hanging around, and less memory pressure caused by the WeakMap + + var lazyGetter = function lazyGetter(type, fn) { + var secret = '_' + type + '$'; + return { + get: function get() { + return this[secret] || setValue(this, secret, fn.call(this, type)); + }, + set: function set(value) { + setValue(this, secret, value); + } + }; + }; // shortcut to set value on get or set(value) + + + var setValue = function setValue(self, secret, value) { + return Object.defineProperty(self, secret, { + configurable: true, + value: typeof value === 'function' ? function () { + return self._wire$ = value.apply(this, arguments); + } : value + })[secret]; + }; + + Object.defineProperties(Component.prototype, { + // used to distinguish better than instanceof + ELEMENT_NODE: { + value: 1 + }, + nodeType: { + value: -1 } - return isEvent ? - function eventAttr(newValue) { - if (oldValue !== newValue) { - if (oldValue) node.removeEventListener(type, oldValue, false); - oldValue = newValue; - if (newValue) node.addEventListener(type, newValue, false); + }); + + var attributes = {}; + var intents = {}; + var keys = []; + var hasOwnProperty = intents.hasOwnProperty; + var length = 0; + var Intent = { + // used to invoke right away hyper:attributes + attributes: attributes, + // hyperHTML.define('intent', (object, update) => {...}) + // can be used to define a third parts update mechanism + // when every other known mechanism failed. + // hyper.define('user', info => info.name); + // hyper(node)`

    ${{user}}

    `; + define: function define(intent, callback) { + if (intent.indexOf('-') < 0) { + if (!(intent in intents)) { + length = keys.push(intent); } - } : - (isSpecial ? - specialAttr : - function normalAttr(newValue) { - if (oldValue !== newValue) { - oldValue = newValue; - // avoid triggering again attributeChangeCallback - // if the value was identical - if (attribute.value !== newValue) { - if (newValue == null) { - if (!noOwner) { - // TODO: should attribute.value = null here? - noOwner = true; - node.removeAttributeNode(attribute); - } - } else { - attribute.value = newValue; - if (noOwner) { - noOwner = false; - node.setAttributeNode(attribute); - } - } - } - } + + intents[intent] = callback; + } else { + attributes[intent] = callback; + } + }, + // this method is used internally as last resort + // to retrieve a value out of an object + invoke: function invoke(object, callback) { + for (var i = 0; i < length; i++) { + var key = keys[i]; + + if (hasOwnProperty.call(object, key)) { + return intents[key](object[key], callback); } - ); - } + } + } + }; - // `` - function setTextContent(node) { - var oldValue; - return function (value) { - if (value !== oldValue) { - oldValue = value; - node.textContent = value; + var isArray = Array.isArray || + /* istanbul ignore next */ + function (toString) { + /* istanbul ignore next */ + var $ = toString.call([]); + /* istanbul ignore next */ + + return function isArray(object) { + return toString.call(object) === $; + }; + }({}.toString); + + /*! (c) Andrea Giammarchi - ISC */ + var createContent = function (document) { + + var FRAGMENT = 'fragment'; + var TEMPLATE = 'template'; + var HAS_CONTENT = ('content' in create(TEMPLATE)); + var createHTML = HAS_CONTENT ? function (html) { + var template = create(TEMPLATE); + template.innerHTML = html; + return template.content; + } : function (html) { + var content = create(FRAGMENT); + var template = create(TEMPLATE); + var childNodes = null; + + if (/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html)) { + var selector = RegExp.$1; + template.innerHTML = '' + html + '
    '; + childNodes = template.querySelectorAll(selector); + } else { + template.innerHTML = html; + childNodes = template.childNodes; } + + append(content, childNodes); + return content; + }; + return function createContent(markup, type) { + return (type === 'svg' ? createSVG : createHTML)(markup); }; - } - // `

    ${'any'}

    ` - // `
  • a
  • ${'virtual'}
  • c
  • ` - function setAnyContent(node, childNodes, aura) { - var oldValue; - return function anyContent(value) { - switch (typeof value) { - case 'string': - case 'number': - case 'boolean': - var length = childNodes.length; - if ( - length === 1 && - childNodes[0].nodeType === TEXT_NODE - ) { - if (oldValue !== value) { - oldValue = value; - childNodes[0].textContent = value; - } - } else { - oldValue = value; - if (length) { - aura.splice(0, length, createText(node, value)); - } else { - childNodes[0] = node.parentNode.insertBefore( - createText(node, value), - node - ); - } - } - break; - case 'function': - anyContent(value(node.parentNode, childNodes, 0)); - break; - case 'object': - case 'undefined': - if (value == null) { - oldValue = value; - anyContent(''); - break; - } else if (value instanceof Component) { - value = value.render(); - } - default: - oldValue = value; - if (isArray(value)) { - var length = value.length; - if (length === 0) { - aura.splice(0); - } else { - switch (typeof value[0]) { - case 'string': - case 'number': - case 'boolean': - anyContent({html: value}); - break; - case 'function': - var parentNode = node.parentNode; - for (var i = 0; i < length; i++) { - value[i] = value[i](parentNode, childNodes, i); - } - anyContent(value.concat.apply([], value)); - break; - case 'object': - if (isArray(value[0])) { - value = value.concat.apply([], value); - } - if (isPromise_ish(value[0])) { - Promise.all(value).then(anyContent); - break; - } else { - for (var i = 0, length = value.length; i < length; i++) { - if (value[i] instanceof Component) { - value[i] = value[i].render(); - } - } - } - default: - optimist(aura, value); - break; - } - } - } else if (isNode_ish(value)) { - optimist( - aura, - value.nodeType === DOCUMENT_FRAGMENT_NODE ? - slice.call(value.childNodes) : - [value] - ); - } else if (isPromise_ish(value)) { - value.then(anyContent); - } else if ('placeholder' in value) { - invokeAtDistance(value, anyContent); - } else if ('text' in value) { - anyContent(String(value.text)); - } else if ('any' in value) { - anyContent(value.any); - } else if ('html' in value) { - var html = [].concat(value.html).join(''); - aura.splice(0); - var fragment = createFragment(node, html); - childNodes.push.apply(childNodes, fragment.childNodes); - node.parentNode.insertBefore(fragment, node); - } else if ('length' in value) { - anyContent(slice.call(value)); - } else { - anyContent(invokeTransformer(value, anyContent)); + function append(root, childNodes) { + var length = childNodes.length; + + while (length--) { + root.appendChild(childNodes[0]); + } + } + + function create(element) { + return element === FRAGMENT ? document.createDocumentFragment() : document.createElementNS('http://www.w3.org/1999/xhtml', element); + } // it could use createElementNS when hasNode is there + // but this fallback is equally fast and easier to maintain + // it is also battle tested already in all IE + + + function createSVG(svg) { + var content = create(FRAGMENT); + var template = create('div'); + template.innerHTML = '' + svg + ''; + append(content, template.firstChild.childNodes); + return content; + } + }(document); + + /*! (c) Andrea Giammarchi */ + function disconnected(poly) { + + var Event = poly.Event; + var WeakSet = poly.WeakSet; + var notObserving = true; + var observer = null; + return function observe(node) { + if (notObserving) { + notObserving = !notObserving; + observer = new WeakSet(); + startObserving(node.ownerDocument); + } + + observer.add(node); + return node; + }; + + function startObserving(document) { + var connected = new WeakSet(); + var disconnected = new WeakSet(); + + try { + new MutationObserver(changes).observe(document, { + subtree: true, + childList: true + }); + } catch (o_O) { + var timer = 0; + var records = []; + + var reschedule = function reschedule(record) { + records.push(record); + clearTimeout(timer); + timer = setTimeout(function () { + changes(records.splice(timer = 0, records.length)); + }, 0); + }; + + document.addEventListener('DOMNodeRemoved', function (event) { + reschedule({ + addedNodes: [], + removedNodes: [event.target] + }); + }, true); + document.addEventListener('DOMNodeInserted', function (event) { + reschedule({ + addedNodes: [event.target], + removedNodes: [] + }); + }, true); + } + + function changes(records) { + for (var record, length = records.length, i = 0; i < length; i++) { + record = records[i]; + dispatchAll(record.removedNodes, 'disconnected', disconnected, connected); + dispatchAll(record.addedNodes, 'connected', connected, disconnected); + } + } + + function dispatchAll(nodes, type, wsin, wsout) { + for (var node, event = new Event(type), length = nodes.length, i = 0; i < length; (node = nodes[i++]).nodeType === 1 && dispatchTarget(node, event, type, wsin, wsout)) { + } + } + + function dispatchTarget(node, event, type, wsin, wsout) { + if (observer.has(node) && !wsin.has(node)) { + wsout["delete"](node); + wsin.add(node); + node.dispatchEvent(event); + /* + // The event is not bubbling (perf reason: should it?), + // hence there's no way to know if + // stop/Immediate/Propagation() was called. + // Should DOM Level 0 work at all? + // I say it's a YAGNI case for the time being, + // and easy to implement in user-land. + if (!event.cancelBubble) { + var fn = node['on' + type]; + if (fn) + fn.call(node, event); } - break; + */ + } + + for (var // apparently is node.children || IE11 ... ^_^;; + // https://github.com/WebReflection/disconnected/issues/1 + children = node.children || [], length = children.length, i = 0; i < length; dispatchTarget(children[i++], event, type, wsin, wsout)) { + } + } + } + } + + /*! (c) Andrea Giammarchi - ISC */ + var importNode = function (document, appendChild, cloneNode, createTextNode, importNode) { + var _native = (importNode in document); // IE 11 has problems with cloning templates: + // it "forgets" empty childNodes. This feature-detects that. + + + var fragment = document.createDocumentFragment(); + fragment[appendChild](document[createTextNode]('g')); + fragment[appendChild](document[createTextNode]('')); + /* istanbul ignore next */ + + var content = _native ? document[importNode](fragment, true) : fragment[cloneNode](true); + return content.childNodes.length < 2 ? function importNode(node, deep) { + var clone = node[cloneNode](); + + for (var + /* istanbul ignore next */ + childNodes = node.childNodes || [], length = childNodes.length, i = 0; deep && i < length; i++) { + clone[appendChild](importNode(childNodes[i], deep)); } + + return clone; + } : + /* istanbul ignore next */ + _native ? document[importNode] : function (node, deep) { + return node[cloneNode](!!deep); }; + }(document, 'appendChild', 'cloneNode', 'createTextNode', 'importNode'); + + var trim = ''.trim || + /* istanbul ignore next */ + function () { + return String(this).replace(/^\s+|\s+/g, ''); + }; + + /*! (c) Andrea Giammarchi - ISC */ + // Custom + var UID = '-' + Math.random().toFixed(6) + '%'; // Edge issue! + + var UID_IE = false; + + try { + if (!function (template, content, tabindex) { + return content in template && (template.innerHTML = '

    ', template[content].childNodes[0].getAttribute(tabindex) == UID); + }(document.createElement('template'), 'content', 'tabindex')) { + UID = '_dt: ' + UID.slice(1, -1) + ';'; + UID_IE = true; + } + } catch (meh) {} + + var UIDC = ''; // DOM + + var COMMENT_NODE = 8; + var ELEMENT_NODE = 1; + var TEXT_NODE = 3; + var SHOULD_USE_TEXT_CONTENT = /^(?:style|textarea)$/i; + var VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i; + + /*! (c) Andrea Giammarchi - ISC */ + function sanitize (template) { + return template.join(UIDC).replace(selfClosing, fullClosing).replace(attrSeeker, attrReplacer); + } + var spaces = ' \\f\\n\\r\\t'; + var almostEverything = '[^' + spaces + '\\/>"\'=]+'; + var attrName = '[' + spaces + ']+' + almostEverything; + var tagName = '<([A-Za-z]+[A-Za-z0-9:._-]*)((?:'; + var attrPartials = '(?:\\s*=\\s*(?:\'[^\']*?\'|"[^"]*?"|<[^>]*?>|' + almostEverything.replace('\\/', '') + '))?)'; + var attrSeeker = new RegExp(tagName + attrName + attrPartials + '+)([' + spaces + ']*/?>)', 'g'); + var selfClosing = new RegExp(tagName + attrName + attrPartials + '*)([' + spaces + ']*/>)', 'g'); + var findAttributes = new RegExp('(' + attrName + '\\s*=\\s*)([\'"]?)' + UIDC + '\\2', 'gi'); + + function attrReplacer($0, $1, $2, $3) { + return '<' + $1 + $2.replace(findAttributes, replaceAttributes) + $3; } - // --------------------------------------------- - // DOM Traversing - // --------------------------------------------- - - // look for attributes that contains the comment text - function attributesSeeker(node, paths, parts) { - for (var - name, realName, attrs, - attribute, - cache = Object.create(null), - attributes = node.attributes, - i = 0, length = attributes.length; - i < length; i++ - ) { - attribute = attributes[i]; - if (attribute.value === UID) { - name = attribute.name; - // this is an IE < 11 thing only - if (name in cache) { - // attributes with unrecognized values - // are duplicated, even if same attribute, across the node - // to fix it, you need to remove it - node.removeAttributeNode(attribute); - // put a value that won't (hopefully) bother IE - cache[name].value = ''; - // and place the node back - node.setAttributeNode(cache[name]); - // this will decrease attributes count by 1 - length--; - // so the loop should be decreased by 1 too - i--; - } else { - realName = parts.shift().replace(/^(?:|[\S\s]*?\s)(\S+?)=['"]?$/, '$1'); - attrs = node.attributes; - // fallback is needed in both jsdom - // and in not-so-standard browsers/engines - cache[name] = attrs[realName] || attrs[realName.toLowerCase()]; - paths.push(Path('attr', cache[name], realName)); - } + function replaceAttributes($0, $1, $2) { + return $1 + ($2 || '"') + UID + ($2 || '"'); + } + + function fullClosing($0, $1, $2) { + return VOID_ELEMENTS.test($1) ? $0 : '<' + $1 + $2 + '>'; + } + + var umap = (function (_) { + return { + // About: get: _.get.bind(_) + // It looks like WebKit/Safari didn't optimize bind at all, + // so that using bind slows it down by 60%. + // Firefox and Chrome are just fine in both cases, + // so let's use the approach that works fast everywhere ๐Ÿ‘ + get: function get(key) { + return _.get(key); + }, + set: function set(key, value) { + return _.set(key, value), value; } + }; + }); + + /* istanbul ignore next */ + + var normalizeAttributes = UID_IE ? function (attributes, parts) { + var html = parts.join(' '); + return parts.slice.call(attributes, 0).sort(function (left, right) { + return html.indexOf(left.name) <= html.indexOf(right.name) ? -1 : 1; + }); + } : function (attributes, parts) { + return parts.slice.call(attributes, 0); + }; + + function find(node, path) { + var length = path.length; + var i = 0; + + while (i < length) { + node = node.childNodes[path[i++]]; } + + return node; } - // walk the fragment tree in search of comments - function hyperSeeker(node, paths, parts) { - for (var - child, - childNodes = node.childNodes, - length = childNodes.length, - i = 0; i < length; i++ - ) { - child = childNodes[i]; + function parse(node, holes, parts, path) { + var childNodes = node.childNodes; + var length = childNodes.length; + var i = 0; + + while (i < length) { + var child = childNodes[i]; + switch (child.nodeType) { case ELEMENT_NODE: - attributesSeeker(child, paths, parts); - hyperSeeker(child, paths, parts); + var childPath = path.concat(i); + parseAttributes(child, holes, parts, childPath); + parse(child, holes, parts, childPath); break; + case COMMENT_NODE: - if (child.textContent === UID) { + var textContent = child.textContent; + + if (textContent === UID) { parts.shift(); - paths.push(Path('any', child)); + holes.push( // basicHTML or other non standard engines + // might end up having comments in nodes + // where they shouldn't, hence this check. + SHOULD_USE_TEXT_CONTENT.test(node.nodeName) ? Text(node, path) : Any(child, path.concat(i))); + } else { + switch (textContent.slice(0, 2)) { + case '/*': + if (textContent.slice(-2) !== '*/') break; + + case "\uD83D\uDC7B": + // ghost + node.removeChild(child); + i--; + length--; + } } + break; + case TEXT_NODE: - if ( - SHOULD_USE_TEXT_CONTENT.test(node.nodeName) && - trim.call(child.textContent) === UIDC - ) { + // the following ignore is actually covered by browsers + // only basicHTML ends up on previous COMMENT_NODE case + // instead of TEXT_NODE because it knows nothing about + // special style or textarea behavior + + /* istanbul ignore if */ + if (SHOULD_USE_TEXT_CONTENT.test(node.nodeName) && trim.call(child.textContent) === UIDC) { parts.shift(); - paths.push(Path('text', node)); + holes.push(Text(node, path)); } + break; } + + i++; } } - // --------------------------------------------- - // Features detection / ugly UA sniffs - // --------------------------------------------- - /* - var importNode = 'importNode' in globalDocument ? - function (doc, node) { - return doc.importNode(node, true); - } : - function (doc, node) { - return node; + function parseAttributes(node, holes, parts, path) { + var attributes = node.attributes; + var cache = []; + var remove = []; + var array = normalizeAttributes(attributes, parts); + var length = array.length; + var i = 0; + + while (i < length) { + var attribute = array[i++]; + var direct = attribute.value === UID; + var sparse; + + if (direct || 1 < (sparse = attribute.value.split(UIDC)).length) { + var name = attribute.name; // the following ignore is covered by IE + // and the IE9 double viewBox test + + /* istanbul ignore else */ + + if (cache.indexOf(name) < 0) { + cache.push(name); + var realName = parts.shift().replace(direct ? /^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/ : new RegExp('^(?:|[\\S\\s]*?\\s)(' + name + ')\\s*=\\s*(\'|")[\\S\\s]*', 'i'), '$1'); + var value = attributes[realName] || // the following ignore is covered by browsers + // while basicHTML is already case-sensitive + + /* istanbul ignore next */ + attributes[realName.toLowerCase()]; + if (direct) holes.push(Attr(value, path, realName, null));else { + var skip = sparse.length - 2; + + while (skip--) { + parts.shift(); + } + + holes.push(Attr(value, path, realName, sparse)); + } + } + + remove.push(attribute); + } + } + + length = remove.length; + i = 0; + /* istanbul ignore next */ + + var cleanValue = 0 < length && UID_IE && !('ownerSVGElement' in node); + + while (i < length) { + // Edge HTML bug #16878726 + var attr = remove[i++]; // IE/Edge bug lighterhtml#63 - clean the value or it'll persist + + /* istanbul ignore next */ + + if (cleanValue) attr.value = ''; // IE/Edge bug lighterhtml#64 - don't use removeAttributeNode + + node.removeAttribute(attr.name); + } // This is a very specific Firefox/Safari issue + // but since it should be a not so common pattern, + // it's probably worth patching regardless. + // Basically, scripts created through strings are death. + // You need to create fresh new scripts instead. + // TODO: is there any other node that needs such nonsense? + + + var nodeName = node.nodeName; + + if (/^script$/i.test(nodeName)) { + // this used to be like that + // var script = createElement(node, nodeName); + // then Edge arrived and decided that scripts created + // through template documents aren't worth executing + // so it became this ... hopefully it won't hurt in the wild + var script = document.createElement(nodeName); + length = attributes.length; + i = 0; + + while (i < length) { + script.setAttributeNode(attributes[i++].cloneNode(true)); + } + + script.textContent = node.textContent; + node.parentNode.replaceChild(script, node); + } + } + + function Any(node, path) { + return { + type: 'any', + node: node, + path: path + }; + } + + function Attr(node, path, name, sparse) { + return { + type: 'attr', + node: node, + path: path, + name: name, + sparse: sparse + }; + } + + function Text(node, path) { + return { + type: 'text', + node: node, + path: path + }; + } + + // globals + var parsed = umap(new WeakMap$1()); + + function createInfo(options, template) { + var markup = (options.convert || sanitize)(template); + var transform = options.transform; + if (transform) markup = transform(markup); + var content = createContent(markup, options.type); + cleanContent(content); + var holes = []; + parse(content, holes, template.slice(0), []); + return { + content: content, + updates: function updates(content) { + var updates = []; + var len = holes.length; + var i = 0; + var off = 0; + + while (i < len) { + var info = holes[i++]; + var node = find(content, info.path); + + switch (info.type) { + case 'any': + updates.push({ + fn: options.any(node, []), + sparse: false + }); + break; + + case 'attr': + var sparse = info.sparse; + var fn = options.attribute(node, info.name, info.node); + if (sparse === null) updates.push({ + fn: fn, + sparse: false + });else { + off += sparse.length - 2; + updates.push({ + fn: fn, + sparse: true, + values: sparse + }); + } + break; + + case 'text': + updates.push({ + fn: options.text(node), + sparse: false + }); + node.textContent = ''; + break; + } + } + + len += off; + return function () { + var length = arguments.length; + + if (len !== length - 1) { + throw new Error(length - 1 + ' values instead of ' + len + '\n' + template.join('${value}')); + } + + var i = 1; + var off = 1; + + while (i < length) { + var update = updates[i - off]; + + if (update.sparse) { + var values = update.values; + var value = values[0]; + var j = 1; + var l = values.length; + off += l - 2; + + while (j < l) { + value += arguments[i++] + values[j++]; + } + + update.fn(value); + } else update.fn(arguments[i++]); + } + + return content; + }; + } + }; + } + + function createDetails(options, template) { + var info = parsed.get(template) || parsed.set(template, createInfo(options, template)); + return info.updates(importNode.call(document, info.content, true)); + } + + var empty = []; + + function domtagger(options) { + var previous = empty; + var updates = cleanContent; + return function (template) { + if (previous !== template) updates = createDetails(options, previous = template); + return updates.apply(null, arguments); + }; + } + + function cleanContent(fragment) { + var childNodes = fragment.childNodes; + var i = childNodes.length; + + while (i--) { + var child = childNodes[i]; + + if (child.nodeType !== 1 && trim.call(child.textContent).length === 0) { + fragment.removeChild(child); + } + } + } + + /*! (c) Andrea Giammarchi - ISC */ + var hyperStyle = function () { + + var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; + var hyphen = /([^A-Z])([A-Z]+)/g; + return function hyperStyle(node, original) { + return 'ownerSVGElement' in node ? svg(node, original) : update(node.style, false); + }; + + function ized($0, $1, $2) { + return $1 + '-' + $2.toLowerCase(); + } + + function svg(node, original) { + var style; + if (original) style = original.cloneNode(true);else { + node.setAttribute('style', '--hyper:style;'); + style = node.getAttributeNode('style'); + } + style.value = ''; + node.setAttributeNode(style); + return update(style, true); + } + + function toStyle(object) { + var key, + css = []; + + for (key in object) { + css.push(key.replace(hyphen, ized), ':', object[key], ';'); + } + + return css.join(''); + } + + function update(style, isSVG) { + var oldType, oldValue; + return function (newValue) { + var info, key, styleValue, value; + + switch (typeof(newValue)) { + case 'object': + if (newValue) { + if (oldType === 'object') { + if (!isSVG) { + if (oldValue !== newValue) { + for (key in oldValue) { + if (!(key in newValue)) { + style[key] = ''; + } + } + } + } + } else { + if (isSVG) style.value = '';else style.cssText = ''; + } + + info = isSVG ? {} : style; + + for (key in newValue) { + value = newValue[key]; + styleValue = typeof value === 'number' && !IS_NON_DIMENSIONAL.test(key) ? value + 'px' : value; + if (!isSVG && /^--/.test(key)) info.setProperty(key, styleValue);else info[key] = styleValue; + } + + oldType = 'object'; + if (isSVG) style.value = toStyle(oldValue = info);else oldValue = newValue; + break; + } + + default: + if (oldValue != newValue) { + oldType = 'string'; + oldValue = newValue; + if (isSVG) style.value = newValue || '';else style.cssText = newValue || ''; + } + + break; + } + }; + } + }(); + + /*! (c) Andrea Giammarchi - ISC */ + var Wire = function (slice, proto) { + proto = Wire.prototype; + proto.ELEMENT_NODE = 1; + proto.nodeType = 111; + + proto.remove = function (keepFirst) { + var childNodes = this.childNodes; + var first = this.firstChild; + var last = this.lastChild; + this._ = null; + + if (keepFirst && childNodes.length === 2) { + last.parentNode.removeChild(last); + } else { + var range = this.ownerDocument.createRange(); + range.setStartBefore(keepFirst ? childNodes[1] : first); + range.setEndAfter(last); + range.deleteContents(); + } + + return first; }; - */ - - var featureFragment = createDocumentFragment(globalDocument); - - // Firefox < 55 has non standard template literals. - // https://bugzilla.mozilla.org/show_bug.cgi?id=1108941 - // TODO: is there any better way to feature detect this ? - var FF = typeof navigator === 'object' && - /Firefox\/(\d+)/.test(navigator.userAgent) && - parseFloat(RegExp.$1) < 55; - - // If attributes order is shuffled, threat the browser differently - // Usually this is a well known IE only limitation but some older FF does the same. - var IE = (function () { - var p = globalDocument.createElement('p'); - p.innerHTML = ''; - return /class/i.test(p.firstChild.attributes[0].name); - }()); - - - // beside IE, old WebKit browsers don't have `children` in DocumentFragment - var WK = !('children' in featureFragment); - - // both Firefox < 55 and TypeScript have issues with template literals - // this lazy defined callback should spot issues right away - // and in the best case scenario become a no-op - var TL = function (template) { - if (template.propertyIsEnumerable('raw') || FF) TL = unique; - else TL = function (t) { return t; }; - return TL(template); - }; - // --------------------------------------------- - // Helpers - // --------------------------------------------- + proto.valueOf = function (forceAppend) { + var fragment = this._; + var noFragment = fragment == null; + if (noFragment) fragment = this._ = this.ownerDocument.createDocumentFragment(); - // used to convert childNodes to Array - var slice = [].slice; + if (noFragment || forceAppend) { + for (var n = this.childNodes, i = 0, l = n.length; i < l; i++) { + fragment.appendChild(n[i]); + } + } - // used to sanitize html - var oEscape = { - '&': '&', - '<': '<', - '>': '>', - "'": ''', - '"': '"' - }; - function fnEscape(m) { - return oEscape[m]; - } + return fragment; + }; - // return content as html - function asHTML(html) { - return {html: html}; - } + return Wire; - // return a single node or an Array or nodes - function createContent(node) { - for (var - child, - content = [], - childNodes = node.childNodes, - i = 0, - length = childNodes.length; - i < length; i++ - ) { - child = childNodes[i]; - if ( - child.nodeType === ELEMENT_NODE || - trim.call(child.textContent).length !== 0 - ) { - content.push(child); - } + function Wire(childNodes) { + var nodes = this.childNodes = slice.call(childNodes, 0); + this.firstChild = nodes[0]; + this.lastChild = nodes[nodes.length - 1]; + this.ownerDocument = nodes[0].ownerDocument; + this._ = null; } - return content.length === 1 ? content[0] : content; - } + }([].slice); - // just a minifier friendly indirection - function createDocumentFragment(document) { - return document.createDocumentFragment(); - } + // Node.CONSTANTS + var DOCUMENT_FRAGMENT_NODE = 11; // SVG related constants - // given a node, inject some html and return - // the resulting template document fragment - function createFragment(node, html) { - return ( - OWNER_SVG_ELEMENT in node ? - createSVGFragment : - createHTMLFragment - )(node, html.replace(no, comments)); - } + var OWNER_SVG_ELEMENT = 'ownerSVGElement'; // Custom Elements / MutationObserver constants - // create fragment for HTML - function createHTMLFragment(node, html) { - var fragment; - var document = node.ownerDocument; - var container = document.createElement( - // TODO: this is a work around for A-Frame V0 based components - // see: https://stackoverflow.com/questions/46797635/aframe-content-not-rendering-on-chrome-with-hyperhtml/46817370 - // TODO: the following RegExp breaks: https://github.com/WebReflection/hyperHTML/issues/135 - // /<([a-z][a-z0-9]*(?:-[a-z0-9]+)+)[\s\S]*?>[\s\S]*?<\/\1>/i.test(html) ? - /<(a-\w+)[\s\S]*?>[\s\S]*?<\/\1>/.test(html) ? - 'div' : 'template' - ); - // var container = document.createElement('template'); - var hasContent = 'content' in container; - var needsTableWrap = false; - if (!hasContent) { - // DO NOT MOVE THE FOLLOWING LINE ELSEWHERE - fragment = createDocumentFragment(document); - // (a jsdom + nodejs tests coverage gotcha) - - // el.innerHTML = ''; is not possible - // if the content is a partial internal table content - // it needs to be wrapped around once injected. - // HTMLTemplateElement does not suffer this issue. - needsTableWrap = /^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html); - } - if (needsTableWrap) { - // secure the RegExp.$1 result ASAP to avoid issues - // in case a non-browser DOM library uses RegExp internally - // when HTML content is injected (basicHTML / jsdom / others...) - var selector = RegExp.$1; - container.innerHTML = '' + html + '
    '; - appendNodes(fragment, slice.call(container.querySelectorAll(selector))); - } else { - container.innerHTML = html; - if (hasContent) { - fragment = container.content; - // fragment = importNode(document, container.content); - } else { - appendNodes(fragment, slice.call(container.childNodes)); - } - } - return fragment; - } + var CONNECTED = 'connected'; + var DISCONNECTED = 'dis' + CONNECTED; - // create a fragment for SVG - function createSVGFragment(node, html) { - var document = node.ownerDocument; - var fragment = createDocumentFragment(document); - if (IE || WK) { - var container = document.createElement('div'); - container.innerHTML = '' + html + ''; - appendNodes(fragment, slice.call(container.firstChild.childNodes)); - } else { - var container = document.createElementNS(SVG_NAMESPACE, 'svg'); - container.innerHTML = html; - appendNodes(fragment, slice.call(container.childNodes)); - } - return fragment; - } + var componentType = Component.prototype.nodeType; + var wireType = Wire.prototype.nodeType; + var observe = disconnected({ + Event: CustomEvent$1, + WeakSet: WeakSet$1 + }); - // given a node, it does what is says - function createText(node, text) { - return node.ownerDocument.createTextNode(text); - } + var asHTML = function asHTML(html) { + return { + html: html + }; + }; // returns nodes from wires and components - // dispatch same event through a list of nodes - function dispatchAll(nodes, type) { - for (var - e, node, - isConnected = type === CONNECTED, - i = 0, length = nodes.length; - i < length; i++ - ) { - node = nodes[i]; - /* istanbul ignore else */ - if (node.nodeType === ELEMENT_NODE) { - e = dispatchTarget(node, isConnected, type, e); - } - } - } - // per each inserted element, check initialization - function dispatchTarget(node, isConnected, type, e) { - /* istanbul ignore next */ - if (components.has(node)) { - node.dispatchEvent(e || (e = new $Event(type))); - } - else if (isConnected && toBeUpgraded.has(node)) { - toBeUpgraded.get(node).$(); + var asNode = function asNode(item, i) { + switch (item.nodeType) { + case wireType: + // in the Wire case, the content can be + // removed, post-pended, inserted, or pre-pended and + // all these cases are handled by domdiff already + + /* istanbul ignore next */ + return 1 / i < 0 ? i ? item.remove(true) : item.lastChild : i ? item.valueOf(true) : item.firstChild; + + case componentType: + return asNode(item.render(), i); + + default: + return item; } - else { - for (var - nodes = getChildren(node), - i = 0, length = nodes.length; - i < length; i++ - ) { - e = dispatchTarget(nodes[i], isConnected, type, e); + }; // returns true if domdiff can handle the value + + + var canDiff = function canDiff(value) { + return 'ELEMENT_NODE' in value; + }; // borrowed from uhandlers + // https://github.com/WebReflection/uhandlers + + + var booleanSetter = function booleanSetter(node, key, oldValue) { + return function (newValue) { + if (oldValue !== !!newValue) { + if (oldValue = !!newValue) node.setAttribute(key, '');else node.removeAttribute(key); } - } - return e; - } + }; + }; - // returns current customElements reference - // compatible with basicHTML too - function getCEClass(node) { - var doc = hyper.document; - var ce = doc.customElements || doc.defaultView.customElements; - return ce && ce.get(node.nodeName.toLowerCase()); - } + var hyperSetter = function hyperSetter(node, name, svg) { + return svg ? function (value) { + try { + node[name] = value; + } catch (nope) { + node.setAttribute(name, value); + } + } : function (value) { + node[name] = value; + }; + }; // when a Promise is used as interpolation value + // its result must be parsed once resolved. + // This callback is in charge of understanding what to do + // with a returned value once the promise is resolved. - // verify that an attribute has - // a special meaning for the node - function isSpecialAttribute(node, name) { - var notSVG = !(OWNER_SVG_ELEMENT in node); - if (notSVG && /-/.test(node.nodeName)) { - var Class = getCEClass(node); - if (Class) node = Class.prototype; - } - return notSVG && name in node; - } - // use a placeholder and resolve with the right callback - function invokeAtDistance(value, callback) { + var invokeAtDistance = function invokeAtDistance(value, callback) { callback(value.placeholder); + if ('text' in value) { Promise.resolve(value.text).then(String).then(callback); } else if ('any' in value) { @@ -748,853 +1529,492 @@ var hyperHTML = (function (globalDocument, majinbuu) {'use strict'; } else if ('html' in value) { Promise.resolve(value.html).then(asHTML).then(callback); } else { - Promise.resolve(invokeTransformer(value, callback)).then(callback); - } - } - - // last attempt to transform content - function invokeTransformer(object, callback) { - for (var key, i = 0, length = transformersKeys.length; i < length; i++) { - key = transformersKeys[i]; - if (object.hasOwnProperty(key)) { - return transformers[key](object[key], callback); - } + Promise.resolve(Intent.invoke(value, callback)).then(callback); } - } + }; // quick and dirty way to check for Promise/ish values - // quick and dirty Node check - function isNode_ish(value) { - return 'ELEMENT_NODE' in value; - } - // quick and dirty Promise check - function isPromise_ish(value) { + var isPromise_ish = function isPromise_ish(value) { return value != null && 'then' in value; - } + }; // list of attributes that should not be directly assigned - // return a descriptor that lazily initialize a property - // unless it hasn't be previously set directly - function lazyGetter(type, fn) { - var secret = '_' + type + '$'; - return { - get: function () { - return this[secret] || (this[type] = fn.call(this, type)); - }, - set: function (value) { - defineProperty(this, secret, {configurable: true, value: value}); - } - }; - } - // uses majinbuu only if the two lists are different - function optimist(aura, value) { - var i = 0, length = aura.length; - if (value.length !== length) { - majinbuu(aura, value, hyper.MAX_LIST_SIZE); - } else { - for (; i < length--; i++) { - if (aura[length] !== value[length] || aura[i] !== value[i]) { - majinbuu(aura, value, hyper.MAX_LIST_SIZE); - return; - } - } - } - } + var readOnly = /^(?:form|list)$/i; // reused every slice time - // remove a list of [node, attribute] - function removeAttributeList(list) { - for (var i = 0, length = list.length; i < length; i++) { - list[i++].removeAttribute(list[i]); - } - } + var slice = [].slice; // simplifies text node creation - // specify the content to update - function setContent(info, target, removeAttributes, childNodes) { - var update; - switch (info.type) { - case 'any': - // TODO: don't pass the target, it shouldn't be needed - update = setAnyContent(target, childNodes, new Aura(target, childNodes)); - break; - case 'attr': - update = setAttribute(target, removeAttributes, info.name); - break; - case 'text': - update = setTextContent(target); - break; - } - return update; - } + var text = function text(node, _text) { + return node.ownerDocument.createTextNode(_text); + }; - // used for common path creation. - function Path(type, node, name) { - return {type: type, path: createPath(node), name: name}; + function Tagger(type) { + this.type = type; + return domtagger(this); } - // --------------------------------------------- - // Hybrid Shims - // --------------------------------------------- - - var CONNECTED = 'connected'; - var DISCONNECTED = 'dis' + CONNECTED; - var $Event; - - try { - new Event(CONNECTED); - $Event = Event; - } catch(o_O) { - $Event = function (type) { - var e = hyper.document.createEvent('Event'); - e.initEvent(type, false, false); - return e; - }; - } + Tagger.prototype = { + // there are four kind of attributes, and related behavior: + // * events, with a name starting with `on`, to add/remove event listeners + // * special, with a name present in their inherited prototype, accessed directly + // * regular, accessed through get/setAttribute standard DOM methods + // * style, the only regular attribute that also accepts an object as value + // so that you can style=${{width: 120}}. In this case, the behavior has been + // fully inspired by Preact library and its simplicity. + attribute: function attribute(node, name, original) { + var isSVG = (OWNER_SVG_ELEMENT in node); + var oldValue; // if the attribute is the style one + // handle it differently from others + + if (name === 'style') return hyperStyle(node, original, isSVG); // direct accessors for and friends + else if (name.slice(0, 1) === '.') return hyperSetter(node, name.slice(1), isSVG); // boolean accessors for and friends + else if (name.slice(0, 1) === '?') return booleanSetter(node, name.slice(1)); // the name is an event one, + // add/remove event listeners accordingly + else if (/^on/.test(name)) { + var type = name.slice(2); + + if (type === CONNECTED || type === DISCONNECTED) { + observe(node); + } else if (name.toLowerCase() in node) { + type = type.toLowerCase(); + } - try { - (new MutationObserver(function (records) { - for (var record, i = 0, length = records.length; i < length; i++) { - record = records[i]; - dispatchAll(record.removedNodes, DISCONNECTED); - dispatchAll(record.addedNodes, CONNECTED); - } - })).observe(globalDocument, {subtree: true, childList: true}); - } catch(o_O) { - globalDocument.addEventListener('DOMNodeInserted', function (e) { - dispatchAll([e.target], CONNECTED); - }, false); - globalDocument.addEventListener('DOMNodeRemoved', function (e) { - dispatchAll([e.target], DISCONNECTED); - }, false); - } + return function (newValue) { + if (oldValue !== newValue) { + if (oldValue) node.removeEventListener(type, oldValue, false); + oldValue = newValue; + if (newValue) node.addEventListener(type, newValue, false); + } + }; + } // the attribute is special ('value' in input) + // and it's not SVG *or* the name is exactly data, + // in this case assign the value directly + else if (name === 'data' || !isSVG && name in node && !readOnly.test(name)) { + return function (newValue) { + if (oldValue !== newValue) { + oldValue = newValue; + + if (node[name] !== newValue && newValue == null) { + // cleanup on null to avoid silly IE/Edge bug + node[name] = ''; + node.removeAttribute(name); + } else node[name] = newValue; + } + }; + } else if (name in Intent.attributes) { + return function (any) { + var newValue = Intent.attributes[name](node, any); - // WeakMap with partial UID fallback - var $WeakMap = typeof WeakMap === typeof $WeakMap ? - function () { - // NOT A POLYFILL: simplified ad-hoc for this library cases - /* istanbul ignore next */ - return { - delete: function (obj) { delete obj[UID]; }, - get: function (obj) { return obj[UID]; }, - has: function (obj) { return UID in obj; }, - set: function (obj, value) { - Object.defineProperty(obj, UID, { - configurable: true, - value: value - }); - } - }; - } : - WeakMap; + if (oldValue !== newValue) { + oldValue = newValue; + if (newValue == null) node.removeAttribute(name);else node.setAttribute(name, newValue); + } + }; + } // in every other case, use the attribute node as it is + // update only the value, set it as node only when/if needed + else { + var owner = false; + var attribute = original.cloneNode(true); + return function (newValue) { + if (oldValue !== newValue) { + oldValue = newValue; + + if (attribute.value !== newValue) { + if (newValue == null) { + if (owner) { + owner = false; + node.removeAttributeNode(attribute); + } + + attribute.value = newValue; + } else { + attribute.value = newValue; + + if (!owner) { + owner = true; + node.setAttributeNode(attribute); + } + } + } + } + }; + } + }, + // in a hyper(node)`
    ${content}
    ` case + // everything could happen: + // * it's a JS primitive, stored as text + // * it's null or undefined, the node should be cleaned + // * it's a component, update the content by rendering it + // * it's a promise, update the content once resolved + // * it's an explicit intent, perform the desired operation + // * it's an Array, resolve all values if Promises and/or + // update the node with the resulting list of content + any: function any(node, childNodes) { + var diffOptions = { + node: asNode, + before: node + }; + var nodeType = OWNER_SVG_ELEMENT in node ? + /* istanbul ignore next */ + 'svg' : 'html'; + var fastPath = false; + var oldValue; + + var anyContent = function anyContent(value) { + switch (typeof(value)) { + case 'string': + case 'number': + case 'boolean': + if (fastPath) { + if (oldValue !== value) { + oldValue = value; + childNodes[0].textContent = value; + } + } else { + fastPath = true; + oldValue = value; + childNodes = domdiff(node.parentNode, childNodes, [text(node, value)], diffOptions); + } - var $WeakSet = typeof WeakSet === typeof $WeakSet ? - function () { - var wm = new $WeakMap; - // NOT A POLYFILL: simplified ad-hoc for this library cases - /* istanbul ignore next */ - return { - add: function (obj) { wm.set(obj, true); }, - has: function (obj) { return wm.get(obj) === true; } - }; - } : - WeakSet; - - // Map with partial double Array fallback - var $Map = typeof Map === typeof $Map ? - function () { - var k = [], v = []; - return { - get: function (obj) { - return v[k.indexOf(obj)]; - }, - // being used with unique template literals - // there is never a case when a value is overwritten - // no need to check upfront for the indexOf - set: function (obj, value) { - v[k.push(obj) - 1] = value; - } - }; - } : - Map; + break; - // TODO: which browser needs these partial polyfills here? + case 'function': + anyContent(value(node)); + break; - // BB7 and webOS need this - var isArray = Array.isArray || - (function () { - var toString = {}.toString; - // I once had an engine returning [array Array] - // and I've got scared since! - var s = toString.call([]); - return function (a) { - return toString.call(a) === s; - }; - }()); + case 'object': + case 'undefined': + if (value == null) { + fastPath = false; + childNodes = domdiff(node.parentNode, childNodes, [], diffOptions); + break; + } - // older WebKit need this - var trim = EXPANDO.trim || - function () { return this.replace(/^\s+|\s+$/g, ''); }; + default: + fastPath = false; + oldValue = value; - // --------------------------------------------- - // Shared variables - // --------------------------------------------- + if (isArray(value)) { + if (value.length === 0) { + if (childNodes.length) { + childNodes = domdiff(node.parentNode, childNodes, [], diffOptions); + } + } else { + switch (typeof(value[0])) { + case 'string': + case 'number': + case 'boolean': + anyContent({ + html: value + }); + break; - // recycled defineProperty shortcut - var defineProperty = Object.defineProperty; + case 'object': + if (isArray(value[0])) { + value = value.concat.apply([], value); + } - // transformers registry - var transformers = {}; - var transformersKeys = []; + if (isPromise_ish(value[0])) { + Promise.all(value).then(anyContent); + break; + } - // normalize Firefox issue with template literals - var templateObjects = {}, unique; - function unique(template) { - var key = '_' + template.join(UIDC); - return templateObjects[key] || - (templateObjects[key] = template); - } + default: + childNodes = domdiff(node.parentNode, childNodes, value, diffOptions); + break; + } + } + } else if (canDiff(value)) { + childNodes = domdiff(node.parentNode, childNodes, value.nodeType === DOCUMENT_FRAGMENT_NODE ? slice.call(value.childNodes) : [value], diffOptions); + } else if (isPromise_ish(value)) { + value.then(anyContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, anyContent); + } else if ('text' in value) { + anyContent(String(value.text)); + } else if ('any' in value) { + anyContent(value.any); + } else if ('html' in value) { + childNodes = domdiff(node.parentNode, childNodes, slice.call(createContent([].concat(value.html).join(''), nodeType).childNodes), diffOptions); + } else if ('length' in value) { + anyContent(slice.call(value)); + } else { + anyContent(Intent.invoke(value, anyContent)); + } - // use native .append(...childNodes) where available - var appendNodes = 'append' in featureFragment ? - function (node, childNodes) { - node.append.apply(node, childNodes); - } : - function appendNodes(node, childNodes) { - for (var - i = 0, - length = childNodes.length; - i < length; i++ - ) { - node.appendChild(childNodes[i]); + break; } }; - // returns children or retrieve them in IE/Edge - var getChildren = WK || IE ? - function (node) { - for (var - child, - children = [], - childNodes = node.childNodes, - j = 0, i = 0, length = childNodes.length; - i < length; i++ - ) { - child = childNodes[i]; - if (child.nodeType === ELEMENT_NODE) - children[j++] = child; - } - return children; - } : - function (node) { return node.children; }; - - // return the correct node walking through a path - // fixes IE/Edge issues with attributes and children (fixes old WebKit too) - var getNode = IE || WK ? - function (parentNode, path) { - for (var name, i = 0, length = path.length; i < length; i++) { - name = path[i++]; - switch (name) { - case 'children': - parentNode = getChildren(parentNode)[path[i]]; - break; - default: - parentNode = parentNode[name][path[i]]; - break; + return anyContent; + }, + // style or textareas don't accept HTML as content + // it's pointless to transform or analyze anything + // different from text there but it's worth checking + // for possible defined intents. + text: function text(node) { + var oldValue; + + var textContent = function textContent(value) { + if (oldValue !== value) { + oldValue = value; + + var type = typeof(value); + + if (type === 'object' && value) { + if (isPromise_ish(value)) { + value.then(textContent); + } else if ('placeholder' in value) { + invokeAtDistance(value, textContent); + } else if ('text' in value) { + textContent(String(value.text)); + } else if ('any' in value) { + textContent(value.any); + } else if ('html' in value) { + textContent([].concat(value.html).join('')); + } else if ('length' in value) { + textContent(slice.call(value).join('')); + } else { + textContent(Intent.invoke(value, textContent)); + } + } else if (type === 'function') { + textContent(value(node)); + } else { + node.textContent = value == null ? '' : value; } } - return parentNode; - } : - function (parentNode, path) { - for (var i = 0, length = path.length; i < length; i++) { - parentNode = parentNode[path[i++]][path[i]]; - } - return parentNode; }; - // sanitizes interpolations as comments - var attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+'; - var no = new RegExp('(<[a-z]+[a-z0-9:_-]*)((?:' + attrName + '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*\/?>)', 'gi'); - var findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi'); - var comments = function ($0, $1, $2, $3) { - return $1 + $2.replace(findAttributes, replaceAttributes) + $3; + return textContent; + } }; - var replaceAttributes = function ($0, $1, $2) { - return $1 + ($2 || '"') + UID + ($2 || '"'); - }; + var isNoOp = false; - // list of components with connected/disconnected - var components = new $WeakSet; - - // [element] = {template, updates}; - var hypers = new $WeakMap; - - // [element] = {template, updates}; - var wires = new $WeakMap; - - // [template] = {fragment, paths}; - var templates = new $Map; - - // [node] = onupgrade - var toBeUpgraded = new $WeakMap; - - // internal signal to switch adoption - var notAdopting = true; - - // IE 11 has problems with cloning templates too - // it "forgets" empty childNodes - var cloneNode = (function () { - featureFragment.appendChild(createText(featureFragment, 'g')); - featureFragment.appendChild(createText(featureFragment, '')); - return featureFragment.cloneNode(true).childNodes.length === 1 ? - function (node) { - for (var - clone = node.cloneNode(), - childNodes = node.childNodes || [], - i = 0, length = childNodes.length; - i < length; i++ - ) { - clone.appendChild(cloneNode(childNodes[i])); - } - return clone; - } : - function (fragment) { - return fragment.cloneNode(true); - }; - }()); + var _templateLiteral = function templateLiteral(tl) { + var RAW = 'raw'; - // --------------------------------------------- - // Adopting Nodes - // --------------------------------------------- + var isBroken = function isBroken(UA) { + return /(Firefox|Safari)\/(\d+)/.test(UA) && !/(Chrom[eium]+|Android)\/(\d+)/.test(UA); + }; - // IE/Edge gotcha with comment nodes - var nextElementSibling = IE ? - function (node) { - while (node = node.nextSibling) { - if (node.nodeType === ELEMENT_NODE) return node; - } - return undefined; - } : - function (node) { return node.nextElementSibling; }; + var broken = isBroken((document.defaultView.navigator || {}).userAgent); + var FTS = !(RAW in tl) || tl.propertyIsEnumerable(RAW) || !Object.isFrozen(tl[RAW]); - var previousElementSibling = IE ? - function (node) { - while (node = node.previousSibling) { - if (node.nodeType === ELEMENT_NODE) return node; - } - return undefined; - } : - function (node) { return node.previousElementSibling; }; - - // remove all text nodes from a virtual space - function removePreviousText(parentNode, node) { - var previousSibling = node.previousSibling; - if (previousSibling && previousSibling.nodeType === TEXT_NODE) { - parentNode.removeChild(previousSibling); - removePreviousText(parentNode, node); - } - } + if (broken || FTS) { + var forever = {}; - // avoid errors on obsolete platforms - function insertBefore(parentNode, target, after) { - if (after) { - parentNode.insertBefore(target, after); - } else { - parentNode.appendChild(target); - } - } + var foreverCache = function foreverCache(tl) { + for (var key = '.', i = 0; i < tl.length; i++) { + key += tl[i].length + '.' + tl[i]; + } - // given an info, tries to find out the best option - // to replace or update the content - function discoverNode(parentNode, virtual, info, childNodes) { - for (var - target = parentNode, - document = parentNode.ownerDocument, - path = info.path, - virtualNode = getNode(virtual, path), - i = 0, - length = path.length; - i < length; i++ - ) { - switch (path[i++]) { - case 'attributes': - var name = virtualNode.name; - if (!parentNode.hasAttribute(name)) { - parentNode.setAttribute(name, ''); - } - target = parentNode.attributes[name]; - break; - case 'childNodes': - var children = getChildren(parentNode); - var virtualChildren = getChildren(virtualNode.parentNode); - target = previousElementSibling(virtualNode); - var before = target ? (path.indexOf.call(virtualChildren, target) + 1) : -1; - target = nextElementSibling(virtualNode); - var after = target ? path.indexOf.call(virtualChildren, target) : -1; - target = document.createComment(UID); - switch (true) { - // `${'virtual'}` is actually resolved as `${'any'}` - // case before < 0 && after < 0: before = 0; - - // `${'virtual'}` - case after < 0: - after = children.length; - break; - // `${'virtual'}` - case before < 0: - before = 0; - // `${'virtual'}` - default: - after = -(virtualChildren.length - after); - break; - } - childNodes.push.apply( - childNodes, - slice.call(children, before, after) - ); - if (childNodes.length) { - insertBefore( - parentNode, - target, - nextElementSibling(childNodes[childNodes.length - 1]) - ); - } else { - insertBefore( - parentNode, - target, - slice.call(children, after)[0] - ); - } - if (childNodes.length === 0) { - removePreviousText(parentNode, target); - } - break; - default: - // if the node is not there, create it - target = getChildren(parentNode)[path[i]] || - parentNode.appendChild( - parentNode.ownerDocument.createElement( - getNode(virtual, path.slice(0, i + 1)).nodeName - ) - ); - parentNode = target; - break; - } - } - return target; - } + return forever[key] || (forever[key] = tl); + }; // Fallback TypeScript shenanigans - // like createUpdates but for nodes with already a content - function discoverUpdates(fragment, paths) { - for (var - info, childNodes, - updates = [], - removeAttributes = [], - i = 0, length = paths.length; - i < length; i++ - ) { - childNodes = []; - info = paths[i]; - updates[i] = setContent( - info, - discoverNode(this, fragment, info, childNodes), - removeAttributes, - childNodes - ); - } - removeAttributeList(removeAttributes); - return updates; - } - // --------------------------------------------- - // Template related utilities - // --------------------------------------------- - - // given a unique template object - // create, parse, and store retrieved info - function createTemplate(template) { - var paths = []; - var fragment = createFragment(this, template.join(UIDC)); - var info = {fragment: fragment, paths: paths}; - hyperSeeker(fragment, paths, template.slice()); - templates.set(template, info); - return info; - } + if (FTS) _templateLiteral = foreverCache; // try fast path for other browsers: + // store the template as WeakMap key + // and forever cache it only when it's not there. + // this way performance is still optimal, + // penalized only when there are GC issues + else { + var wm = new WeakMap$1(); - // given a generic node, returns a path capable - // of retrieving such path back again. - // TODO: worth passing the index when available ? - function createPath(node) { - var path = []; - var parentNode; - switch(node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - parentNode = node; - break; - case COMMENT_NODE: - parentNode = node.parentNode; - path.unshift( - 'childNodes', - path.indexOf.call(parentNode.childNodes, node) - ); - break; - case ATTRIBUTE_NODE: - default: // jsdom here does not provide a nodeType 2 ... - parentNode = node.ownerElement; - path.unshift('attributes', node.name); - break; - } - for ( - node = parentNode; - parentNode = parentNode.parentNode; - node = parentNode - ) { - path.unshift('children', path.indexOf.call(getChildren(parentNode), node)); - } - return path; - } + var set = function set(tl, unique) { + wm.set(tl, unique); + return unique; + }; - // given a root node and a list of paths - // creates an array of updates to invoke - // whenever the next interpolation happens - function createUpdates(fragment, paths) { - for (var - info, - updates = [], - removeAttributes = [], - i = 0, length = paths.length; - i < length; i++ - ) { - info = paths[i]; - updates[i] = setContent( - info, - getNode(fragment, info.path), - removeAttributes, - [] - ); + _templateLiteral = function templateLiteral(tl) { + return wm.get(tl) || set(tl, foreverCache(tl)); + }; + } + } else { + isNoOp = true; } - removeAttributeList(removeAttributes); - return updates; - } - // invokes each update function passing interpolated value - function update() { - for (var i = 1, length = arguments.length; i < length; i++) { - this[i - 1](arguments[i]); - } - } + return TL(tl); + }; - // create a template, if unknown - // upgrade a node to use such template for future updates - function upgrade(template) { - template = TL(template); - var updates; - var info = templates.get(template) || - createTemplate.call(this, template); - if (notAdopting) { - var fragment = cloneNode(info.fragment); - updates = createUpdates.call(this, fragment, info.paths); - hypers.set(this, {template: template, updates: updates}); - update.apply(updates, arguments); - this.textContent = ''; - this.appendChild(fragment); - } else { - updates = discoverUpdates.call(this, info.fragment, info.paths); - hypers.set(this, {template: template, updates: updates}); - update.apply(updates, arguments); - } + function TL(tl) { + return isNoOp ? tl : _templateLiteral(tl); } - // --------------------------------------------- - // Wires - // --------------------------------------------- - - // create a new wire for generic DOM content - function wireContent(type) { - var adopter, content, container, fragment, render, setup, template; + function tta (template) { + var length = arguments.length; + var args = [TL(template)]; + var i = 1; - function before(document) { - fragment = createDocumentFragment(document); - container = type === 'svg' ? - document.createElementNS(SVG_NAMESPACE, 'svg') : - fragment; - render = bind(container); + while (i < length) { + args.push(arguments[i++]); } - function after() { - if (setup) { - setup = false; - if (type === 'svg') { - appendNodes(fragment, slice.call(container.childNodes)); - } - content = createContent(fragment); + return args; + } + /** + * best benchmark goes here + * https://jsperf.com/tta-bench + * I should probably have an @ungap/template-literal-es too + export default (...args) => { + args[0] = unique(args[0]); + return args; + }; + */ + + var wires = new WeakMap$1(); // A wire is a callback used as tag function + // to lazily relate a generic object to a template literal. + // hyper.wire(user)`
    ${user.name}
    `; => the div#user + // This provides the ability to have a unique DOM structure + // related to a unique JS object through a reusable template literal. + // A wire can specify a type, as svg or html, and also an id + // via html:id or :id convention. Such :id allows same JS objects + // to be associated to different DOM structures accordingly with + // the used template literal without losing previously rendered parts. + + var wire = function wire(obj, type) { + return obj == null ? content(type || 'html') : weakly(obj, type || 'html'); + }; // A wire content is a virtual reference to one or more nodes. + // It's represented by either a DOM node, or an Array. + // In both cases, the wire content role is to simply update + // all nodes through the list of related callbacks. + // In few words, a wire content is like an invisible parent node + // in charge of updating its content like a bound element would do. + + + var content = function content(type) { + var wire, tagger, template; + return function () { + var args = tta.apply(null, arguments); + + if (template !== args[0]) { + template = args[0]; + tagger = new Tagger(type); + wire = wireContent(tagger.apply(tagger, args)); + } else { + tagger.apply(tagger, args); } - return content; - } - return type === 'adopt' ? - function adopt(statics) { - var args = arguments; - statics = TL(statics); - if (template !== statics) { - setup = true; - template = statics; - adopter = function (parentNode, children, i) { - if (setup) { - if (i < children.length) { - container = children[i]; - fragment = { - ownerDocument: container.ownerDocument, - childNodes: [container], - children: [container] - }; - render = hyper.adopt(fragment); - } else { - if (OWNER_SVG_ELEMENT in parentNode) type = 'svg'; - before(parentNode.ownerDocument); - } - } - render.apply(null, args); - return after(); - }; - } - return adopter; - } : - function update(statics) { - statics = TL(statics); - if (template !== statics) { - setup = true; - template = statics; - before(hyper.document); - } - render.apply(null, arguments); - return after(); - }; - } + return wire; + }; + }; // wires are weakly created through objects. + // Each object can have multiple wires associated + // and this is thanks to the type + :id feature. - // setup a weak reference if needed and return a wire by ID - function wireWeakly(obj, type) { - var wire = wires.get(obj); + + var weakly = function weakly(obj, type) { var i = type.indexOf(':'); + var wire = wires.get(obj); var id = type; + if (-1 < i) { id = type.slice(i + 1); type = type.slice(0, i) || 'html'; } - if (!wire) { - wire = {}; - wires.set(obj, wire); - } - return wire[id] || (wire[id] = wireContent(type)); - } - // avoid processing too many nodes - // this is about the algorithm used - // to calculate the least amount of DOM - // changes needed to show the a new list - // where there was another one. - // There is a limit, in terms of performance, - // on how big can the optimal computation be, - // so if you change this value be sure your - // target hardware is good enough. - hyper.MAX_LIST_SIZE = 1000; - - // --------------------------------------------- - // โšก๏ธ ๏ธ๏ธThe End โžฐ - // --------------------------------------------- - return hyper; + if (!wire) wires.set(obj, wire = {}); + return wire[id] || (wire[id] = content(type)); + }; // A document fragment loses its nodes + // as soon as it is appended into another node. + // This has the undesired effect of losing wired content + // on a second render call, because (by then) the fragment would be empty: + // no longer providing access to those sub-nodes that ultimately need to + // stay associated with the original interpolation. + // To prevent hyperHTML from forgetting about a fragment's sub-nodes, + // fragments are instead returned as an Array of nodes or, if there's only one entry, + // as a single referenced node which, unlike fragments, will indeed persist + // wire content throughout multiple renderings. + // The initial fragment, at this point, would be used as unique reference to this + // array of nodes or to this single referenced node. + + + var wireContent = function wireContent(node) { + var childNodes = node.childNodes; + var length = childNodes.length; + return length === 1 ? childNodes[0] : length ? new Wire(childNodes) : node; + }; -}(document, function () {'use strict'; - - /*! Copyright (c) 2017, Andrea Giammarchi, @WebReflection */ - - // grid operations - var - DELETE = 'del', - INSERT = 'ins', - SUBSTITUTE = 'sub', - TypedArray = /^u/.test(typeof Int32Array) ? Array : Int32Array - ; - - function majinbuu(from, to, MAX_SIZE) { - var - fromLength = from.length, - toLength = to.length, - TOO_MANY = (MAX_SIZE || Infinity) < Math.sqrt((fromLength || 1) * (toLength || 1)) - ; - if (fromLength < 1 || TOO_MANY) { - /* istanbul ignore next */ - if (toLength || TOO_MANY) { - from.splice.apply(from, [0, fromLength].concat(to)); - } - return; - } - if (toLength < 1) { - from.splice(0); - return; - } - performOperations( - from, - getOperations(from, to, levenstein(from, to)) - ); - } + // are already known to hyperHTML - // given an object that would like to intercept - // all splice operations performed through a list, - // wraps the list.splice method to delegate such object - // and it puts back original splice right before - // every invocation. - // Note: do not use the same list in two different aura - majinbuu.aura = function aura(splicer, list) { - var splice = list.splice; - list.splice = function hodor() { - list.splice = splice; - var result = splicer.splice.apply(splicer, arguments); - list.splice = hodor; - return result; - }; - return list; - }; + var bewitched = new WeakMap$1(); // better known as hyper.bind(node), the render is + // the main tag function in charge of fully upgrading + // or simply updating, contexts used as hyperHTML targets. + // The `this` context is either a regular DOM node or a fragment. - return majinbuu; - - // Helpers - - - - - - - - - - - - - - - - - - - - - - - - // originally readapted from: - // http://webreflection.blogspot.co.uk/2009/02/levenshtein-algorithm-revisited-25.html - // then rewritten in C for Emscripten (see levenstein.c) - // then "screw you ASM" due no much gain but very bloated code - function levenstein(from, to) { - var fromLength = from.length + 1; - var toLength = to.length + 1; - var size = fromLength * toLength; - var x = 0; - var y = 0; - var X = 0; - var Y = 0; - var crow = 0; - var prow = 0; - var del, ins, sub; - var grid = new TypedArray(size); - grid[0] = 0; - while (++x < toLength) grid[x] = x; - while (++y < fromLength) { - X = x = 0; - prow = crow; - crow = y * toLength; - grid[crow + x] = y; - while (++x < toLength) { - del = grid[prow + x] + 1; - ins = grid[crow + X] + 1; - sub = grid[prow + X] + (from[Y] == to[X] ? 0 : 1); - grid[crow + x] = del < ins ? - (del < sub ? - del : sub) : - (ins < sub ? - ins : sub); - ++X; - }; - Y = y; + function render() { + var wicked = bewitched.get(this); + var args = tta.apply(null, arguments); + + if (wicked && wicked.template === args[0]) { + wicked.tagger.apply(null, args); + } else { + upgrade.apply(this, args); } - return grid; - } - // add operations (in reversed order) - function addOperation(list, type, x, y, count, items) { - list.unshift({ - type: type, - x: x, - y: y, - count: count, - items: items + return this; + } // an upgrade is in charge of collecting template info, + // parse it once, if unknown, to map all interpolations + // as single DOM callbacks, relate such template + // to the current context, and render it after cleaning the context up + + + function upgrade(template) { + var type = OWNER_SVG_ELEMENT in this ? 'svg' : 'html'; + var tagger = new Tagger(type); + bewitched.set(this, { + tagger: tagger, + template: template }); + this.textContent = ''; + this.appendChild(tagger.apply(null, arguments)); } - // walk the Levenshtein grid bottom -> up - function getOperations(Y, X, grid) { - var - list = [], - YL = Y.length + 1, - XL = X.length + 1, - y = YL - 1, - x = XL - 1, - cell, top, left, diagonal, - crow, prow - ; - while (x && y) { - crow = y * XL + x; - prow = crow - XL; - cell = grid[crow]; - top = grid[prow]; - left = grid[crow - 1]; - diagonal = grid[prow - 1]; - if (diagonal <= left && diagonal <= top && diagonal <= cell) { - x--; - y--; - if (diagonal < cell) { - addOperation(list, SUBSTITUTE, x, y, 1, [X[x]]); - } - } - else if (left <= top && left <= cell) { - x--; - addOperation(list, INSERT, x, y, 0, [X[x]]); - } - else { - y--; - addOperation(list, DELETE, x, y, 1, []); - } - } - while (x--) { - addOperation(list, INSERT, x, y, 0, [X[x]]); - } - while (y--) { - addOperation(list, DELETE, x, y, 1, []); - } - return list; - } + /*! (c) Andrea Giammarchi (ISC) */ + // you can do the following + // const {bind, wire} = hyperHTML; + // and use them right away: bind(node)`hello!`; - /* grouped operations */ - function performOperations(target, operations) { - var - diff = 0, - i = 1, - length = operations.length, - curr, prev, op - ; - /* istanbul ignore else */ - if (length) { - op = (prev = operations[0]); - while (i < length) { - curr = operations[i++]; - if (prev.type === curr.type && (curr.x - prev.x) <= 1 && (curr.y - prev.y) <= 1) { - op.count += curr.count; - op.items = op.items.concat(curr.items); - } else { - target.splice.apply(target, [op.y + diff, op.count].concat(op.items)); - diff += op.type === INSERT ? - op.items.length : (op.type === DELETE ? - -op.count : 0); - op = curr; - } - prev = curr; - } - target.splice.apply(target, [op.y + diff, op.count].concat(op.items)); - } - } + var bind = function bind(context) { + return render.bind(context); + }; - /* one-by-one operation (testing purpose) - function performOperations(target, operations) { - for (var op, diff = 0, i = 0, length = operations.length; i < length; i++) { - op = operations[i]; - target.splice.apply(target, [op.y + diff, op.count].concat(op.items)); - diff += op.type === INSERT ? - op.items.length : (op.type === DELETE ? - -op.count : 0); - } + var define = Intent.define; + var tagger = Tagger.prototype; + hyper.Component = Component; + hyper.bind = bind; + hyper.define = define; + hyper.diff = domdiff; + hyper.hyper = hyper; + hyper.observe = observe; + hyper.tagger = tagger; + hyper.wire = wire; // exported as shared utils + // for projects based on hyperHTML + // that don't necessarily need upfront polyfills + // i.e. those still targeting IE + + hyper._ = { + WeakMap: WeakMap$1, + WeakSet: WeakSet$1 + }; // the wire content is the lazy defined + // html or svg property of each hyper.Component + + setup(content); // everything is exported directly or through the + // that "magically" understands what's the best + // thing to do with passed arguments + + function hyper(HTML) { + return arguments.length < 2 ? HTML == null ? content('html') : typeof HTML === 'string' ? hyper.wire(null, HTML) : 'raw' in HTML ? content('html')(HTML) : 'nodeType' in HTML ? hyper.bind(HTML) : weakly(HTML, 'html') : ('raw' in HTML ? content('html') : hyper.wire).apply(null, arguments); } - // */ -}())); + + + + + + + + + + + return hyper; -// umd.KISS -try { module.exports = hyperHTML; } catch(o_O) {} \ No newline at end of file +}(document)); diff --git a/index.v2.js b/index.v2.js deleted file mode 100644 index 2f06d9ee..00000000 --- a/index.v2.js +++ /dev/null @@ -1,620 +0,0 @@ -var hyperHTML = function (cache, modules) { - function require(i) { - return cache[i] || get(i); - } - function get(i) { - var exports = {}, - module = { exports: exports }; - modules[i].call(exports, window, require, module, exports); - return cache[i] = module.exports; - } - var main = require(0); - return main.__esModule ? main.default : main; -}([], [function (global, require, module, exports) { - // main.js - 'use strict'; - - require(1); - require(3); - require(5); - - var hyper = function hyper() {}; - Object.defineProperty(exports, '__esModule', { value: true }).default = hyper; -}, function (global, require, module, exports) { - // classes/Aura.js - 'use strict'; - - var majinbuu = function (m) { - return m.__esModule ? m.default : m; - }(require(2)); - - // used as class but it returns a modified childNodes - // it's not worth to use Babel class transpilation - // for an utility facade with a context for convenience - Object.defineProperty(exports, '__esModule', { value: true }).default = Aura; - - function Aura(node, childNodes) { - this.node = node; - this.childNodes = childNodes; - childNodes.become = become; - return majinbuu.aura(this, childNodes); - } - - // reflected through hyperHTML.MAX_LIST_SIZE - Aura.MAX_LIST_SIZE = 1000; - - // wraps childNodes splice to pass through the Aura - Aura.prototype.splice = function splice() { - var ph = this.node; - var cn = this.childNodes; - var target = cn[(arguments.length <= 0 ? undefined : arguments[0]) + ((arguments.length <= 1 ? undefined : arguments[1]) || 0)] || ph; - var result = cn.splice.apply(cn, arguments); - var pn = ph.parentNode; - var doc = pn.ownerDocument; - for (var tmp, i = 0, length = result.length; i < length; i++) { - tmp = result[i]; - // TODO: this is not optimal (but necessary) - if (cn.indexOf(tmp) < 0) { - pn.removeChild(tmp); - } - } - for (var _tmp, _i = 2, _length = arguments.length; _i < _length; pn.insertBefore(_tmp, target)) { - if (_length - _i === 1) { - var _ref; - - _tmp = (_ref = _i++, arguments.length <= _ref ? undefined : arguments[_ref]); - } else { - _tmp = doc.createDocumentFragment(); - while (_i < _length) { - var _ref2; - - _tmp.appendChild((_ref2 = _i++, arguments.length <= _ref2 ? undefined : arguments[_ref2])); - } - } - } - return result; - }; - - function become(value) { - var i = 0, - length = this.length; - if (value.length !== length) { - majinbuu(this, value, Aura.MAX_LIST_SIZE); - } else { - for (; i < length--; i++) { - if (this[length] !== value[length] || this[i] !== value[i]) { - majinbuu(this, value, Aura.MAX_LIST_SIZE); - return; - } - } - } - } -}, function (global, require, module, exports) { - // ../node_modules/majinbuu/cjs/main.js - 'use strict'; - /*! Copyright (c) 2017, Andrea Giammarchi, @WebReflection */ - - // grid operations - - var DELETE = 'del'; - var INSERT = 'ins'; - var SUBSTITUTE = 'sub'; - - // typed Array - var TypedArray = global.Int32Array || Array; - - var majinbuu = function majinbuu(from, to, MAX_SIZE) { - - var fromLength = from.length; - var toLength = to.length; - var TOO_MANY = (MAX_SIZE || Infinity) < Math.sqrt((fromLength || 1) * (toLength || 1)); - - if (fromLength < 1 || TOO_MANY) { - if (toLength || TOO_MANY) { - from.splice.apply(from, [0, fromLength].concat(to)); - } - return; - } - if (toLength < 1) { - from.splice(0); - return; - } - performOperations(from, getOperations(from, to, levenstein(from, to))); - }; - - // given an object that would like to intercept - // all splice operations performed through a list, - // wraps the list.splice method to delegate such object - // and it puts back original splice right before every invocation. - // Note: do not use the same list in two different aura - var aura = function aura(splicer, list) { - var splice = list.splice; - var $splice = function $splice() { - list.splice = splice; - var result = splicer.splice.apply(splicer, arguments); - list.splice = $splice; - return result; - }; - list.splice = $splice; - return list; - }; - - // Helpers - - - - - - - - - - - - - - - - - - - - - - - - // originally readapted from: - // http://webreflection.blogspot.co.uk/2009/02/levenshtein-algorithm-revisited-25.html - // then rewritten in C for Emscripten (see levenstein.c) - // then "screw you ASM" due no much gain but very bloated code - var levenstein = function levenstein(from, to) { - var fromLength = from.length + 1; - var toLength = to.length + 1; - var size = fromLength * toLength; - var grid = new TypedArray(size); - var x = 0; - var y = 0; - var X = 0; - var Y = 0; - var crow = 0; - var prow = 0; - var del = void 0, - ins = void 0, - sub = void 0; - grid[0] = 0; - while (++x < toLength) { - grid[x] = x; - }while (++y < fromLength) { - X = x = 0; - prow = crow; - crow = y * toLength; - grid[crow + x] = y; - while (++x < toLength) { - del = grid[prow + x] + 1; - ins = grid[crow + X] + 1; - sub = grid[prow + X] + (from[Y] == to[X] ? 0 : 1); - grid[crow + x] = del < ins ? del < sub ? del : sub : ins < sub ? ins : sub; - ++X; - }; - Y = y; - } - return grid; - }; - - // add operations (in reversed order) - var addOperation = function addOperation(list, type, x, y, count, items) { - list.unshift({ type: type, x: x, y: y, count: count, items: items }); - }; - - // walk the Levenshtein grid bottom -> up - var getOperations = function getOperations(Y, X, grid) { - var list = []; - var YL = Y.length + 1; - var XL = X.length + 1; - var y = YL - 1; - var x = XL - 1; - var cell = void 0, - top = void 0, - left = void 0, - diagonal = void 0, - crow = void 0, - prow = void 0; - while (x && y) { - crow = y * XL + x; - prow = crow - XL; - cell = grid[crow]; - top = grid[prow]; - left = grid[crow - 1]; - diagonal = grid[prow - 1]; - if (diagonal <= left && diagonal <= top && diagonal <= cell) { - x--; - y--; - if (diagonal < cell) { - addOperation(list, SUBSTITUTE, x, y, 1, [X[x]]); - } - } else if (left <= top && left <= cell) { - x--; - addOperation(list, INSERT, x, y, 0, [X[x]]); - } else { - y--; - addOperation(list, DELETE, x, y, 1, []); - } - } - while (x--) { - addOperation(list, INSERT, x, y, 0, [X[x]]); - } - while (y--) { - addOperation(list, DELETE, x, y, 1, []); - } - return list; - }; - - /* grouped operations */ - var performOperations = function performOperations(target, operations) { - var length = operations.length; - var diff = 0; - var i = 1; - var curr = void 0, - prev = void 0, - op = void 0; - if (length) { - op = prev = operations[0]; - while (i < length) { - curr = operations[i++]; - if (prev.type === curr.type && curr.x - prev.x <= 1 && curr.y - prev.y <= 1) { - op.count += curr.count; - op.items = op.items.concat(curr.items); - } else { - target.splice.apply(target, [op.y + diff, op.count].concat(op.items)); - diff += op.type === INSERT ? op.items.length : op.type === DELETE ? -op.count : 0; - op = curr; - } - prev = curr; - } - target.splice.apply(target, [op.y + diff, op.count].concat(op.items)); - } - }; - - majinbuu.aura = aura; - - Object.defineProperty(exports, '__esModule', { value: true }).default = majinbuu; - exports.aura = aura; - exports.majinbuu = majinbuu; -}, function (global, require, module, exports) { - // classes/Component.js - 'use strict'; - - var wire = function (m) { - return m.__esModule ? m.default : m; - }(require(4)); - - // no need for a transpiled class here - // Component needs lazy prototype accessors - // using modern syntax to define it won't be enough - Object.defineProperty(exports, '__esModule', { value: true }).default = Component; - - var lazyGetter = function lazyGetter(type, fn) { - var secret = '_' + type + '$'; - return { - get: function get() { - return this[secret] || (this[type] = fn.call(this, type)); - }, - set: function set(value) { - Object.defineProperty(this, secret, { configurable: true, value: value }); - } - }; - }; - - function Component() {} - Object.defineProperties(Component.prototype, { - // same as HyperHTMLElement handleEvent - handleEvent: { - value: function value(e) { - // both IE < 11 and JSDOM lack dataset - var ct = e.currentTarget; - this['getAttribute' in ct && ct.getAttribute('data-call') || 'on' + e.type](e); - } - }, - // returns its own HTML wire or create it once on comp.render() - html: lazyGetter('html', wire.content), - // returns its own SVG wire or create it once on comp.render() - svg: lazyGetter('svg', wire.content), - // same as HyperHTMLElement state - state: lazyGetter('state', function () { - return this.defaultState; - }), - // same as HyperHTMLElement get defaultState - defaultState: { - get: function get() { - return {}; - } - }, - // same as HyperHTMLElement setState - setState: { - value: function value(state) { - var target = this.state; - var source = typeof state === 'function' ? state.call(this, target) : state; - for (var key in source) { - target[key] = source[key]; - }this.render(); - } - } - // the render must be defined when extending hyper.Component - // the render **must** return either comp.html or comp.svg wire - // render() { return this.html`

    that's it

    `; } - }); -}, function (global, require, module, exports) { - // hyper/wire.js - 'use strict'; - - var wire = {}; - - Object.defineProperty(exports, '__esModule', { value: true }).default = wire; -}, function (global, require, module, exports) { - // classes/Path.js - 'use strict'; - - var _require = require(6), - ATTRIBUTE_NODE = _require.ATTRIBUTE_NODE, - COMMENT_NODE = _require.COMMENT_NODE, - DOCUMENT_FRAGMENT_NODE = _require.DOCUMENT_FRAGMENT_NODE, - ELEMENT_NODE = _require.ELEMENT_NODE; - - var _require2 = require(7), - children = _require2.children; - - var createPath = function createPath(node) { - var path = []; - var parentNode = void 0; - switch (node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - parentNode = node; - break; - case COMMENT_NODE: - parentNode = node.parentNode; - path.unshift('childNodes', path.indexOf.call(parentNode.childNodes, node)); - break; - case ATTRIBUTE_NODE: - default: - // jsdom here does not provide a nodeType 2 ... - parentNode = node.ownerElement; - path.unshift('attributes', node.name); - break; - } - for (node = parentNode; parentNode = parentNode.parentNode; node = parentNode) { - path.unshift('children', path.indexOf.call(children(parentNode), node)); - } - return path; - }; - - function Path(type, node, name) { - return { type: type, name: name, path: createPath(node) }; - } - Object.defineProperty(exports, '__esModule', { value: true }).default = Path; -}, function (global, require, module, exports) { - // shared/constants.js - 'use strict'; - // Node.CONSTANTS (not every engine has Node) - - var ELEMENT_NODE = 1; - exports.ELEMENT_NODE = ELEMENT_NODE; - var ATTRIBUTE_NODE = 2; - exports.ATTRIBUTE_NODE = ATTRIBUTE_NODE; - var TEXT_NODE = 3; - exports.TEXT_NODE = TEXT_NODE; - var COMMENT_NODE = 8; - exports.COMMENT_NODE = COMMENT_NODE; - var DOCUMENT_FRAGMENT_NODE = 11; - exports.DOCUMENT_FRAGMENT_NODE = DOCUMENT_FRAGMENT_NODE; - - // SVG related constants - var OWNER_SVG_ELEMENT = 'ownerSVGElement'; - exports.OWNER_SVG_ELEMENT = OWNER_SVG_ELEMENT; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - exports.SVG_NAMESPACE = SVG_NAMESPACE; - - // Custom Elements / MutationObserver constants - var CONNECTED = 'connected'; - exports.CONNECTED = CONNECTED; - var DISCONNECTED = 'dis' + CONNECTED; - exports.DISCONNECTED = DISCONNECTED; - - // hyperHTML related constants - var SHOULD_USE_ATTRIBUTE = /^style$/i; - exports.SHOULD_USE_ATTRIBUTE = SHOULD_USE_ATTRIBUTE; - var SHOULD_USE_TEXT_CONTENT = /^style|textarea$/i; - exports.SHOULD_USE_TEXT_CONTENT = SHOULD_USE_TEXT_CONTENT; - var EXPANDO = '_hyper: '; - exports.EXPANDO = EXPANDO; - var UID = EXPANDO + (Math.random() * new Date() | 0) + ';'; - exports.UID = UID; - var UIDC = ''; - exports.UIDC = UIDC; -}, function (global, require, module, exports) { - // shared/utils.js - 'use strict'; - - var _require3 = require(6), - ELEMENT_NODE = _require3.ELEMENT_NODE, - SVG_NAMESPACE = _require3.SVG_NAMESPACE, - UID = _require3.UID, - UIDC = _require3.UIDC; - - var _require4 = require(8), - hasAppend = _require4.hasAppend, - hasChildren = _require4.hasChildren, - hasContent = _require4.hasContent; - - var _require5 = require(9), - create = _require5.create, - doc = _require5.doc, - fragment = _require5.fragment; - - var slice = [].slice; - - // appends an array of nodes - // to a generic node/fragment - var append = hasAppend ? function (node, childNodes) { - node.append.apply(node, childNodes); - } : function (node, childNodes) { - var length = childNodes.length; - for (var i = 0; i < length; i++) { - node.appendChild(childNodes[i]); - } - }; - exports.append = append; - - // given a node/fragment, returns its children - var children = hasChildren ? function (node) { - return node.children; - } : function (node) { - var children = []; - var childNodes = node.childNodes; - var length = childNodes.length; - for (var j = 0, i = 0; i < length; i++) { - var child = childNodes[i]; - if (child.nodeType === ELEMENT_NODE) { - children[j++] = child; - } - } - return children; - }; - exports.children = children; - - // remove comments parts from attributes to avoid issues - // with either old browsers or SVG elements - var cleanAttributes = function cleanAttributes(html) { - return html.replace(no, comments); - }; - exports.cleanAttributes = cleanAttributes; - var attrName = '[^\\S]+[^ \\f\\n\\r\\t\\/>"\'=]+'; - var no = new RegExp('(<[a-z]+[a-z0-9:_-]*)((?:' + attrName + '(?:=(?:\'.*?\'|".*?"|<.+?>|\\S+))?)+)([^\\S]*/?>)', 'gi'); - var findAttributes = new RegExp('(' + attrName + '=)([\'"]?)' + UIDC + '\\2', 'gi'); - var comments = function comments($0, $1, $2, $3) { - return $1 + $2.replace(findAttributes, replaceAttributes) + $3; - }; - var replaceAttributes = function replaceAttributes($0, $1, $2) { - return $1 + ($2 || '"') + UID + ($2 || '"'); - }; - - // given a node/fragment and a path - // returns the target path, if any - var node = hasChildren ? function (parentNode, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - parentNode = parentNode[path[i++]][path[i]]; - } - return parentNode; - } : function (parentNode, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - var name = path[i++]; - parentNode = name === 'children' ? children(parentNode)[path[i]] : parentNode[name][path[i]]; - } - return parentNode; - }; - exports.node = node; - - // lazy evaluated - var unique = function unique(template) { - return _TL(template); - }; - exports.unique = unique; - // TL returns a unique version of the template - // it needs lazy feature detection - // (cannot trust literals with transpiled code) - var _TL = function TL(template) { - if ( - // TypeScript template literals are not standard - template.propertyIsEnumerable('raw') || - // Firefox < 55 has not standard implementation neither - /Firefox\/(\d+)/.test((global.navigator || {}).userAgent) && parseFloat(RegExp.$1) < 55) { - // in these cases, address templates once - var templateObjects = {}; - // but always return the same template - _TL = function TL(template) { - var key = '_' + template.join(UID); - return templateObjects[key] || (templateObjects[key] = template); - }; - } else { - // make TL an identity like function - _TL = function TL(template) { - return template; - }; - } - return _TL(template); - }; - - var HTMLFragment = hasContent ? function (node, html) { - var container = create(node, 'template'); - container.innerHTML = html; - return container.content; - } : function (node, html) { - var container = create(node, 'template'); - var content = fragment(node); - if (/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(html)) { - var selector = RegExp.$1; - container.innerHTML = '' + html + '
    '; - append(content, slice.call(container.querySelectorAll(selector))); - } else { - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - } - return content; - }; - exports.HTMLFragment = HTMLFragment; - - var SVGFragment = hasContent ? function (node, html) { - var content = fragment(node); - var container = doc(node).createElementNS(SVG_NAMESPACE, 'svg'); - container.innerHTML = html; - append(content, slice.call(container.childNodes)); - return content; - } : function (node, html) { - var content = fragment(node); - var container = create(node, 'div'); - container.innerHTML = '' + html + ''; - append(content, slice.call(container.firstChild.childNodes)); - return content; - }; - exports.SVGFragment = SVGFragment; -}, function (global, require, module, exports) { - // shared/features-detection.js - 'use strict'; - - var _require6 = require(9), - create = _require6.create, - fragment = _require6.fragment, - text = _require6.text; - - var testFragment = fragment(document); - - // DOM4 node.append(...many) - var hasAppend = 'append' in testFragment; - exports.hasAppend = hasAppend; - - // beside IE, old WebKit browsers don't have `children` in DocumentFragment - var hasChildren = 'children' in testFragment; - exports.hasChildren = hasChildren; - - // detect old browsers without HTMLTemplateElement content support - var hasContent = 'content' in create(document, 'template'); - exports.hasContent = hasContent; - - // If attributes order is shuffled, threat the browser differently - // Usually this is a well known IE/Edge only issue but some older FF does the same. - var p = create(document, 'p'); - p.innerHTML = ''; - var hasDoomedAttributes = /class/i.test(p.firstChild.attributes[0].name); - exports.hasDoomedAttributes = hasDoomedAttributes; - - // IE 11 has problems with cloning templates: it "forgets" empty childNodes - testFragment.appendChild(text(testFragment, 'g')); - testFragment.appendChild(text(testFragment, '')); - var hasDoomedCloneNode = testFragment.cloneNode(true).childNodes.length === 1; - exports.hasDoomedCloneNode = hasDoomedCloneNode; - - // old browsers need to fallback to cloneNode - // Custom Elements V0 and V1 will work polyfilled - var hasImportNode = 'importNode' in document; - exports.hasImportNode = hasImportNode; -}, function (global, require, module, exports) { - // shared/easy-dom.js - 'use strict'; - - var create = function create(node, type) { - return doc(node).createElement(type); - }; - exports.create = create; - var doc = function doc(node) { - return node.ownerDocument || node; - }; - exports.doc = doc; - var fragment = function fragment(node) { - return doc(node).createDocumentFragment(); - }; - exports.fragment = fragment; - var text = function text(node, _text) { - return doc(node).createTextNode(_text); - }; - exports.text = text; -}]); diff --git a/logo.txt b/logo.txt new file mode 100644 index 00000000..6f6947c3 --- /dev/null +++ b/logo.txt @@ -0,0 +1,20 @@ + .,,. + .;srrrrr: + .si, .;S; + ,;;rrS; .is + :ss;,,,ri;...,ri: + .ri;. :rrrrr;. + ;ir. + .. ,:;;;si: .. + .,:;rr: ,ss;::;ii, :rr;:,. + ;ssr:,. .is. .ii. .,:rss; + :;rr;:,. .is. .ii. .,:;rr;: + .,:;r; ,is;::;ss, ;r;:,. + :is;;;:, + .ri;. + .;rrrrr: ;ir. + :ir,...;ir,,,;ss: + si. ;Ssr;;, + ;S;. ,is. + :rrrrrs;. + .,,. diff --git a/logo/creepy-html.jpg b/logo/creepy-html.jpg new file mode 100644 index 00000000..7c3bdb80 Binary files /dev/null and b/logo/creepy-html.jpg differ diff --git a/min.js b/min.js index 3e8621c3..c31bd388 100644 --- a/min.js +++ b/min.js @@ -1,3 +1 @@ -var hyperHTML=function(e,t){"use strict";function n(e){return arguments.length<2?null==e?X("html"):"string"==typeof e?i(null,e):"raw"in e?X("html")(e):"nodeType"in e?r(e):Z(e,"html"):("raw"in e?X("html"):i).apply(null,arguments)}function r(e){return c.bind(e)}function i(e,t){return arguments.length<1?X("html"):null==e?X(t||"html"):Z(e,t||"html")}function o(){}function a(e,n){return this.node=e,this.childNodes=n,t.aura(this,n)}function c(e){var t=_e.get(this);return t&&t.template===le(e)?q.apply(t.updates,arguments):F.apply(this,arguments),this}function l(e,t,n){var r,i,o,a=e.ownerElement,c="data"===n,l=!c&&/^on/.test(n),u=c||S(a,n)&&!Y.test(n),s=l?n.slice(2):"",f=u||l,h=u&&(c||n in a);return(l||h)&&(t.push(a,n),l&&(s===fe||s===he?Me.add(a):n.toLowerCase()in a&&(s=s.toLowerCase()))),u&&(h||(o=$e.get(a),o||(o={_:Object.create(null),$:function(){$e.delete(a);for(var e in this._)this._[e].$()}},$e.set(a,o)),o._[n]={_:null,$:function(){h=!0,i(this._)}}),i=function(t){h?r!==t&&(r=t,a[n]!==t&&(null==t?(a[n]=null,a.removeAttribute(n)):a[n]=t)):(e.value=t,o._[n]._=t,n in a&&o.$())}),l?function(e){r!==e&&(r&&a.removeEventListener(s,r,!1),r=e,e&&a.addEventListener(s,e,!1))}:u?i:function(t){r!==t&&(r=t,e.value!==t&&(null==t?f||(f=!0,a.removeAttributeNode(e)):(e.value=t,f&&(f=!1,a.setAttributeNode(e)))))}}function u(e){var t;return function(n){n!==t&&(t=n,e.textContent=n)}}function s(e,t,n){var r;return function i(a){switch(typeof a){case"string":case"number":case"boolean":var c=t.length;1===c&&t[0].nodeType===G?r!==a&&(r=a,t[0].textContent=a):(r=a,c?n.splice(0,c,w(e,a)):t[0]=e.parentNode.insertBefore(w(e,a),e));break;case"function":i(a(e.parentNode,t,0));break;case"object":case"undefined":if(null==a){r=a,i("");break}a instanceof o&&(a=a.render());default:if(r=a,ge(a)){var c=a.length;if(0===c)n.splice(0);else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"function":for(var l=e.parentNode,u=0;u[\s\S]*?<\/\1>/.test(t)?"div":"template"),o="content"in i,a=!1;if(o||(n=g(r),a=/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(t)),a){var c=RegExp.$1;i.innerHTML=""+t+"
    ",Ee(n,ue.call(i.querySelectorAll(c)))}else i.innerHTML=t,o?n=i.content:Ee(n,ue.call(i.childNodes));return n}function b(e,t){var n=e.ownerDocument,r=g(n);if(ae||ce){var i=n.createElement("div");i.innerHTML=''+t+"",Ee(r,ue.call(i.firstChild.childNodes))}else{var i=n.createElementNS(U,"svg");i.innerHTML=t,Ee(r,ue.call(i.childNodes))}return r}function w(e,t){return e.ownerDocument.createTextNode(t)}function N(e,t){for(var n,r,i=t===fe,o=0,a=e.length;o'"]/g,d)},n.wire=i,n.Component=o,Object.defineProperties(o.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:L("html",X),svg:L("svg",X),state:L("state",function(){return this.defaultState}),defaultState:{get:function(){return{}}},setState:{value:function(e){var t=this.state,n="function"==typeof e?e.call(this,t):e;for(var r in n)t[r]=n[r];this.render()}}});var z=1,V=2,G=3,J=8,K=11,Q="ownerSVGElement",U="http://www.w3.org/2000/svg",Y=/^style$/i,ee=/^style|textarea$/i,te="_hyper: "+(Math.random()*new Date|0)+";",ne="\x3c!--"+te+"--\x3e";a.prototype.splice=function(e){for(var t,n=this.node,r=this.childNodes,i=r[e+(arguments[1]||0)]||n,o=r.splice.apply(r,arguments),a=n.parentNode,c=0,l=o.length;c":">","'":"'",'"':"""},fe="connected",he="dis"+fe;try{new Event(fe),re=Event}catch(e){re=function(e){var t=n.document.createEvent("Event");return t.initEvent(e,!1,!1),t}}try{new MutationObserver(function(e){for(var t,n=0,r=e.length;n|\\S+))?)+)([^\\S]*/?>)","gi"),ke=new RegExp("("+Ce+"=)(['\"]?)"+ne+"\\2","gi"),Ae=function(e,t,n,r){return t+n.replace(ke,Le)+r},Le=function(e,t,n){return t+(n||'"')+te+(n||'"')},Me=new pe,_e=new de,Oe=new de,De=new ve,$e=new de,je=!0,Ie=function(){return ie.appendChild(w(ie,"g")),ie.appendChild(w(ie,"")),1===ie.cloneNode(!0).childNodes.length?function(e){for(var t=e.cloneNode(),n=e.childNodes||[],r=0,i=n.length;ro;)--c;l=u+r-c;var m=Array(l),y=s[c];for(--n;y;){for(var b=y.newi,w=y.oldi;b>>0;n"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=H(O),n=H("div");return n.innerHTML=''+e+"",F(t,n.firstChild.childNodes),t}:M)(e)});function F(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function H(e){return e===O?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var I,z,V,Z,G,q,B,J,K,Q,U=(z="appendChild",V="cloneNode",Z="createTextNode",q=(G="importNode")in(I=N),(B=I.createDocumentFragment())[z](I[Z]("g")),B[z](I[Z]("")),(q?I[G](B,!0):B[V](!0)).childNodes.length<2?function e(t,n){for(var r=t[V](),i=t.childNodes||[],a=i.length,o=0;n&&o

    ',J[K].childNodes[0].getAttribute(Q)==Y)||(Y="_dt: "+Y.slice(1,-1)+";",ee=!0)}catch(e){}var te="\x3c!--"+Y+"--\x3e",ne=8,re=1,ie=3,ae=/^(?:style|textarea)$/i,oe=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;var ue=" \\f\\n\\r\\t",ce="[^"+ue+"\\/>\"'=]+",le="["+ue+"]+"+ce,se="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",fe="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ce.replace("\\/","")+"))?)",he=new RegExp(se+le+fe+"+)(["+ue+"]*/?>)","g"),de=new RegExp(se+le+fe+"*)(["+ue+"]*/>)","g"),ve=new RegExp("("+le+"\\s*=\\s*)(['\"]?)"+te+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(ve,ge)+r}function ge(e,t,n){return t+(n||'"')+Y+(n||'"')}function me(e,t,n){return oe.test(t)?e:"<"+t+n+">"}var ye=ee?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort(function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1})}:function(e,t){return t.slice.call(e,0)};function be(e,t,n,r){for(var i=e.childNodes,a=i.length,o=0;o|\\S+))?)+)([^\\S]*/?>)","gi"),M=new RegExp("("+T+"=)(['\"]?)"+c+"\\2","gi"),O=function(e,t,n,r){return t+n.replace(M,D)+r},D=function(e,t,n){return t+(n||'"')+u+(n||'"')},S=d?function(e,t){for(var n=t.length,r=0;r"+t+"",_(r,g.call(n.querySelectorAll(i)))}else n.innerHTML=t,_(r,g.call(n.childNodes));return r};r.HTMLFragment=A;var x=f?function(e,t){var n=E(e),r=p(e).createElementNS(a,"svg");return r.innerHTML=t,_(n,g.call(r.childNodes)),n}:function(e,t){var n=E(e),r=h(e,"div");return r.innerHTML=''+t+"",_(n,g.call(r.firstChild.childNodes)),n};r.SVGFragment=x},function(e,t,n,r){"use strict";var i=t(9),o=i.create,a=i.fragment,u=i.text,c=a(document),l="append"in c;r.hasAppend=l;var s="children"in c;r.hasChildren=s;var d="content"in o(document,"template");r.hasContent=d;var f=o(document,"p");f.innerHTML='';var v=/class/i.test(f.firstChild.attributes[0].name);r.hasDoomedAttributes=v,c.appendChild(u(c,"g")),c.appendChild(u(c,""));var h=1===c.cloneNode(!0).childNodes.length;r.hasDoomedCloneNode=h;var p="importNode"in document;r.hasImportNode=p},function(e,t,n,r){"use strict";var i=function(e,t){return o(e).createElement(t)};r.create=i;var o=function(e){return e.ownerDocument||e};r.doc=o;var a=function(e){return o(e).createDocumentFragment()};r.fragment=a;var u=function(e,t){return o(e).createTextNode(t)};r.text=u}]); \ No newline at end of file diff --git a/no.js b/no.js new file mode 100644 index 00000000..3c3c9610 --- /dev/null +++ b/no.js @@ -0,0 +1,38 @@ +(function (hyperHTML) { + /*! (c) Andrea Giammarchi (ISC) */ + var uid = new Date * Math.random(); + var templates = Object.create(null); + fix('bind'); + fix('wire'); + function fix(name) { + var method = hyperHTML[name]; + hyperHTML[name] = function () { + var fn = method.apply(null, arguments); + return function () { + return fn.apply(null, tagArguments.apply(null, arguments)); + }; + }; + } + function tagArguments() { + var length = arguments.length; + var template = []; + var args = [template]; + if (length) { + var i = 0; + var mod = typeof arguments[i] === 'string' ? 0 : 1; + if (mod) template.push(''); + while (i < length) { + ((i + mod) % 2 ? args : template).push(arguments[i]); + i++; + } + if (template.length < args.length) template.push(''); + var key = template.join(uid); + if (key in templates) { + args[0] = templates[key]; + } else { + (templates[key] = template).raw = template; + } + } + return args; + } +}(hyperHTML)); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9aeded91 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5070 @@ +{ + "name": "hyperhtml", + "version": "2.34.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "hyperhtml", + "version": "2.34.2", + "license": "ISC", + "dependencies": { + "@ungap/create-content": "0.2.0", + "@ungap/custom-event": "0.3.1", + "@ungap/essential-map": "0.3.2", + "@ungap/essential-weakset": "0.2.1", + "@ungap/is-array": "0.2.0", + "@ungap/template-tag-arguments": "0.5.0", + "@ungap/weakmap": "0.2.1", + "disconnected": "0.2.1", + "domdiff": "2.2.2", + "domtagger": "0.7.0", + "hyperhtml-style": "0.1.2", + "hyperhtml-wire": "2.1.1" + }, + "devDependencies": { + "@babel/core": "7.10.3", + "@babel/preset-env": "7.10.3", + "ascjs": "4.0.1", + "basichtml": "2.3.0", + "drop-babel-typeof": "1.0.3", + "istanbul": "0.4.5", + "npm-dollar": "2.2.1", + "rollup": "2.18.1", + "rollup-plugin-babel": "4.4.0", + "rollup-plugin-node-resolve": "5.2.0", + "tressa": "0.3.1", + "uglify-js": "3.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/hyperhtml" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.10.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.3.tgz", + "integrity": "sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.3", + "@babel/generator": "^7.10.3", + "@babel/helper-module-transforms": "^7.10.1", + "@babel/helpers": "^7.10.1", + "@babel/parser": "^7.10.3", + "@babel/template": "^7.10.3", + "@babel/traverse": "^7.10.3", + "@babel/types": "^7.10.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", + "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.7.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz", + "integrity": "sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.13" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.6.tgz", + "integrity": "sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.10.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.3.tgz", + "integrity": "sha512-jHaSUgiewTmly88bJtMHbOd1bJf2ocYxb5BWKSDQIP5tmgFuS/n0gl+nhSrYDhT33m0vPxp+rP8oYYgPgMNQlg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.10.3", + "@babel/helper-compilation-targets": "^7.10.2", + "@babel/helper-module-imports": "^7.10.3", + "@babel/helper-plugin-utils": "^7.10.3", + "@babel/plugin-proposal-async-generator-functions": "^7.10.3", + "@babel/plugin-proposal-class-properties": "^7.10.1", + "@babel/plugin-proposal-dynamic-import": "^7.10.1", + "@babel/plugin-proposal-json-strings": "^7.10.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", + "@babel/plugin-proposal-numeric-separator": "^7.10.1", + "@babel/plugin-proposal-object-rest-spread": "^7.10.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.10.1", + "@babel/plugin-proposal-optional-chaining": "^7.10.3", + "@babel/plugin-proposal-private-methods": "^7.10.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.10.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.10.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.1", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.10.1", + "@babel/plugin-transform-arrow-functions": "^7.10.1", + "@babel/plugin-transform-async-to-generator": "^7.10.1", + "@babel/plugin-transform-block-scoped-functions": "^7.10.1", + "@babel/plugin-transform-block-scoping": "^7.10.1", + "@babel/plugin-transform-classes": "^7.10.3", + "@babel/plugin-transform-computed-properties": "^7.10.3", + "@babel/plugin-transform-destructuring": "^7.10.1", + "@babel/plugin-transform-dotall-regex": "^7.10.1", + "@babel/plugin-transform-duplicate-keys": "^7.10.1", + "@babel/plugin-transform-exponentiation-operator": "^7.10.1", + "@babel/plugin-transform-for-of": "^7.10.1", + "@babel/plugin-transform-function-name": "^7.10.1", + "@babel/plugin-transform-literals": "^7.10.1", + "@babel/plugin-transform-member-expression-literals": "^7.10.1", + "@babel/plugin-transform-modules-amd": "^7.10.1", + "@babel/plugin-transform-modules-commonjs": "^7.10.1", + "@babel/plugin-transform-modules-systemjs": "^7.10.3", + "@babel/plugin-transform-modules-umd": "^7.10.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.3", + "@babel/plugin-transform-new-target": "^7.10.1", + "@babel/plugin-transform-object-super": "^7.10.1", + "@babel/plugin-transform-parameters": "^7.10.1", + "@babel/plugin-transform-property-literals": "^7.10.1", + "@babel/plugin-transform-regenerator": "^7.10.3", + "@babel/plugin-transform-reserved-words": "^7.10.1", + "@babel/plugin-transform-shorthand-properties": "^7.10.1", + "@babel/plugin-transform-spread": "^7.10.1", + "@babel/plugin-transform-sticky-regex": "^7.10.1", + "@babel/plugin-transform-template-literals": "^7.10.3", + "@babel/plugin-transform-typeof-symbol": "^7.10.1", + "@babel/plugin-transform-unicode-escapes": "^7.10.1", + "@babel/plugin-transform-unicode-regex": "^7.10.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.10.3", + "browserslist": "^4.12.0", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/helper-compilation-targets": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", + "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-class-properties/node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", + "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-private-methods/node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-proposal-unicode-property-regex/node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-classes": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-dotall-regex/node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-for-of": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.15.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-named-capturing-groups-regex/node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-parameters": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/@babel/plugin-transform-unicode-regex/node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@types/node": { + "version": "13.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.3.tgz", + "integrity": "sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/create-content": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/create-content/-/create-content-0.2.0.tgz", + "integrity": "sha512-CvmX0Mr5PfFARDBbSef0B+SAqSeMKaHOG/twJi9nbPtp/MiNPgyBLqZndiyO3RXQ0RXy6TqwarvB6KWzTmc4MQ==" + }, + "node_modules/@ungap/custom-event": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@ungap/custom-event/-/custom-event-0.3.1.tgz", + "integrity": "sha512-6iFFSuCelNPovoqS53N6f2ohbILf5qqk1YPLgcs67rOTfUlkOJs7xWcX0ygk/iWEmCWkC38+bRNTzjM02eP8iw==" + }, + "node_modules/@ungap/essential-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@ungap/essential-map/-/essential-map-0.3.2.tgz", + "integrity": "sha512-3nKB3JV6GXjWfdRPvx1V8KQsyEtdYf9jmrpXu8U8G4RV4EzYWHcYVPHthiN+eYhtCXB7Qrzu+CPxHKPn8WBJ0Q==" + }, + "node_modules/@ungap/essential-weakset": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@ungap/essential-weakset/-/essential-weakset-0.2.1.tgz", + "integrity": "sha512-h5HsksOZ7KDYqr+oMtAIR3ZQgaEbbSD6p4tVqaM1jCzWhbXkW6X6RpwfLQLqjfrRNTRqQtcwfsdwQMrpWbdp5A==" + }, + "node_modules/@ungap/import-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/import-node/-/import-node-0.2.0.tgz", + "integrity": "sha512-VuWVBAMRjoOc63n8Cc19brS7KlhYJ+57790LF+lVw60nMRemCrz1T6HnoNx74IEW3FS+TM+vveJ70C6NyTKODQ==" + }, + "node_modules/@ungap/is-array": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/is-array/-/is-array-0.2.0.tgz", + "integrity": "sha512-585x6xT7DmZDWzSog3ZEGJryN175zxPRQh8JvEqItlhOowGYU4xcv6qh/8623doCYI7vohJc/0R5OO2EqrV3+w==" + }, + "node_modules/@ungap/template-literal": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@ungap/template-literal/-/template-literal-0.6.0.tgz", + "integrity": "sha512-J8+vZofH0TWM8M0ZU8qN/3fl6ct5mrB82+OSLSYXYZI0abi8a0FYPC65YViU1D2gRHdHQ7zXSv+LJiTM212rDw==", + "dependencies": { + "@ungap/weakmap": "^0.2.1" + } + }, + "node_modules/@ungap/template-tag-arguments": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@ungap/template-tag-arguments/-/template-tag-arguments-0.5.0.tgz", + "integrity": "sha512-hyvUZuGy60qOLdg95BjxgwehbJ4UoIG+sAj7yie9coxeK/qLIcwKXp8cn2Cwm3ouLB9UKL2v/+eq9oRUjuBPJg==", + "dependencies": { + "@ungap/template-literal": "^0.6.0" + } + }, + "node_modules/@ungap/trim": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/trim/-/trim-0.2.0.tgz", + "integrity": "sha512-CfsUxeZ2R/O3EGCOe+IkAU32yHOdO+mCRmtavSIQ4HZN3Jiq/ynGzq8/asyamd28U26UJmpSV/TC7+p7qELKrg==" + }, + "node_modules/@ungap/weakmap": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@ungap/weakmap/-/weakmap-0.2.1.tgz", + "integrity": "sha512-GmVAWB+JuFKqSbzlofYK4qxk955gEv4Kd9/aj2hLOxneXMAm/J7OXcl5DlElS9tmkqwCcxGysSZGOrjzNvmjFQ==" + }, + "node_modules/@webreflection/interface": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@webreflection/interface/-/interface-0.1.1.tgz", + "integrity": "sha1-ryqR2vOBeWVgcqb5Lp+SEWWPhWY=", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/ascjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ascjs/-/ascjs-4.0.1.tgz", + "integrity": "sha512-E/JuvSEe3EfuCZ52Ff142b8lwmuCrSCR+FaDPryIL2svqCiWmDCbzFCcOB+dfFeD2QHMS7zzQ+rWFw73ZUoZjA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.9.6" + }, + "bin": { + "ascjs": "bin.js" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/basichtml": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/basichtml/-/basichtml-2.3.0.tgz", + "integrity": "sha512-4OwuvFO4Lbcm+DquFlYMiEIvsrJtMNtEeG41k6swojGmQsfPnlunNuk6/xwUKYbyfXgAxiYFhJv3xT7FeQwh4A==", + "deprecated": "The effort has moved into LinkeDOM module: https://www.npmjs.com/package/linkedom", + "dev": true, + "dependencies": { + "@webreflection/interface": "^0.1.1", + "broadcast": "^3.0.0", + "html-escaper": "^3.0.0", + "htmlparser2": "^4.1.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/broadcast": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/broadcast/-/broadcast-3.0.0.tgz", + "integrity": "sha512-q//26zihgUvAtvSBRD1xtk/9KBVNfiUrS8Phz8dN95Y5mqINO/gFT6181b4Yvhoeal3Aa9+rsFnKzA6a6UTHfg==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", + "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001254", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.830", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001257", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz", + "integrity": "sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/consolemd": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/consolemd/-/consolemd-0.1.3.tgz", + "integrity": "sha512-UHKTgtvAtikE0UIvqP9Rj0b+rZ5AHIvbfL+GSjYhH2UOJWfnoIJ0+zygI/l/7cOB8p9JrGrIkC1BgQXBNzEQQA==", + "dev": true, + "dependencies": { + "echomd": "^0.1.2" + } + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/core-js-compat": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", + "dev": true, + "dependencies": { + "browserslist": "^4.8.3", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/disconnected": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/disconnected/-/disconnected-0.2.1.tgz", + "integrity": "sha512-483TUpj4dA7Ye42xrErztbw3PKpkboPf1aB9mG4+S+RGGxFVv72hQBbS8MqN8LZLWHzfcmk2tMTRR5CoyxNglg==" + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/domconstants": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/domconstants/-/domconstants-0.1.1.tgz", + "integrity": "sha512-Pk4K6tLOzSh0cZDuh7TQivZtYLC6Z8dNissoDyy2tQoVNg8ewScxG3AVJO76kLcTta/u7bgEO6xbIR97MiInfA==" + }, + "node_modules/domdiff": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/domdiff/-/domdiff-2.2.2.tgz", + "integrity": "sha512-Pv7aH5JfjNIkLRKkah+T3Kd41Gy+7GU+5dmPsOZZXsCJ34QR1i7CCiWraUn1c/a40htShxAQ8mHJR2OqPd12+Q==", + "dependencies": { + "uarray": "^1.0.0" + } + }, + "node_modules/domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, + "node_modules/domhandler": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz", + "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/domsanitizer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/domsanitizer/-/domsanitizer-0.2.2.tgz", + "integrity": "sha512-2nqCaLWi+tpT7oOa862BVrG7bHzYlWFZ5ltmvt4LXECxe5FnwF/zKGs/gWanZWGmv1pwdUTkO9TamoZMqI0Pmg==", + "dependencies": { + "domconstants": "^0.1.1" + } + }, + "node_modules/domtagger": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/domtagger/-/domtagger-0.7.0.tgz", + "integrity": "sha512-ljf2FYn4DPbMP2RN2YD8VsuW1Rm5N7x3iV0QRmlu5JqoY6Zn/gcwI8j4NV91YOlmqIHzONA+TEFOWQ4oX89G4Q==", + "dependencies": { + "@ungap/create-content": "^0.2.0", + "@ungap/import-node": "^0.2.0", + "@ungap/trim": "^0.2.0", + "@ungap/weakmap": "^0.2.1", + "domconstants": "^0.1.1", + "domsanitizer": "^0.2.2", + "umap": "^1.0.2" + } + }, + "node_modules/domutils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz", + "integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==", + "dev": true, + "dependencies": { + "dom-serializer": "^0.2.1", + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0" + } + }, + "node_modules/drop-babel-typeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/drop-babel-typeof/-/drop-babel-typeof-1.0.3.tgz", + "integrity": "sha512-nmhRIvZrHSzEv8sc6kqh+2pG7ZAg9ZRjFyY4YavbIzvF/6SYdsH4SDFJAYLWTAh1XoVfdbe3Kmy44h/KB7gv+Q==", + "dev": true, + "bin": { + "drop-babel-typeof": "index.js" + } + }, + "node_modules/echomd": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/echomd/-/echomd-0.1.2.tgz", + "integrity": "sha1-kNPPD55Fkwb0wdkKArZelxkj9v8=", + "dev": true, + "bin": { + "echomd": "js/echomd" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.838", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.838.tgz", + "integrity": "sha512-65O6UJiyohFAdX/nc6KJ0xG/4zOn7XCO03kQNNbCeMRGxlWTLzc6Uyi0tFNQuuGWqySZJi8CD2KXPXySVYmzMA==", + "dev": true + }, + "node_modules/entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "dependencies": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/html-escaper": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", + "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==", + "dev": true + }, + "node_modules/htmlparser2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", + "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + }, + "node_modules/hyperhtml-style": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/hyperhtml-style/-/hyperhtml-style-0.1.2.tgz", + "integrity": "sha512-ZDRYNClEaqUS0a8RAED0nQRqWmZk7ctdyij3Iw/PqUUef6xhYO87nx9vJNuxg7Yc6J2FdJjXRKbB0iud2ZyzwQ==" + }, + "node_modules/hyperhtml-wire": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/hyperhtml-wire/-/hyperhtml-wire-2.1.1.tgz", + "integrity": "sha512-6rOTnb+BSWIsNaqiji01BdV8qyhwyCT38aGmG5k37JQeI9n+lwgvFsq0/G7wNAh5NuGdAaWUl1umbjrW7fj++w==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", + "dev": true, + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/istanbul/node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "node_modules/istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "dependencies": { + "leven": "^3.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/npm-dollar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/npm-dollar/-/npm-dollar-2.2.1.tgz", + "integrity": "sha512-14pKEYwVWmrbGs8XtPKesSMF9okTy+aRniI1fjwyMoJIVc4wsawCRrR2i8AAubxfNBP1I2lesue5xT6cEm6sMQ==", + "dev": true, + "bin": { + "npm-dollar": "index.js" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.18.1.tgz", + "integrity": "sha512-w4X77ADA+WTGlapC8Z6yggdJtODw3SBl6R2LSkA7ZW5MtdkgcB7sfaSD1UWyx8diXbMcGIb0eI9gCx/dyqOgNQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.2" + } + }, + "node_modules/rollup-plugin-babel": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz", + "integrity": "sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.8.1" + }, + "peerDependencies": { + "@babel/core": "7 || ^7.0.0-rc.2", + "rollup": ">=0.60.0 <3" + } + }, + "node_modules/rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.", + "dev": true, + "dependencies": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + }, + "peerDependencies": { + "rollup": ">=1.11.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tressa": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tressa/-/tressa-0.3.1.tgz", + "integrity": "sha1-OhdV5a7cQ0+tmntp0EGrztdJatI=", + "dev": true, + "dependencies": { + "consolemd": "^0.1.2" + } + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/uarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uarray/-/uarray-1.0.0.tgz", + "integrity": "sha512-LHmiAd5QuAv7pU2vbh+Zq9YOnqVK0H764p2Ozinpfy9ka58OID4IsGLiXsitqH7n0NAIDxvax1A/kDXpii/Ckg==" + }, + "node_modules/uglify-js": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", + "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", + "dev": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/umap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/umap/-/umap-1.0.2.tgz", + "integrity": "sha512-bW127HgG4H4VAD6qlqO5vCC+7bnlYvZ6A6BdwyGblkWvlEG7VYpj1bcpf3iJpvyKmkPZWDIeZDmoULz67ec7NA==" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true + }, + "@babel/core": { + "version": "7.10.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.3.tgz", + "integrity": "sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.3", + "@babel/generator": "^7.10.3", + "@babel/helper-module-transforms": "^7.10.1", + "@babel/helpers": "^7.10.1", + "@babel/parser": "^7.10.3", + "@babel/template": "^7.10.3", + "@babel/traverse": "^7.10.3", + "@babel/types": "^7.10.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "@babel/generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", + "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.7.0" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-function-name": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-imports": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz", + "integrity": "sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "dev": true, + "requires": { + "lodash": "^4.17.13" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helpers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "dev": true, + "requires": { + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.6.tgz", + "integrity": "sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q==", + "dev": true + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/preset-env": { + "version": "7.10.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.3.tgz", + "integrity": "sha512-jHaSUgiewTmly88bJtMHbOd1bJf2ocYxb5BWKSDQIP5tmgFuS/n0gl+nhSrYDhT33m0vPxp+rP8oYYgPgMNQlg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.10.3", + "@babel/helper-compilation-targets": "^7.10.2", + "@babel/helper-module-imports": "^7.10.3", + "@babel/helper-plugin-utils": "^7.10.3", + "@babel/plugin-proposal-async-generator-functions": "^7.10.3", + "@babel/plugin-proposal-class-properties": "^7.10.1", + "@babel/plugin-proposal-dynamic-import": "^7.10.1", + "@babel/plugin-proposal-json-strings": "^7.10.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", + "@babel/plugin-proposal-numeric-separator": "^7.10.1", + "@babel/plugin-proposal-object-rest-spread": "^7.10.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.10.1", + "@babel/plugin-proposal-optional-chaining": "^7.10.3", + "@babel/plugin-proposal-private-methods": "^7.10.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.10.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.10.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.1", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.10.1", + "@babel/plugin-transform-arrow-functions": "^7.10.1", + "@babel/plugin-transform-async-to-generator": "^7.10.1", + "@babel/plugin-transform-block-scoped-functions": "^7.10.1", + "@babel/plugin-transform-block-scoping": "^7.10.1", + "@babel/plugin-transform-classes": "^7.10.3", + "@babel/plugin-transform-computed-properties": "^7.10.3", + "@babel/plugin-transform-destructuring": "^7.10.1", + "@babel/plugin-transform-dotall-regex": "^7.10.1", + "@babel/plugin-transform-duplicate-keys": "^7.10.1", + "@babel/plugin-transform-exponentiation-operator": "^7.10.1", + "@babel/plugin-transform-for-of": "^7.10.1", + "@babel/plugin-transform-function-name": "^7.10.1", + "@babel/plugin-transform-literals": "^7.10.1", + "@babel/plugin-transform-member-expression-literals": "^7.10.1", + "@babel/plugin-transform-modules-amd": "^7.10.1", + "@babel/plugin-transform-modules-commonjs": "^7.10.1", + "@babel/plugin-transform-modules-systemjs": "^7.10.3", + "@babel/plugin-transform-modules-umd": "^7.10.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.3", + "@babel/plugin-transform-new-target": "^7.10.1", + "@babel/plugin-transform-object-super": "^7.10.1", + "@babel/plugin-transform-parameters": "^7.10.1", + "@babel/plugin-transform-property-literals": "^7.10.1", + "@babel/plugin-transform-regenerator": "^7.10.3", + "@babel/plugin-transform-reserved-words": "^7.10.1", + "@babel/plugin-transform-shorthand-properties": "^7.10.1", + "@babel/plugin-transform-spread": "^7.10.1", + "@babel/plugin-transform-sticky-regex": "^7.10.1", + "@babel/plugin-transform-template-literals": "^7.10.3", + "@babel/plugin-transform-typeof-symbol": "^7.10.1", + "@babel/plugin-transform-unicode-escapes": "^7.10.1", + "@babel/plugin-transform-unicode-regex": "^7.10.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.10.3", + "browserslist": "^4.12.0", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "dependencies": { + "@babel/helper-compilation-targets": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", + "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + } + } + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", + "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.15.4" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + } + } + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + } + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + } + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.15.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + } + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + } + } + } + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/traverse": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + } + }, + "@types/node": { + "version": "13.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.3.tgz", + "integrity": "sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@ungap/create-content": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/create-content/-/create-content-0.2.0.tgz", + "integrity": "sha512-CvmX0Mr5PfFARDBbSef0B+SAqSeMKaHOG/twJi9nbPtp/MiNPgyBLqZndiyO3RXQ0RXy6TqwarvB6KWzTmc4MQ==" + }, + "@ungap/custom-event": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@ungap/custom-event/-/custom-event-0.3.1.tgz", + "integrity": "sha512-6iFFSuCelNPovoqS53N6f2ohbILf5qqk1YPLgcs67rOTfUlkOJs7xWcX0ygk/iWEmCWkC38+bRNTzjM02eP8iw==" + }, + "@ungap/essential-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@ungap/essential-map/-/essential-map-0.3.2.tgz", + "integrity": "sha512-3nKB3JV6GXjWfdRPvx1V8KQsyEtdYf9jmrpXu8U8G4RV4EzYWHcYVPHthiN+eYhtCXB7Qrzu+CPxHKPn8WBJ0Q==" + }, + "@ungap/essential-weakset": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@ungap/essential-weakset/-/essential-weakset-0.2.1.tgz", + "integrity": "sha512-h5HsksOZ7KDYqr+oMtAIR3ZQgaEbbSD6p4tVqaM1jCzWhbXkW6X6RpwfLQLqjfrRNTRqQtcwfsdwQMrpWbdp5A==" + }, + "@ungap/import-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/import-node/-/import-node-0.2.0.tgz", + "integrity": "sha512-VuWVBAMRjoOc63n8Cc19brS7KlhYJ+57790LF+lVw60nMRemCrz1T6HnoNx74IEW3FS+TM+vveJ70C6NyTKODQ==" + }, + "@ungap/is-array": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/is-array/-/is-array-0.2.0.tgz", + "integrity": "sha512-585x6xT7DmZDWzSog3ZEGJryN175zxPRQh8JvEqItlhOowGYU4xcv6qh/8623doCYI7vohJc/0R5OO2EqrV3+w==" + }, + "@ungap/template-literal": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@ungap/template-literal/-/template-literal-0.6.0.tgz", + "integrity": "sha512-J8+vZofH0TWM8M0ZU8qN/3fl6ct5mrB82+OSLSYXYZI0abi8a0FYPC65YViU1D2gRHdHQ7zXSv+LJiTM212rDw==", + "requires": { + "@ungap/weakmap": "^0.2.1" + } + }, + "@ungap/template-tag-arguments": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@ungap/template-tag-arguments/-/template-tag-arguments-0.5.0.tgz", + "integrity": "sha512-hyvUZuGy60qOLdg95BjxgwehbJ4UoIG+sAj7yie9coxeK/qLIcwKXp8cn2Cwm3ouLB9UKL2v/+eq9oRUjuBPJg==", + "requires": { + "@ungap/template-literal": "^0.6.0" + } + }, + "@ungap/trim": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@ungap/trim/-/trim-0.2.0.tgz", + "integrity": "sha512-CfsUxeZ2R/O3EGCOe+IkAU32yHOdO+mCRmtavSIQ4HZN3Jiq/ynGzq8/asyamd28U26UJmpSV/TC7+p7qELKrg==" + }, + "@ungap/weakmap": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@ungap/weakmap/-/weakmap-0.2.1.tgz", + "integrity": "sha512-GmVAWB+JuFKqSbzlofYK4qxk955gEv4Kd9/aj2hLOxneXMAm/J7OXcl5DlElS9tmkqwCcxGysSZGOrjzNvmjFQ==" + }, + "@webreflection/interface": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@webreflection/interface/-/interface-0.1.1.tgz", + "integrity": "sha1-ryqR2vOBeWVgcqb5Lp+SEWWPhWY=", + "dev": true + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "ascjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ascjs/-/ascjs-4.0.1.tgz", + "integrity": "sha512-E/JuvSEe3EfuCZ52Ff142b8lwmuCrSCR+FaDPryIL2svqCiWmDCbzFCcOB+dfFeD2QHMS7zzQ+rWFw73ZUoZjA==", + "dev": true, + "requires": { + "@babel/parser": "^7.9.6" + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "basichtml": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/basichtml/-/basichtml-2.3.0.tgz", + "integrity": "sha512-4OwuvFO4Lbcm+DquFlYMiEIvsrJtMNtEeG41k6swojGmQsfPnlunNuk6/xwUKYbyfXgAxiYFhJv3xT7FeQwh4A==", + "dev": true, + "requires": { + "@webreflection/interface": "^0.1.1", + "broadcast": "^3.0.0", + "html-escaper": "^3.0.0", + "htmlparser2": "^4.1.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "broadcast": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/broadcast/-/broadcast-3.0.0.tgz", + "integrity": "sha512-q//26zihgUvAtvSBRD1xtk/9KBVNfiUrS8Phz8dN95Y5mqINO/gFT6181b4Yvhoeal3Aa9+rsFnKzA6a6UTHfg==", + "dev": true + }, + "browserslist": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", + "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001254", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.830", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" + } + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caniuse-lite": { + "version": "1.0.30001257", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz", + "integrity": "sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "consolemd": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/consolemd/-/consolemd-0.1.3.tgz", + "integrity": "sha512-UHKTgtvAtikE0UIvqP9Rj0b+rZ5AHIvbfL+GSjYhH2UOJWfnoIJ0+zygI/l/7cOB8p9JrGrIkC1BgQXBNzEQQA==", + "dev": true, + "requires": { + "echomd": "^0.1.2" + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-js-compat": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", + "dev": true, + "requires": { + "browserslist": "^4.8.3", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "disconnected": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/disconnected/-/disconnected-0.2.1.tgz", + "integrity": "sha512-483TUpj4dA7Ye42xrErztbw3PKpkboPf1aB9mG4+S+RGGxFVv72hQBbS8MqN8LZLWHzfcmk2tMTRR5CoyxNglg==" + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "domconstants": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/domconstants/-/domconstants-0.1.1.tgz", + "integrity": "sha512-Pk4K6tLOzSh0cZDuh7TQivZtYLC6Z8dNissoDyy2tQoVNg8ewScxG3AVJO76kLcTta/u7bgEO6xbIR97MiInfA==" + }, + "domdiff": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/domdiff/-/domdiff-2.2.2.tgz", + "integrity": "sha512-Pv7aH5JfjNIkLRKkah+T3Kd41Gy+7GU+5dmPsOZZXsCJ34QR1i7CCiWraUn1c/a40htShxAQ8mHJR2OqPd12+Q==", + "requires": { + "uarray": "^1.0.0" + } + }, + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, + "domhandler": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz", + "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1" + } + }, + "domsanitizer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/domsanitizer/-/domsanitizer-0.2.2.tgz", + "integrity": "sha512-2nqCaLWi+tpT7oOa862BVrG7bHzYlWFZ5ltmvt4LXECxe5FnwF/zKGs/gWanZWGmv1pwdUTkO9TamoZMqI0Pmg==", + "requires": { + "domconstants": "^0.1.1" + } + }, + "domtagger": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/domtagger/-/domtagger-0.7.0.tgz", + "integrity": "sha512-ljf2FYn4DPbMP2RN2YD8VsuW1Rm5N7x3iV0QRmlu5JqoY6Zn/gcwI8j4NV91YOlmqIHzONA+TEFOWQ4oX89G4Q==", + "requires": { + "@ungap/create-content": "^0.2.0", + "@ungap/import-node": "^0.2.0", + "@ungap/trim": "^0.2.0", + "@ungap/weakmap": "^0.2.1", + "domconstants": "^0.1.1", + "domsanitizer": "^0.2.2", + "umap": "^1.0.2" + } + }, + "domutils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz", + "integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==", + "dev": true, + "requires": { + "dom-serializer": "^0.2.1", + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0" + } + }, + "drop-babel-typeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/drop-babel-typeof/-/drop-babel-typeof-1.0.3.tgz", + "integrity": "sha512-nmhRIvZrHSzEv8sc6kqh+2pG7ZAg9ZRjFyY4YavbIzvF/6SYdsH4SDFJAYLWTAh1XoVfdbe3Kmy44h/KB7gv+Q==", + "dev": true + }, + "echomd": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/echomd/-/echomd-0.1.2.tgz", + "integrity": "sha1-kNPPD55Fkwb0wdkKArZelxkj9v8=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.838", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.838.tgz", + "integrity": "sha512-65O6UJiyohFAdX/nc6KJ0xG/4zOn7XCO03kQNNbCeMRGxlWTLzc6Uyi0tFNQuuGWqySZJi8CD2KXPXySVYmzMA==", + "dev": true + }, + "entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "html-escaper": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", + "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==", + "dev": true + }, + "htmlparser2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", + "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + }, + "hyperhtml-style": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/hyperhtml-style/-/hyperhtml-style-0.1.2.tgz", + "integrity": "sha512-ZDRYNClEaqUS0a8RAED0nQRqWmZk7ctdyij3Iw/PqUUef6xhYO87nx9vJNuxg7Yc6J2FdJjXRKbB0iud2ZyzwQ==" + }, + "hyperhtml-wire": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/hyperhtml-wire/-/hyperhtml-wire-2.1.1.tgz", + "integrity": "sha512-6rOTnb+BSWIsNaqiji01BdV8qyhwyCT38aGmG5k37JQeI9n+lwgvFsq0/G7wNAh5NuGdAaWUl1umbjrW7fj++w==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "node-releases": { + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "npm-dollar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/npm-dollar/-/npm-dollar-2.2.1.tgz", + "integrity": "sha512-14pKEYwVWmrbGs8XtPKesSMF9okTy+aRniI1fjwyMoJIVc4wsawCRrR2i8AAubxfNBP1I2lesue5xT6cEm6sMQ==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.18.1.tgz", + "integrity": "sha512-w4X77ADA+WTGlapC8Z6yggdJtODw3SBl6R2LSkA7ZW5MtdkgcB7sfaSD1UWyx8diXbMcGIb0eI9gCx/dyqOgNQ==", + "dev": true, + "requires": { + "fsevents": "~2.1.2" + } + }, + "rollup-plugin-babel": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz", + "integrity": "sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "tressa": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tressa/-/tressa-0.3.1.tgz", + "integrity": "sha1-OhdV5a7cQ0+tmntp0EGrztdJatI=", + "dev": true, + "requires": { + "consolemd": "^0.1.2" + } + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "uarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uarray/-/uarray-1.0.0.tgz", + "integrity": "sha512-LHmiAd5QuAv7pU2vbh+Zq9YOnqVK0H764p2Ozinpfy9ka58OID4IsGLiXsitqH7n0NAIDxvax1A/kDXpii/Ckg==" + }, + "uglify-js": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", + "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", + "dev": true + }, + "umap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/umap/-/umap-1.0.2.tgz", + "integrity": "sha512-bW127HgG4H4VAD6qlqO5vCC+7bnlYvZ6A6BdwyGblkWvlEG7VYpj1bcpf3iJpvyKmkPZWDIeZDmoULz67ec7NA==" + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 7aa88cb2..1210de5e 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,100 @@ { "name": "hyperhtml", - "version": "1.12.5", + "version": "2.34.2", "description": "A Fast & Light Virtual DOM Alternative", "homepage": "https://viperhtml.js.org/hyper.html", - "browser": "min.js", - "main": "cjs/main.js", - "module": "esm/main.js", + "unpkg": "min.js", + "main": "cjs/index.js", + "module": "esm/index.js", + "types": "index.d.ts", "scripts": { - "cjs": "ascjs ./esm ./cjs", - "max": "echo \"const hyperHTML = $(asbundle ./esm/main.js)\" | babel --out-file ./index.v2.js --plugins=check-es2015-constants,transform-es2015-arrow-functions,transform-es2015-block-scoped-functions,transform-es2015-block-scoping,transform-es2015-computed-properties,transform-es2015-destructuring,transform-es2015-duplicate-keys,transform-es2015-for-of,transform-es2015-function-name,transform-es2015-literals,transform-es2015-parameters,transform-es2015-shorthand-properties,transform-es2015-spread \u000a\u000a#\u001b[1m I know, right? ... neither .babelrc nor package.json worked\u001b[0m", - "min": "uglifyjs index.v2.js --support-ie8 --comments=/^!/ -c -m -o min.v2.js", - "build": "npm run cjs && npm run max && npm run min && npm run size", - "coveralls": "cat ./coverage/lcov.info | coveralls", - "ie": "babel ./test/test.js --out-dir ./test/ie --presets=es2015", - "size": "cat index.v2.js | wc -c;cat min.v2.js | wc -c;gzip -c min.v2.js | wc -c", - "test": "echo 'coming soon' && exit 0" + "$": "npm-dollar", + "build": "npm run $ build", + "bundle": "npm run $ bundle", + "test": "npm run $ test" + }, + "$": { + "bundle": { + "max": [ + "rollup --config rollup.config.js", + "$ clean.esm", + "drop-babel-typeof index.js" + ], + "min": [ + [ + "echo \"/*! (c) Andrea Giammarchi (ISC) */$(", + "uglifyjs index.js -c -m", + ")\" > min.js" + ] + ], + "ie": [ + [ + "rollup --config rollup.ie.js" + ] + ], + "umd": [ + [ + "echo \"(function(A,G){if(typeof define=='function'&&define.amd)define([],G);else", + "if(typeof module=='object'&&module.exports)module.exports=G();else", + "A.hyperHTML=G()}(typeof self!='undefined'?self:this,function(){\">umd.js;cat", + "min.js>>umd.js;echo \"return hyperHTML}));\">>umd.js" + ] + ], + "esm": [ + "cp min.js esm.js", + "echo 'export default hyperHTML;' >> esm.js", + "echo 'export const {Component, bind, define, diff, hyper, wire} = hyperHTML;' >> esm.js" + ] + }, + "build": [ + "$ cjs", + "$ clean.cjs index.js", + "$ clean.cjs classes/Component.js", + "$ clean.cjs hyper/render.js", + "$ clean.cjs objects/Updates.js", + "$ clean.cjs shared/utils.js", + "$ clean.cjs hyper/wire.js", + "$ bundle.max", + "$ bundle.min", + "$ bundle.umd", + "$ bundle.esm", + "$ bundle.ie", + "$ test", + "$ size" + ], + "clean": { + "cjs": "sed -i.bck 's/m.default : m/\\/* istanbul ignore next *\\/ m.default : \\/* istanbul ignore next *\\/ m/g' cjs/$1 && rm -f cjs/$1.bck", + "esm": [ + [ + "cat index.js |", + "sed 's/(exports)/(document)/' |", + "sed 's/return exports;/return hyper;/' |", + "sed -e 's/exports.*;//g' |", + "sed '/var createContent$1 =/,/(document);/d' |", + "sed 's/createContent$1/createContent/' |", + "sed 's/({})/(document)/' |", + "sed -e 's/var isNoOp =.*/var isNoOp = false;/' > index.clean" + ], + "mv index.clean index.js" + ] + }, + "cjs": [ + "ascjs ./esm ./cjs" + ], + "size": { + "gzip": [ + [ + "cat index.js |", + "wc -c;cat min.js |", + "wc -c;gzip -c9 min.js |", + "wc -c" + ] + ], + "brotli": "cat min.js | brotli | wc -c" + }, + "test": [ + "istanbul cover test/runner.js" + ] }, "repository": { "type": "git", @@ -29,6 +109,7 @@ "lightweight", "fast", "react", + "virtual", "lit-html", "alternative" ], @@ -38,29 +119,47 @@ "url": "https://github.com/WebReflection/hyperhtml/issues" }, "devDependencies": { - "asbundle": "^2.2.0", - "ascjs": "^2.2.1", - "babel-cli": "^6.26.0", - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.26.0", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "coveralls": "^2.13.1", - "istanbul": "^0.4.5", - "jsdom": "^9.12.0", - "tressa": "^0.3.1", - "uglify-js": "^2.8.29" + "@babel/core": "7.10.3", + "@babel/preset-env": "7.10.3", + "ascjs": "4.0.1", + "basichtml": "2.3.0", + "drop-babel-typeof": "1.0.3", + "istanbul": "0.4.5", + "npm-dollar": "2.2.1", + "rollup": "2.18.1", + "rollup-plugin-babel": "4.4.0", + "rollup-plugin-node-resolve": "5.2.0", + "tressa": "0.3.1", + "uglify-js": "3.10.0" + }, + "greenkeeper": { + "ignore": [ + "uglify-js", + "rollup", + "rollup-plugin-babel", + "rollup-plugin-node-resolve" + ] }, "dependencies": { - "majinbuu": "^1.1.0" + "@ungap/create-content": "0.2.0", + "@ungap/custom-event": "0.3.1", + "@ungap/essential-map": "0.3.2", + "@ungap/essential-weakset": "0.2.1", + "@ungap/is-array": "0.2.0", + "@ungap/template-tag-arguments": "0.5.0", + "@ungap/weakmap": "0.2.1", + "disconnected": "0.2.1", + "domdiff": "2.2.2", + "domtagger": "0.7.0", + "hyperhtml-style": "0.1.2", + "hyperhtml-wire": "2.1.1" + }, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/hyperhtml" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/hyperhtml" } } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 00000000..65f24dc2 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,18 @@ +import resolve from 'rollup-plugin-node-resolve'; +import babel from 'rollup-plugin-babel'; + +export default { + input: 'esm/index.js', + plugins: [ + resolve({module: true}), + babel({presets: ["@babel/preset-env"]}) + ], + context: 'null', + moduleContext: 'null', + output: { + exports: 'named', + file: 'index.js', + format: 'iife', + name: 'hyperHTML' + } +}; diff --git a/rollup.ie.js b/rollup.ie.js new file mode 100644 index 00000000..3f1c1a3f --- /dev/null +++ b/rollup.ie.js @@ -0,0 +1,16 @@ +import resolve from 'rollup-plugin-node-resolve'; +import babel from 'rollup-plugin-babel'; + +export default { + input: 'test/test.js', + plugins: [ + resolve({module: true}), + babel({presets: ["@babel/preset-env"]}) + ], + context: 'null', + moduleContext: 'null', + output: { + file: 'test/ie/test/test.js', + format: 'iife' + } +}; diff --git a/test/basic.html b/test/basic.html index b5bd75e4..5cb6b3c9 100644 --- a/test/basic.html +++ b/test/basic.html @@ -7,16 +7,11 @@ document.write(' - + diff --git a/test/bundle.html b/test/bundle.html new file mode 100644 index 00000000..486f244b --- /dev/null +++ b/test/bundle.html @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test/ce.html b/test/ce.html index 624dd721..dfc1d233 100644 --- a/test/ce.html +++ b/test/ce.html @@ -1,5 +1,5 @@ - + + + + + + + \ No newline at end of file diff --git a/test/dbmonster.html b/test/dbmonster.html index 5d897831..f7654902 100644 --- a/test/dbmonster.html +++ b/test/dbmonster.html @@ -17,24 +17,28 @@ // table render renderTABLE = hyperHTML.bind(document.querySelector('#app')), TRs = [], - TDs = [], - Top5 = [] + TDfirst = [], + TDsecond = [], + TDothers = [] ; function updateTable(dbs) { renderTABLE` ${dbs.map((db, i) => render(TRs, i)` - ${render(TDs, i)` + ${[ + render(TDfirst, i)` + `, + render(TDsecond, i)` `.concat(db.lastSample.topFiveQueries.map((query, j, a) => - render(Top5, a.length * i + j)` + ` + ].concat(db.lastSample.topFiveQueries.map((query, j, a) => + render(TDothers, a.length * i + j)` '], ['']), - _templateObject40 = _taggedTemplateLiteral(['
    ', '
    '], ['
    ', '
    ']), - _templateObject41 = _taggedTemplateLiteral(['\n '], ['\n ']), - _templateObject42 = _taggedTemplateLiteral(['\n
    First name: ', '
    \n

    '], ['\n
    First name: ', '
    \n

    ']), - _templateObject43 = _taggedTemplateLiteral(['\n

    ', ''], ['\n

    ', '']), - _templateObject44 = _taggedTemplateLiteral(['

    '], ['

    ']), - _templateObject45 = _taggedTemplateLiteral(['

    '], ['

    ']), - _templateObject46 = _taggedTemplateLiteral(['a ', ''], ['a ', '']), - _templateObject47 = _taggedTemplateLiteral(['

    any content

    '], ['

    any content

    ']), - _templateObject48 = _taggedTemplateLiteral([''], ['']), - _templateObject49 = _taggedTemplateLiteral(['abc'], ['abc']), - _templateObject50 = _taggedTemplateLiteral(['

    a', 'c

    '], ['

    a', 'c

    ']), - _templateObject51 = _taggedTemplateLiteral(['a', 'c'], ['a', 'c']), - _templateObject52 = _taggedTemplateLiteral([''], ['']), - _templateObject53 = _taggedTemplateLiteral(['
    abc
    '], ['
    abc
    ']), - _templateObject54 = _taggedTemplateLiteral(['\n '], ['\n ']), - _templateObject55 = _taggedTemplateLiteral(['\n '], ['\n ']), - _templateObject56 = _taggedTemplateLiteral(['\n

    hello

    '], ['\n

    hello

    ']), - _templateObject57 = _taggedTemplateLiteral(['\n

    hello

    '], ['\n

    hello

    ']), - _templateObject58 = _taggedTemplateLiteral(['
    \n \n
    '], ['
    \n \n
    ']), - _templateObject59 = _taggedTemplateLiteral(['
      \n ', '\n
    '], ['
      \n ', '\n
    ']), - _templateObject60 = _taggedTemplateLiteral(['
  • ', '
  • '], ['
  • ', '
  • ']), - _templateObject61 = _taggedTemplateLiteral(['\n

    hello

    '], ['\n

    hello

    ']), - _templateObject62 = _taggedTemplateLiteral([''], ['']), - _templateObject63 = _taggedTemplateLiteral([''], ['']); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -var SKIP_ADOPT = (typeof location === 'undefined' ? 'undefined' : _typeof(location)) !== (typeof SKIP_ADOPT === 'undefined' ? 'undefined' : _typeof(SKIP_ADOPT)) && -1 < location.search.indexOf('noadopt'); - -tressa.title('HyperHTML'); -tressa.assert(typeof hyperHTML === 'function', 'hyperHTML is a function'); - -try { - tressa.log(''); -} catch (e) { - tressa.log = console.log.bind(console); -} - -/* -tressa.async(function (done) { - var wrap = document.createElement('p'); - hyperHTML.bind(wrap)`${1}`; - hyperHTML.bind(wrap)`${2}`; - tressa.assert(wrap.textContent == 2); - done(); -}) -*/ -tressa.async(function (done) { - tressa.log('## injecting text and attributes'); - var i = 0; - var div = document.body.appendChild(document.createElement('div')); - var render = hyperHTML.bind(div); - function update(i) { - return render(_templateObject, i, - // IE Edge mobile did something funny here - // as template string returned xxx.xxxx - // but as innerHTML returned xxx.xx - (Math.random() * new Date()).toFixed(2)); - } - function compare(html) { - return (/^\s*

    \s*Time: \d+\.\d+<[^>]+?>\s*<\/p>\s*$/i.test(html) - ); - } - var html = update(i++).innerHTML; - var p = div.querySelector('p'); - var attr = p.attributes[0]; - tressa.assert(compare(html), 'correct HTML'); - tressa.assert(html === div.innerHTML, 'correctly returned'); - setTimeout(function () { - tressa.log('## updating same nodes'); - var html = update(i++).innerHTML; - tressa.assert(compare(html), 'correct HTML update'); - tressa.assert(html === div.innerHTML, 'update applied'); - tressa.assert(p === div.querySelector('p'), 'no node was changed'); - tressa.assert(attr === p.attributes[0], 'no attribute was changed'); - done(); - }); -}).then(function () { - return tressa.async(function (done) { - tressa.log('## perf: same virtual text twice'); - var div = document.body.appendChild(document.createElement('div')); - var render = hyperHTML.bind(div); - var html = (update('hello').innerHTML, update('hello').innerHTML); - function update(text) { - return render(_templateObject2, text); +(function () { + 'use strict'; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } - tressa.assert(update('hello').innerHTML === update('hello').innerHTML, 'same text'); - done(div); - }); -}).then(function () { - return tressa.async(function (done) { - tressa.log('## injecting HTML'); + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; + } + + function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); + } + + function _templateObject130() { + var data = _taggedTemplateLiteral([""]); + + _templateObject130 = function _templateObject130() { + return data; + }; + + return data; + } + + function _templateObject129() { + var data = _taggedTemplateLiteral([""]); + + _templateObject129 = function _templateObject129() { + return data; + }; + + return data; + } + + function _templateObject128() { + var data = _taggedTemplateLiteral([""]); + + _templateObject128 = function _templateObject128() { + return data; + }; + + return data; + } + + function _templateObject127() { + var data = _taggedTemplateLiteral(["

    "]); + + _templateObject127 = function _templateObject127() { + return data; + }; + + return data; + } + + function _templateObject126() { + var data = _taggedTemplateLiteral(["", " - ", ""]); + + _templateObject126 = function _templateObject126() { + return data; + }; + + return data; + } + + function _templateObject125() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject125 = function _templateObject125() { + return data; + }; + + return data; + } + + function _templateObject124() { + var data = _taggedTemplateLiteral(["

    c

    "]); + + _templateObject124 = function _templateObject124() { + return data; + }; + + return data; + } + + function _templateObject123() { + var data = _taggedTemplateLiteral(["

    a

    b

    "]); + + _templateObject123 = function _templateObject123() { + return data; + }; + + return data; + } + + function _templateObject122() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject122 = function _templateObject122() { + return data; + }; + + return data; + } + + function _templateObject121() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject121 = function _templateObject121() { + return data; + }; + + return data; + } + + function _templateObject120() { + var data = _taggedTemplateLiteral(["\n
  • ", "
  • \n "]); + + _templateObject120 = function _templateObject120() { + return data; + }; + + return data; + } + + function _templateObject119() { + var data = _taggedTemplateLiteral(["\n
    A simple menu
    \n
      \n ", "\n
    \n "]); + + _templateObject119 = function _templateObject119() { + return data; + }; + + return data; + } + + function _templateObject118() { + var data = _taggedTemplateLiteral(["\n
    A simple menu
    \n
      \n ", "\n
    \n "]); + + _templateObject118 = function _templateObject118() { + return data; + }; + + return data; + } + + function _templateObject117() { + var data = _taggedTemplateLiteral(["\n
    I'm parent\n ", "\n
    \n "]); + + _templateObject117 = function _templateObject117() { + return data; + }; + + return data; + } + + function _templateObject116() { + var data = _taggedTemplateLiteral(["\n
    I'm child\n ", "\n
    \n "]); + + _templateObject116 = function _templateObject116() { + return data; + }; + + return data; + } + + function _templateObject115() { + var data = _taggedTemplateLiteral(["\n

    I'm grand child

    "]); + + _templateObject115 = function _templateObject115() { + return data; + }; + + return data; + } + + function _templateObject114() { + var data = _taggedTemplateLiteral(["\n
    \n
    "]); + + _templateObject40 = function _templateObject40() { + return data; + }; + + return data; + } + + function _templateObject39() { + var data = _taggedTemplateLiteral([""]); + + _templateObject39 = function _templateObject39() { + return data; + }; + + return data; + } + + function _templateObject38() { + var data = _taggedTemplateLiteral([""]); + + _templateObject38 = function _templateObject38() { + return data; + }; + + return data; + } + + function _templateObject37() { + var data = _taggedTemplateLiteral([""]); + + _templateObject37 = function _templateObject37() { + return data; + }; + + return data; + } + + function _templateObject36() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject36 = function _templateObject36() { + return data; + }; + + return data; + } + + function _templateObject35() { + var data = _taggedTemplateLiteral(["

    "]); + + _templateObject35 = function _templateObject35() { + return data; + }; + + return data; + } + + function _templateObject34() { + var data = _taggedTemplateLiteral(["[", "]"]); + + _templateObject34 = function _templateObject34() { + return data; + }; + + return data; + } + + function _templateObject33() { + var data = _taggedTemplateLiteral(["a=", ""]); + + _templateObject33 = function _templateObject33() { + return data; + }; + + return data; + } + + function _templateObject32() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject32 = function _templateObject32() { + return data; + }; + + return data; + } + + function _templateObject31() { + var data = _taggedTemplateLiteral([""]); + + _templateObject31 = function _templateObject31() { + return data; + }; + + return data; + } + + function _templateObject30() { + var data = _taggedTemplateLiteral(["", "
    "]); + + _templateObject30 = function _templateObject30() { + return data; + }; + + return data; + } + + function _templateObject29() { + var data = _taggedTemplateLiteral(["
    ", ""]); + + _templateObject29 = function _templateObject29() { + return data; + }; + + return data; + } + + function _templateObject28() { + var data = _taggedTemplateLiteral([""]); + + _templateObject28 = function _templateObject28() { + return data; + }; + + return data; + } + + function _templateObject27() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject27 = function _templateObject27() { + return data; + }; + + return data; + } + + function _templateObject26() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject26 = function _templateObject26() { + return data; + }; + + return data; + } + + function _templateObject25() { + var data = _taggedTemplateLiteral(["

    ", "

    ", "
    ", "
    ", ""]); + + _templateObject25 = function _templateObject25() { + return data; + }; + + return data; + } + + function _templateObject24() { + var data = _taggedTemplateLiteral(["

    "]); + + _templateObject24 = function _templateObject24() { + return data; + }; + + return data; + } + + function _templateObject23() { + var data = _taggedTemplateLiteral([""]); + + _templateObject23 = function _templateObject23() { + return data; + }; + + return data; + } + + function _templateObject22() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject22 = function _templateObject22() { + return data; + }; + + return data; + } + + function _templateObject21() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject21 = function _templateObject21() { + return data; + }; + + return data; + } + + function _templateObject20() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject20 = function _templateObject20() { + return data; + }; + + return data; + } + + function _templateObject19() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject19 = function _templateObject19() { + return data; + }; + + return data; + } + + function _templateObject18() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject18 = function _templateObject18() { + return data; + }; + + return data; + } + + function _templateObject17() { + var data = _taggedTemplateLiteral(["
    ", "
    "]); + + _templateObject17 = function _templateObject17() { + return data; + }; + + return data; + } + + function _templateObject16() { + var data = _taggedTemplateLiteral(["\n
  • ", "
  • \n "]); + + _templateObject16 = function _templateObject16() { + return data; + }; + + return data; + } + + function _templateObject15() { + var data = _taggedTemplateLiteral(["\n
    \n
      ", "
    \n
    "]); + + _templateObject15 = function _templateObject15() { + return data; + }; + + return data; + } + + function _templateObject14() { + var data = _taggedTemplateLiteral(["\n O"]); + + _templateObject14 = function _templateObject14() { + return data; + }; + + return data; + } + + function _templateObject13() { + var data = _taggedTemplateLiteral(["a"]); + + _templateObject13 = function _templateObject13() { + return data; + }; + + return data; + } + + function _templateObject12() { + var data = _taggedTemplateLiteral(["", ""]); + + _templateObject12 = function _templateObject12() { + return data; + }; + + return data; + } + + function _templateObject11() { + var data = _taggedTemplateLiteral(["\n 0\n

    1

    \n "]); + + _templateObject11 = function _templateObject11() { + return data; + }; + + return data; + } + + function _templateObject10() { + var data = _taggedTemplateLiteral(["\n

    1

    \n "]); + + _templateObject10 = function _templateObject10() { + return data; + }; + + return data; + } + + function _templateObject9() { + var data = _taggedTemplateLiteral(["

    OK

    "]); + + _templateObject9 = function _templateObject9() { + return data; + }; + + return data; + } + + function _templateObject8() { + var data = _taggedTemplateLiteral(["\n

    1

    \n

    2

    \n

    3

    \n "]); + + _templateObject8 = function _templateObject8() { + return data; + }; + + return data; + } + + function _templateObject7() { + var data = _taggedTemplateLiteral(["\n

    1

    \n

    2

    \n "]); + + _templateObject7 = function _templateObject7() { + return data; + }; + + return data; + } + + function _templateObject6() { + var data = _taggedTemplateLiteral(["how cool"]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; + } + + function _templateObject5() { + var data = _taggedTemplateLiteral(["

    ", "

    "]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; + } + + function _templateObject4() { + var data = _taggedTemplateLiteral(["click"]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; + } + + function _templateObject3() { + var data = _taggedTemplateLiteral(["

    ", "

    "]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; + } + + function _templateObject2() { + var data = _taggedTemplateLiteral(["

    ", " world

    "]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; + } + + function _templateObject() { + var data = _taggedTemplateLiteral(["\n

    \n Time: ", "\n

    \n "]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; + } + + tressa.title('HyperHTML'); + tressa.assert(typeof hyperHTML === 'function', 'hyperHTML is a function'); + + try { + tressa.log(''); + } catch (e) { + tressa.log = console.log.bind(console); + } + + tressa.async(function (done) { + tressa.log('## injecting text and attributes'); + var i = 0; var div = document.body.appendChild(document.createElement('div')); var render = hyperHTML.bind(div); - var html = update('hello').innerHTML; - function update(text) { - return render(_templateObject3, ['' + text + '']); + + function update(i) { + return render(_templateObject(), i, // IE Edge mobile did something funny here + // as template string returned xxx.xxxx + // but as innerHTML returned xxx.xx + (Math.random() * new Date()).toFixed(2)); } + function compare(html) { - return (/^

    \w+<\/strong><\/p>$/i.test(html) - ); + return /^\s*

    \s*Time: \d+\.\d+<[^>]+?>\s*<\/p>\s*$/i.test(html); } - tressa.assert(compare(html), 'HTML injected'); - tressa.assert(html === div.innerHTML, 'HTML returned'); - done(div); - }); -}).then(function (div) { - return tressa.async(function (done) { - tressa.log('## function attributes'); - var render = hyperHTML.bind(div); - var times = 0; - update(function (e) { - console.log(e.type); - if (++times > 1) { - return tressa.assert(false, 'events are broken'); + + var html = update(i++).innerHTML; + var p = div.querySelector('p'); + var attr = p.attributes[0]; + tressa.assert(compare(html), 'correct HTML'); + tressa.assert(html === div.innerHTML, 'correctly returned'); + setTimeout(function () { + tressa.log('## updating same nodes'); + var html = update(i++).innerHTML; + tressa.assert(compare(html), 'correct HTML update'); + tressa.assert(html === div.innerHTML, 'update applied'); + tressa.assert(p === div.querySelector('p'), 'no node was changed'); + tressa.assert(attr === p.attributes[0], 'no attribute was changed'); + done(); + }); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## perf: same virtual text twice'); + var div = document.body.appendChild(document.createElement('div')); + var render = hyperHTML.bind(div); + var html = (update('hello').innerHTML, update('hello').innerHTML); + + function update(text) { + return render(_templateObject2(), text); + } + + tressa.assert(update('hello').innerHTML === update('hello').innerHTML, 'same text'); + done(div); + }); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## injecting HTML'); + var div = document.body.appendChild(document.createElement('div')); + var render = hyperHTML.bind(div); + var html = update('hello').innerHTML; + + function update(text) { + return render(_templateObject3(), ['' + text + '']); + } + + function compare(html) { + return /^

    \w+<\/strong><\/p>$/i.test(html); } - if (e) { - e.preventDefault(); - e.stopPropagation(); + + tressa.assert(compare(html), 'HTML injected'); + tressa.assert(html === div.innerHTML, 'HTML returned'); + done(div); + }); + }).then(function (div) { + return tressa.async(function (done) { + tressa.log('## function attributes'); + var render = hyperHTML.bind(div); + var times = 0; + update(function (e) { + console.log(e.type); + + if (++times > 1) { + return tressa.assert(false, 'events are broken'); + } + + if (e) { + e.preventDefault(); + e.stopPropagation(); + } + + tressa.assert(true, 'onclick invoked'); + tressa.assert(!a.hasAttribute('onclick'), 'no attribute'); + update(null); + e = document.createEvent('Event'); + e.initEvent('click', false, false); + a.dispatchEvent(e); + done(div); + }); + + function update(click) { + // also test case-insensitive builtin events + return render(_templateObject4(), click); } - tressa.assert(true, 'onclick invoked'); - tressa.assert(!a.hasAttribute('onclick'), 'no attribute'); - update(null); - e = document.createEvent('Event'); + + var a = div.querySelector('a'); + var e = document.createEvent('Event'); e.initEvent('click', false, false); a.dispatchEvent(e); + }); + }).then(function (div) { + return tressa.async(function (done) { + tressa.log('## changing template'); + var render = hyperHTML.bind(div); + var html = update('hello').innerHTML; + + function update(text) { + return render(_templateObject5(), { + any: ['' + text + ''] + }); + } + + function compare(html) { + return /^

    \w+<\/em><\/p>$/i.test(html); + } + + tressa.assert(compare(html), 'new HTML injected'); + tressa.assert(html === div.innerHTML, 'new HTML returned'); done(div); }); - function update(click) { - // also test case-insensitive builtin events - return render(_templateObject4, click); - } - var a = div.querySelector('a'); - var e = document.createEvent('Event'); - e.initEvent('click', false, false); - a.dispatchEvent(e); - }); -}).then(function (div) { - return tressa.async(function (done) { - tressa.log('## changing template'); - var render = hyperHTML.bind(div); - var html = update('hello').innerHTML; - function update(text) { - return render(_templateObject3, { any: ['' + text + ''] }); - } - function compare(html) { - return (/^

    \w+<\/em><\/p>$/i.test(html) - ); - } - tressa.assert(compare(html), 'new HTML injected'); - tressa.assert(html === div.innerHTML, 'new HTML returned'); - done(div); - }); -}).then(function () { - return tressa.async(function (done) { - tressa.log('## custom events'); - var render = hyperHTML.bind(document.createElement('p')); - var e = document.createEvent('Event'); - e.initEvent('Custom-EVENT', true, true); - render(_templateObject5, function (e) { - tressa.assert(e.type === 'Custom-EVENT', 'event triggered'); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## custom events'); + var render = hyperHTML.bind(document.createElement('p')); + var e = document.createEvent('Event'); + e.initEvent('Custom-EVENT', true, true); + render(_templateObject6(), function (e) { + tressa.assert(e.type === 'Custom-EVENT', 'event triggered'); + done(); + }).firstElementChild.dispatchEvent(e); + }); + }).then(function () { + tressa.log('## multi wire removal'); + var render = hyperHTML.wire(); + + var update = function update() { + return render(_templateObject7()); + }; + + update().remove(); + + update = function update() { + return render(_templateObject8()); + }; + + update().remove(); + tressa.assert(true, 'OK'); + }).then(function () { + tressa.log('## the attribute id'); + var div = document.createElement('div'); + hyperHTML.bind(div)(_templateObject9(), 'id'); + tressa.assert(div.firstChild.id === 'id', 'the id is preserved'); + tressa.assert(div.firstChild.className === 'class', 'the class is preserved'); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## hyperHTML.wire()'); + var render = hyperHTML.wire(); + + var update = function update() { + return render(_templateObject10()); + }; + + var node = update(); + tressa.assert(node.nodeName.toLowerCase() === 'p', 'correct node'); + var same = update(); + tressa.assert(node === same, 'same node returned'); + render = hyperHTML.wire(null); + + update = function update() { + return render(_templateObject11()); + }; + + node = update().childNodes; + tressa.assert(Array.isArray(node), 'list of nodes'); + same = update().childNodes; + tressa.assert(node.length === same.length && node[0] && node.every(function (n, i) { + return same[i] === n; + }), 'same list returned'); + var div = document.createElement('div'); + render = hyperHTML.bind(div); + render(_templateObject12(), node); + same = div.childNodes; + tressa.assert(node[0] && node.every(function (n, i) { + return same[i] === n; + }), 'same list applied'); + + function returnSame() { + return render(_templateObject13()); + } + + render = hyperHTML.wire(); + tressa.assert(returnSame() === returnSame(), 'template sensible wire'); done(); - }).firstElementChild.dispatchEvent(e); - }); -}).then(function () { - tressa.log('## hyperHTML.escape(html)'); - tressa.assert(hyperHTML.escape('') === '<html>', 'escape as expected'); -}).then(function () { - return tressa.async(function (done) { - tressa.log('## hyperHTML.wire()'); + }); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## hyperHTML.wire(object)'); + var point = { + x: 1, + y: 2 + }; + + function update() { + return hyperHTML.wire(point)(_templateObject14(), "\n position: absolute;\n left: ".concat(point.x, "px;\n top: ").concat(point.y, "px;\n ")); + } + + try { + update(); + } catch (e) { + console.error(e); + } + + tressa.assert(update() === update(), 'same output'); + tressa.assert(hyperHTML.wire(point) === hyperHTML.wire(point), 'same wire'); + done(); + }); + }).then(function () { + if (typeof MutationObserver === 'undefined') return; + return tressa.async(function (done) { + tressa.log('## preserve first child where first child is the same as incoming'); + var div = document.body.appendChild(document.createElement('div')); + var render = hyperHTML.bind(div); + var observer = new MutationObserver(function (mutations) { + for (var i = 0, len = mutations.length; i < len; i++) { + trackMutations(mutations[i].addedNodes, 'added'); + trackMutations(mutations[i].removedNodes, 'removed'); + } + }); + observer.observe(div, { + childList: true, + subtree: true + }); + var counters = []; + + function trackMutations(nodes, countKey) { + for (var i = 0, len = nodes.length, counter, key; i < len; i++) { + if (nodes[i] && nodes[i].getAttribute && nodes[i].getAttribute('data-test')) { + key = nodes[i].getAttribute('data-test'); + counter = counters[key] || (counters[key] = { + added: 0, + removed: 0 + }); + counter[countKey]++; + } + + if (nodes[i].childNodes.length > 0) { + trackMutations(nodes[i].childNodes, countKey); + } + } + } + + var listItems = []; + + function update(items) { + render(_templateObject15(), items.map(function (item, i) { + return hyperHTML.wire(listItems[i] || (listItems[i] = {}))(_templateObject16(), i, function () { + return item.text; + }); + })); + } + + update([]); + setTimeout(function () { + update([{ + text: 'test1' + }]); + }, 10); + setTimeout(function () { + update([{ + text: 'test1' + }, { + text: 'test2' + }]); + }, 20); + setTimeout(function () { + update([{ + text: 'test1' + }]); + }, 30); + setTimeout(function () { + if (counters.length) { + tressa.assert(counters[0].added === 1, 'first item added only once'); + tressa.assert(counters[0].removed === 0, 'first item never removed'); + } + + done(); + }, 100); + }); + }).then(function () { + tressa.log('## rendering one node'); + var div = document.createElement('div'); + var br = document.createElement('br'); + var hr = document.createElement('hr'); + hyperHTML.bind(div)(_templateObject17(), br); + tressa.assert(div.firstChild.firstChild === br, 'one child is added'); + hyperHTML.bind(div)(_templateObject18(), hr); + tressa.assert(div.firstChild.firstChild === hr, 'one child is changed'); + hyperHTML.bind(div)(_templateObject19(), [hr, br]); + tressa.assert(div.firstChild.childNodes[0] === hr && div.firstChild.childNodes[1] === br, 'more children are added'); + hyperHTML.bind(div)(_templateObject20(), [br, hr]); + tressa.assert(div.firstChild.childNodes[0] === br && div.firstChild.childNodes[1] === hr, 'children can be swapped'); + hyperHTML.bind(div)(_templateObject21(), br); + tressa.assert(div.firstChild.firstChild === br, 'one child is kept'); + hyperHTML.bind(div)(_templateObject22(), []); + tressa.assert(/

    <\/div>/.test(div.innerHTML), 'dropped all children'); + }).then(function () { + tressa.log('## wire by id'); + var ref = {}; + var wires = { + a: function a() { + return hyperHTML.wire(ref, ':a')(_templateObject23()); + }, + p: function p() { + return hyperHTML.wire(ref, ':p')(_templateObject24()); + } + }; + tressa.assert(wires.a().nodeName.toLowerCase() === 'a', ' is correct'); + tressa.assert(wires.p().nodeName.toLowerCase() === 'p', '

    is correct'); + tressa.assert(wires.a() === wires.a(), 'same wire for '); + tressa.assert(wires.p() === wires.p(), 'same wire for

    '); + }).then(function () { + return tressa.async(function (done) { + tressa.log('## Promises instead of nodes'); + var wrap = document.createElement('div'); + var render = hyperHTML.bind(wrap); + render(_templateObject25(), new Promise(function (r) { + setTimeout(r, 50, 'any'); + }), new Promise(function (r) { + setTimeout(r, 10, 'virtual'); + }), [new Promise(function (r) { + setTimeout(r, 20, 1); + }), new Promise(function (r) { + setTimeout(r, 10, 2); + })], [new Promise(function (r) { + setTimeout(r, 20, 3); + }), new Promise(function (r) { + setTimeout(r, 10, 4); + })]); + var result = wrap.innerHTML; + setTimeout(function () { + tressa.assert(result !== wrap.innerHTML, 'promises fullfilled'); + tressa.assert(/^

    any<\/p>virtual

    12<\/div>34$/.test(wrap.innerHTML), 'both any and virtual content correct'); + done(); + }, 100); + }); + }).then(function () { + hyperHTML.engine = hyperHTML.engine; + tressa.log('## for code coverage sake'); + var wrap = document.createElement('div'); + var text = [document.createTextNode('a'), document.createTextNode('b'), document.createTextNode('c')]; + var testingMajinBuu = hyperHTML.bind(wrap); + testingMajinBuu(_templateObject26(), [text]); + tressa.assert(wrap.textContent === 'abc'); + text[0] = document.createTextNode('c'); + text[2] = document.createTextNode('a'); + testingMajinBuu(_templateObject27(), [text]); + tressa.assert(wrap.textContent === 'cba'); + var result = hyperHTML.wire()(_templateObject28()); + tressa.assert(result.nodeType === 8, 'it is a comment'); + tressa.assert(result.textContent === 'not hyperHTML', 'correct content'); + hyperHTML.bind(wrap)(_templateObject29(), 'node before'); + tressa.assert(/^node before$/i.test(wrap.innerHTML), 'node before'); + hyperHTML.bind(wrap)(_templateObject30(), 'node after'); + tressa.assert(/^node after$/i.test(wrap.innerHTML), 'node after'); + hyperHTML.bind(wrap)(_templateObject31(), 'hyper-html{}'); + tressa.assert('' === wrap.innerHTML.toLowerCase(), 'node style'); + + var empty = function empty(value) { + return hyperHTML.bind(wrap)(_templateObject32(), value); + }; + + empty(document.createTextNode('a')); + empty(document.createDocumentFragment()); + empty(document.createDocumentFragment()); + var fragment = document.createDocumentFragment(); + fragment.appendChild(document.createTextNode('b')); + empty(fragment); + empty(123); + tressa.assert(wrap.textContent === '123', 'text as number'); + empty(true); + tressa.assert(wrap.textContent === 'true', 'text as boolean'); + empty([1]); + tressa.assert(wrap.textContent === '1', 'text as one entry array'); + empty(['1', '2']); + tressa.assert(wrap.textContent === '12', 'text as multi entry array of strings'); + var arr = [document.createTextNode('a'), document.createTextNode('b')]; + empty([arr]); + tressa.assert(wrap.textContent === 'ab', 'text as multi entry array of nodes'); + empty([arr]); + tressa.assert(wrap.textContent === 'ab', 'same array of nodes'); + empty(wrap.childNodes); + tressa.assert(wrap.textContent === 'ab', 'childNodes as list'); + hyperHTML.bind(wrap)(_templateObject33(), { + length: 1, + '0': 'b' + }); + tressa.assert(wrap.textContent === 'a=b', 'childNodes as virtual list'); + + empty = function empty() { + return hyperHTML.bind(wrap)(_templateObject34(), 'text'); + }; + + empty(); + empty(); + + var onclick = function onclick(e) {}; + + var handler = { + handleEvent: onclick + }; + + empty = function empty() { + return hyperHTML.bind(wrap)(_templateObject35(), onclick, handler, 'left'); + }; + + empty(); + handler = { + handleEvent: onclick + }; + empty(); + empty(); + + empty = function empty(value) { + return hyperHTML.bind(wrap)(_templateObject36(), value); + }; + + empty(arr[0]); + empty(arr); + empty(arr); + empty([]); + empty(['1', '2']); + empty(document.createDocumentFragment()); + tressa.assert(true, 'passed various virtual content scenarios'); + var svgContainer = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + if (!('ownerSVGElement' in svgContainer)) svgContainer.ownerSVGElement = null; + hyperHTML.bind(svgContainer)(_templateObject37()); + result = hyperHTML.wire(null, 'svg')(_templateObject38()); + tressa.assert(result.nodeName.toLowerCase() === 'svg', 'svg content is allowed too'); + result = hyperHTML.wire()(_templateObject39()); + tressa.assert(!result.innerHTML, 'empty content'); + var tr = hyperHTML.wire()(_templateObject40()); + tressa.assert(true, 'even TR as template'); + hyperHTML.bind(wrap)(_templateObject41(), ' 1 '); + tressa.assert(wrap.textContent === ' 1 ', 'text in between'); + hyperHTML.bind(wrap)(_templateObject42(), 1); + tressa.assert(/^\s*1\s*$/.test(wrap.innerHTML), 'virtual content in between'); + var last = hyperHTML.wire(); + + empty = function empty(style) { + return last(_templateObject43(), style, function () { + return 'same text'; + }); + }; + + empty('border:0'); + empty({ + border: 0 + }); + empty({ + vh: 100 + }); + empty({ + vh: 10, + vw: 1 + }); + empty(null); + empty(''); + var sameStyle = { + ord: 0 + }; + empty(sameStyle); + empty(sameStyle); + + empty = function empty() { + return last(_templateObject44(), last); + }; + + empty(); + empty(); + var p = last(_templateObject45(), last, 0); + var UID = p.childNodes[1].data; + last(_templateObject46(), "")); + hyperHTML.wire()(_templateObject47()); + }).then(function () { + tressa.log('## - - + \ No newline at end of file diff --git a/test/lib.html b/test/lib.html index 9229b6a4..e2b0a69b 100644 --- a/test/lib.html +++ b/test/lib.html @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/test/mutations.html b/test/mutations.html new file mode 100644 index 00000000..db6ed184 --- /dev/null +++ b/test/mutations.html @@ -0,0 +1,170 @@ + + + + + hyperHTML Smart Diffing + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/test/runner.js b/test/runner.js index 0185f881..d7e77102 100644 --- a/test/runner.js +++ b/test/runner.js @@ -1,124 +1,114 @@ -require('jsdom').env( - require('fs').readFileSync(__dirname + '/index.html').toString(), - [], - function (err, window) { - /* - if (!global.CustomEvent) { - global.CustomEvent = function (type, init) { - var e = document.createEvent('Event'); - e.initEvent(type, init.bubbles, init.cancelable); - e.detail = init.detail; - return e; - }; +function usableAfter(object, property, times) { + if (!times) times = 0; + var original = object[property], i = 0; + Object.defineProperty(object, property, { + get() { + return i++ < times ? void 0 : original; } - //*/ - global.document = window.document; - global.tressa = require('tressa'); - var Int32Array = global.Int32Array; - global.Int32Array = void 0; - global.hyperHTML = require('../index.js'); - global.Int32Array = Int32Array; - require('./test.js'); - setTimeout(function () { - var proto = global.document.createDocumentFragment(); - do { - proto = Object.getPrototypeOf(proto); - } while(!Object.getOwnPropertyNames(proto, 'children')); - - delete proto.children; - - global.navigator = {userAgent: 'Firefox/54'}; - Object.prototype.append = function () { - [].forEach.call(arguments, this.appendChild, this); - }; - Object.prototype.nodeType = 2; - var $Map = global.Map; - // var $CustomEvent = global.CustomEvent; - global.String.prototype.trim = global.WeakMap = global.WeakSet = global.Map = void 0; - delete require.cache[require.resolve('../index.js')]; - delete require.cache[require.resolve('./test.js')]; - delete global.document.importNode; - delete Object.getPrototypeOf(global.document).importNode; - // fake initial feature detection - var createElement = global.document.createElement; - var templates = 0; - global.document.createElement = function () { - global.document.createElement = function (name) { - return createElement.call( - global.document, - name === 'template' ? (++templates % 15 ? 'div' : name) : name); - }; - //delete document.createElement('template').constructor.prototype.content; - return {firstChild:{attributes:[{name:'class'}]}}; - }; - var isArray = Array.isArray; - delete Array.isArray; - - // forcing once IE11 shenanigans with fragments - var createDocumentFragment = global.document.createDocumentFragment; - global.document.createDocumentFragment = function () { - this.createDocumentFragment = createDocumentFragment; - var featureDetection = createDocumentFragment.call(global.document); - var appendChild = featureDetection.appendChild; - featureDetection.appendChild = function (child) { - if (child.textContent.length) appendChild.call(this, child); - else featureDetection.appendChild = appendChild; - return this; - }; - return featureDetection; - }; - var bind = Function.prototype.bind; - delete Function.prototype.bind; - - global.Event = function (type) { - var e = global.document.createEvent('Event'); - e.initEvent(type, false, false); - return e; - }; - global.MutationObserver = function (fn) { - return {observe: function (document) { - document.addEventListener('DOMNodeInserted', function (e) { - fn([{ - addedNodes: [e.target], - removedNodes: [] - }]); - }, false); - document.addEventListener('DOMNodeRemoved', function (e) { - fn([{ - addedNodes: [], - removedNodes: [e.target] - }]); - }, false); - }}; - }; - global.hyperHTML = require('../index.js'); - - Function.prototype.bind = bind; - - Array.isArray = isArray; - Map = $Map; - - // how to reproduce the lovely double viewPort fucktard IE9 behavior? - var div = global.document.createElement('div'); - div.innerHTML = ''; - var removeAttributeNode = div.firstChild.constructor.prototype.removeAttributeNode; - var lastRemovedNode; - div.firstChild.constructor.prototype.removeAttributeNode = function (attribute) { - lastRemovedNode = attribute; - return removeAttributeNode.apply(this, arguments); - }; - var create = Object.create; - Object.create = function (proto) { - if (proto === null && arguments.length < 2) { - return {get viewBox() { - return lastRemovedNode; - }}; - } - else { - return create.apply(null, arguments); + }); +} + +const $WeakMap = global.WeakMap; + +global.tressa = require('tressa'); + +const {CustomEvent, Document, HTMLElement} = require('basichtml'); +global.window = global; +global.document = new Document(); +global.customElements = document.customElements; +global.CustomEvent = CustomEvent; + +document.importNode = function (node, deep) { + return node.cloneNode(deep); +}; + +customElements.define('input', class extends HTMLElement { + get name() { return this.getAttribute('name'); } + set name(text) { this.setAttribute('name', text); } + get value() { return this.getAttribute('value'); } + set value(text) { this.setAttribute('value', text); } +}); + +global.hyperHTML = require('../cjs').default; + +require('./test.js'); + +setTimeout(function () { + return; + + delete require.cache[require.resolve('../cjs')]; + delete require.cache[require.resolve('./test.js')]; + + usableAfter(Array, 'isArray', 1); + usableAfter(String.prototype, 'trim', 1); + + global.navigator = {userAgent: 'Firefox/54'}; + + /* + const propertyIsEnumerable = {}.propertyIsEnumerable; + Object.prototype.propertyIsEnumerable = function (key) { + return key === 'raw' ? true : propertyIsEnumerable.call(this, key); + }; + */ + + delete global.Int32Array; + delete document.importNode; + delete Object.getPrototypeOf(document.constructor.prototype).importNode; + delete Object.getPrototypeOf(document.createDocumentFragment().constructor.prototype).append; + + var createElement = document.createElement; + document.createElement = function (name) { + return createElement.call(this, name === 'template' ? 'div' : name); + }; + + var createDocumentFragment = document.createDocumentFragment, cDF = 0; + document.createDocumentFragment = function () { + return cDF++ === 0 ? + { + ownerDocument: document, + appendChild: Object, + cloneNode: function () { + return {childNodes: {length: 1}}; } - }; - require('./test.js'); - }, 500); - } -); + } : + createDocumentFragment.call(document); + }; + + global.Event = function (type) { + var e = global.document.createEvent('Event'); + e.initEvent(type, false, false); + return e; + }; + global.MutationObserver = function (fn) { + return {observe: function (document) { + document.addEventListener('DOMNodeInserted', function (e) { + fn([{ + addedNodes: [e.target], + removedNodes: [] + }]); + }, false); + document.addEventListener('DOMNodeRemoved', function (e) { + fn([{ + addedNodes: [], + removedNodes: [e.target] + }]); + }, false); + }}; + }; + + window.hyperHTML = require('../cjs').default; + require('./domdiff.js'); + require('./test.js'); + + if ($WeakMap) setTimeout(() => { + delete require.cache[require.resolve('../cjs')]; + delete require.cache[require.resolve('./test.js')]; + global.WeakMap = function () { + const wm = new $WeakMap; + wm.get = () => false; + return wm; + }; + require('../cjs'); + require('./test.js'); + }, 2000); +}, 2000); \ No newline at end of file diff --git a/test/select.html b/test/select.html index f25fb051..8322e755 100644 --- a/test/select.html +++ b/test/select.html @@ -47,12 +47,14 @@ function update(render, items, events) { return render` - ${items.map((item, i) => hyperHTML.wire(item)` + `)} `; } + + setInterval(update, 1000, render, items, events); diff --git a/test/shared/main.js b/test/shared/main.js new file mode 100644 index 00000000..cfafdf96 --- /dev/null +++ b/test/shared/main.js @@ -0,0 +1,50 @@ +const {Document} = require('basichtml'); +global.document = new Document(); + +const ed = require('../../cjs/shared/easy-dom'); +console.assert(ed.create(document, 'P').nodeName === 'P', 'easy-dom.create'); +console.assert(ed.fragment(document).nodeName === '#document-fragment', 'easy-dom.fragment'); +console.assert(ed.text(document, 'hello').textContent === 'hello', 'easy-dom.text'); + +//const utils = require('../../cjs/shared/utils'); + +delete global.Event; +delete global.Map; +delete global.WeakMap; +delete global.WeakSet; +delete String.prototype.trim; +const isArray = Array.isArray; + +let i = 0; +Object.defineProperty(Array, 'isArray', { + configurable: true, + get() { return i++ ? isArray : null; } +}); +const pf = require('../../cjs/shared/poorlyfills.js'); + +console.assert(pf.isArray([]) && !pf.isArray({}), 'poorlyfilled isArray'); + +i = 0; +document.addEventListener('test', () => i++, {once: true}); +document.dispatchEvent(new pf.Event('test')); +console.assert(i === 1, 'poorlyfilled Event'); + +let m = new pf.Map; +console.assert(m.get(pf) == null, 'poorlyfilled Map.get'); +console.assert(!m.set(pf, 1), 'poorlyfilled Map.set'); +console.assert(m.get(pf) === 1, 'poorlyfilled Map.get(1)'); + +let wm = new pf.WeakMap; +console.assert(wm.has(pf) == false, 'poorlyfilled WeakMap.has'); +console.assert(wm.get(pf) == null, 'poorlyfilled WeakMap.get'); +console.assert(!wm.set(pf, 1), 'poorlyfilled WeakMap.set'); +console.assert(wm.has(pf) == true, 'poorlyfilled WeakMap.has(1)'); +console.assert(wm.get(pf) === 1, 'poorlyfilled WeakMap.get(1)'); +console.assert(!wm.delete(pf), 'poorlyfilled WeakMap.delete(1)'); + +let ws = new pf.WeakSet; +console.assert(ws.has(pf) === false, 'poorlyfilled WeakSet.has'); +console.assert(!ws.add(pf), 'poorlyfilled WeakSet.add(1)'); +console.assert(ws.has(pf) === true, 'poorlyfilled WeakSet.has(1)'); + +console.assert(pf.trim.call(' test ') === 'test', 'poorlyfilled trim'); \ No newline at end of file diff --git a/test/svgclass.html b/test/svgclass.html new file mode 100644 index 00000000..6992f5fe --- /dev/null +++ b/test/svgclass.html @@ -0,0 +1,26 @@ + + + + + + + Document + + + + + + \ No newline at end of file diff --git a/test/tabindex.html b/test/tabindex.html new file mode 100644 index 00000000..75354ee4 --- /dev/null +++ b/test/tabindex.html @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test/table.html b/test/table.html new file mode 100644 index 00000000..62686acb --- /dev/null +++ b/test/table.html @@ -0,0 +1,241 @@ + + + + + + + hyperHTML table + + + +
    ${db.dbname} - ${db.lastSample.nbQueries} - ${query.formatElapsed} @@ -54,6 +58,15 @@ updateTable(ENV.generateData().toArray()); + if (!window.perfMonitor) { + perfMonitor = { + endProfile: function () {}, + initProfiler: function () {}, + startFPSMonitor: function () {}, + startMemMonitor: function () {}, + startProfile: function () {} + }; + } perfMonitor.startFPSMonitor(); perfMonitor.startMemMonitor(); // perfMonitor.initProfiler('data update'); diff --git a/test/diff.html b/test/diff.html new file mode 100644 index 00000000..f1956f3d --- /dev/null +++ b/test/diff.html @@ -0,0 +1,95 @@ + + +
    +
    + + + + \ No newline at end of file diff --git a/test/dom-splicer.js b/test/dom-splicer.js new file mode 100644 index 00000000..a258449e --- /dev/null +++ b/test/dom-splicer.js @@ -0,0 +1,90 @@ +var splicer = new DOMSplicer({ + target: document.documentElement +}); + +var a = document.createTextNode('a'); +var b = document.createTextNode('b'); +var c = document.createTextNode('c'); +var d = document.createTextNode('d'); +var e = document.createTextNode('e'); +var f = document.createTextNode('f'); +var g = document.createTextNode('g'); +var h = document.createTextNode('h'); +var i = document.createTextNode('i'); + +console.time(); +splicer.splice(0, 0, a, b, c, d, e); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(2, 1, g); +console.timeEnd(); +verify(splicer); + +splicer = new DOMSplicer({ + target: document.createElement('div'), + childNodes: [] +}); + +console.time(); +splicer.splice(0, 0, a, b, c, d, e); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(2, 1, g); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(1, 1); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(10); +console.timeEnd(); +verify(splicer); + +console.time(); +splicer.splice(-1); +console.timeEnd(); +verify(splicer); + +const fragment = document.createDocumentFragment(); +fragment.appendChild(document.createComment('placeholder')); +splicer = new DOMSplicer({ + before: fragment.childNodes[0] +}); +splicer.splice(0, 0, a, b, c, d, e); + +splicer = new DOMSplicer({ + target: fragment, + childNodes: {length: 0} +}); +splicer.splice(0, 100); + +function verify(splicer) { + console.assert( + [].slice.call(splicer.childNodes).every( + function (node, i) { + return splicer.target.childNodes[i] === node; + } + ), + 'splicer.childNodes same as splicer.target.childNodes' + ); + console.assert( + [].slice.call(splicer.target.childNodes).every( + function (node, i) { + return splicer.childNodes[i] === node; + } + ), + 'splicer.target.childNodes same as splicer.childNodes' + ); +} \ No newline at end of file diff --git a/test/domdiff.js b/test/domdiff.js new file mode 100644 index 00000000..975142fa --- /dev/null +++ b/test/domdiff.js @@ -0,0 +1,1218 @@ +var domdiff = hyperHTML.diff; + +var assert = tressa.assert; +var clean = function () { + for (var cn = document.body.childNodes, i = cn.length; i--;) { + document.body.removeChild(cn[i]); + } +}; +var compare = function (state, value) { + assert( + state.length === value.length && + value.split('').every(function (v, i) { + return state[i] === nodes[v]; + }), + value || '[empy]' + ); +}; + +var notNull = function (any) { return any != null; }; + +tressa.title('domdiff'); + +assert(typeof domdiff === 'function', 'is a function'); + +var nodes = { + 'a': document.createTextNode('a'), + 'b': document.createTextNode('b'), + 'c': document.createTextNode('c'), + 'd': document.createTextNode('d'), + 'e': document.createTextNode('e'), + 'f': document.createTextNode('f'), + 'g': document.createTextNode('g'), + 'h': document.createTextNode('h'), + 'i': document.createTextNode('i'), + 'j': document.createTextNode('j'), + 'k': document.createTextNode('k') +}; + +clean(); + +var options = {before: document.createTextNode('-')}; +var futureState = domdiff( + document.body, + [], + [nodes.b, nodes.c, nodes.d] +); +compare(futureState, 'bcd'); + +// same list, no changes +futureState = domdiff( + document.body, + futureState, + [nodes.b, nodes.c, nodes.d] +); +compare(futureState, 'bcd'); + +// more on the left +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d] +); +compare(futureState, 'abcd'); + +// more on the right +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f] +); +compare(futureState, 'abcdef'); + +// more in the middle +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e, nodes.f] +); +compare(futureState, 'abcghidef'); + +// drop from right +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e] +); +compare(futureState, 'abcghide'); + +// drop from left +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e] +); +compare(futureState, 'cghide'); + +// drop in between +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.g, nodes.d, nodes.e] +); +compare(futureState, 'cgde'); + +// drop all nodes +futureState = domdiff( + document.body, + futureState, + [] +); +compare(futureState, ''); + +domdiff( + document.body, + futureState, + [options.before] +); + +futureState = domdiff( + document.body, + futureState, + [nodes.b, nodes.c, nodes.d], + options +); +compare(futureState, 'bcd'); + +// same list, no changes with before +futureState = domdiff( + document.body, + futureState, + [nodes.b, nodes.c, nodes.d], + options +); +compare(futureState, 'bcd'); + +// more on the left with before +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d], + options +); +compare(futureState, 'abcd'); + +// more on the right with before +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abcdef'); + +// more in the middle with before +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abcghidef'); + +// drop from right with before +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e], + options +); +compare(futureState, 'abcghide'); + +// drop from left with before +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.g, nodes.h, nodes.i, nodes.d, nodes.e], + options +); +compare(futureState, 'cghide'); + +// drop in between with before +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.g, nodes.d, nodes.e], + options +); +compare(futureState, 'cgde'); + + +// drop one in between with before +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.g, nodes.e], + options +); +compare(futureState, 'cge'); + +// drop all nodes with before +futureState = domdiff( + document.body, + futureState, + [], + options +); +compare(futureState, ''); + +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abcdef'); + +// partial substitution one to many +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.g, nodes.i, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abgidef'); + +// partial substitution many to o e +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abcdef'); + +// inner diff +futureState = domdiff( + document.body, + futureState, + [nodes.j, nodes.g, nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f, nodes.h, nodes.i], + options +); +compare(futureState, 'jgabcdefhi'); + +// outer diff +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + options +); +compare(futureState, 'abcdef'); + +// fuzzy diff +futureState = domdiff( + document.body, + futureState, + [nodes.a, nodes.g, nodes.c, nodes.d, nodes.h, nodes.i], + options +); +compare(futureState, 'agcdhi'); + +// fuzzy diff +futureState = domdiff( + document.body, + futureState, + [nodes.i, nodes.g, nodes.a, nodes.d, nodes.h, nodes.c], + options +); +compare(futureState, 'igadhc'); + +// reversed diff +futureState = domdiff( + document.body, + futureState, + [nodes.c, nodes.h, nodes.d, nodes.a, nodes.g, nodes.i], + options +); +compare(futureState, 'chdagi'); + +clean(); + +var newState = domdiff( + document.body, + [], + [nodes.d, nodes.f, nodes.g] +); +compare(newState, 'dfg'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c].concat(newState) +); +compare(newState, 'abcdfg'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.b, nodes.c, + nodes.d, nodes.e, nodes.f, + nodes.g + ] +); +compare(newState, 'abcdefg'); + +newState = domdiff( + document.body, + newState, + newState.slice().reverse() +); +compare(newState, 'gfedcba'); + +newState = domdiff( + document.body, + newState, + [ + nodes.f, nodes.d, nodes.b, + nodes.a, nodes.e, nodes.g + ] +); +compare(newState, 'fdbaeg'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.b, nodes.c, + nodes.d, nodes.e, nodes.f + ] +); +compare(newState, 'abcdef'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.b, nodes.c, + nodes.d, nodes.e, nodes.f, + nodes.h, nodes.i, nodes.j + ] +); +compare(newState, 'abcdefhij'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.b, nodes.c, + nodes.d, nodes.e, nodes.f, + nodes.g, nodes.h, nodes.i, + nodes.j, nodes.k + ], + {node: Object, compare: (a, b) => a === b} +); +compare(newState, 'abcdefghijk'); + +newState = domdiff( + document.body, + newState, + [ + nodes.g, nodes.h, nodes.i + ], + {node: Object} +); +compare(newState, 'ghi'); + +document.body.insertBefore(nodes.f, nodes.g); +if ('onclick' in document.body) { + console.log('browser only'); + compare([].slice.call(document.body.childNodes), 'fghi'); +} + +clean(); +document.body.insertBefore(nodes.k, null); +newState = domdiff( + document.body, + [], + [ + nodes.c, nodes.d, nodes.e + ], + {before: nodes.k} +); +compare(newState, 'cde'); + +/* +newState = domdiff( + document.body, + newState, + [ + null, nodes.c, nodes.d, nodes.e, null + ], + {before: nodes.k} +); +compare(newState.filter(notNull), 'cde'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.c, null, nodes.e, nodes.f + ], + {before: nodes.k} +); +compare(newState.filter(notNull), 'acef'); +*/ + +newState = domdiff( + document.body, + newState, + [ + nodes.c, nodes.d, nodes.e, + nodes.g, nodes.h, nodes.i + ], + {before: nodes.k} +); +compare(newState, 'cdeghi'); + +newState = domdiff( + document.body, + newState, + [ + nodes.a, nodes.b, nodes.c, + nodes.d, nodes.e, nodes.f, + nodes.g, nodes.h, nodes.i + ], + {before: nodes.k} +); +compare(newState, 'abcdefghi'); + +newState = domdiff( + document.body, + newState, + [ + nodes.b, nodes.a, nodes.c, + nodes.d, nodes.e, nodes.f, + nodes.g, nodes.i, nodes.h + ], + {before: nodes.k} +); +compare(newState, 'bacdefgih'); + +newState = domdiff( + document.body, + newState, + [], + {before: nodes.k} +); +compare(newState, ''); + +// https://github.com/snabbdom/snabbdom/blob/master/test/core.js +tressa.log('## snabbdom - updating children'); +newState = domdiff( + document.body, + newState, + [nodes.a], + {before: nodes.k} +); +compare(newState, 'a'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'de'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.d], + {before: nodes.k} +); +compare(newState, 'bcd'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [], + {before: nodes.k} +); +compare(newState, ''); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, document.createTextNode('b'), nodes.c], + {before: nodes.k} +); +assert( + newState[1] !== nodes.b && + newState.length === 3 && + newState[0] === nodes.a && + newState[2] === nodes.c, + 'replace one child' +); + +tressa.log('## snabbdom - removal of elements'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'cde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abde'); + +tressa.log('## snabbdom - element reordering'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d], + {before: nodes.k} +); +compare(newState, 'abcd'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.a, nodes.d], + {before: nodes.k} +); +compare(newState, 'bcad'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.a, nodes.d], + {before: nodes.k} +); +compare(newState, 'bcad'); + +newState = domdiff( + document.body, + newState, + [nodes.c, nodes.b, nodes.d], + {before: nodes.k} +); +compare(newState, 'cbd'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.a], + {before: nodes.k} +); +compare(newState, 'bca'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d], + {before: nodes.k} +); +compare(newState, 'abcd'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'adbc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'adbc'); + +tressa.log('## snabbdom - combination'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.a, nodes.b, nodes.c, nodes.f], + {before: nodes.k} +); +compare(newState, 'dabcf'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'ade'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.f], + {before: nodes.k} +); +compare(newState, 'df'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.d, nodes.e], + {before: nodes.k} +); +compare(newState, 'bde'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.e, nodes.c], + {before: nodes.k} +); +compare(newState, 'dec'); + +newState = domdiff( + document.body, + newState, + [nodes.j, nodes.a, nodes.b, nodes.c], + {before: nodes.k} +); +compare(newState, 'jabc'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.a, nodes.b, nodes.c, nodes.j, nodes.e], + {before: nodes.k} +); +compare(newState, 'dabcje'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f, nodes.g, nodes.h], + {before: nodes.k} +); +compare(newState, 'abcdefgh'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f, nodes.g, nodes.h].reverse(), + {before: nodes.k} +); +compare(newState, 'hgfedcba'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + {before: nodes.k} +); +compare(newState, 'abcdef'); + +newState = domdiff( + document.body, + newState, + [nodes.e, nodes.d, nodes.c, nodes.b, nodes.f, nodes.a], + {before: nodes.k} +); +compare(newState, 'edcbfa'); + +tressa.log('## snabbdom - random values'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + {before: nodes.k} +); +compare(newState, 'abcdef'); + +/* +newState = domdiff( + document.body, + newState, + [null, nodes.c, undefined, null, nodes.b, nodes.a, null, nodes.f, nodes.e, null, nodes.d, undefined], + {before: nodes.k} +); +compare(newState.filter(notNull), 'cbafed'); +*/ + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f], + {before: nodes.k} +); +compare(newState, 'abcdef'); + +/* +newState = domdiff( + document.body, + newState, + [null, null, undefined, null, null, undefined], + {before: nodes.k} +); +compare(newState.filter(notNull), ''); +*/ + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f].reverse(), + {before: nodes.k} +); +compare(newState, 'fedcba'); + +clean(); +tressa.log('## snabbdom - updating children (unpinned)'); +newState = domdiff( + document.body, + [], + [nodes.a] +); +compare(newState, 'a'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c] +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.e] +); +compare(newState, 'de'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.d, nodes.e] +); +compare(newState, 'abde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.d] +); +compare(newState, 'bcd'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [] +); +compare(newState, ''); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c] +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, document.createTextNode('b'), nodes.c] +); +assert( + newState[1] !== nodes.b && + newState.length === 3 && + newState[0] === nodes.a && + newState[2] === nodes.c, + 'replace one child' +); + +tressa.log('## snabbdom - removal of elements (unpinned)'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.c, nodes.d, nodes.e] +); +compare(newState, 'cde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c] +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.d, nodes.e] +); +compare(newState, 'abde'); + +tressa.log('## snabbdom - element reordering (unpinned)'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d] +); +compare(newState, 'abcd'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.a, nodes.d] +); +compare(newState, 'bcad'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c] +); +compare(newState, 'abc'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.a] +); +compare(newState, 'bca'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d] +); +compare(newState, 'abcd'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.b, nodes.c] +); +compare(newState, 'adbc'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.b, nodes.c] +); +compare(newState, 'adbc'); + +tressa.log('## snabbdom - combination (unpinned)'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e] +); +compare(newState, 'abcde'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.a, nodes.b, nodes.c, nodes.f] +); +compare(newState, 'dabcf'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.d, nodes.e] +); +compare(newState, 'ade'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.f] +); +compare(newState, 'df'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.d, nodes.e] +); +compare(newState, 'bde'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.e, nodes.c] +); +compare(newState, 'dec'); + +newState = domdiff( + document.body, + newState, + [nodes.j, nodes.a, nodes.b, nodes.c] +); +compare(newState, 'jabc'); + +newState = domdiff( + document.body, + newState, + [nodes.d, nodes.a, nodes.b, nodes.c, nodes.j, nodes.e] +); +compare(newState, 'dabcje'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f, nodes.g, nodes.h] +); +compare(newState, 'abcdefgh'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f, nodes.g, nodes.h].reverse() +); +compare(newState, 'hgfedcba'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f] +); +compare(newState, 'abcdef'); + +newState = domdiff( + document.body, + newState, + [nodes.e, nodes.d, nodes.c, nodes.b, nodes.f, nodes.a] +); +compare(newState, 'edcbfa'); + +tressa.log('## snabbdom - random values (unpinned)'); + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f] +); +compare(newState, 'abcdef'); + +/* +newState = domdiff( + document.body, + newState, + [null, nodes.c, undefined, null, nodes.b, nodes.a, null, nodes.f, nodes.e, null, nodes.d, undefined] +); +compare(newState.filter(notNull), 'cbafed'); +*/ + +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f] +); +compare(newState, 'abcdef'); + +/* +newState = domdiff( + document.body, + newState, + [null, null, undefined, null, null, undefined] +); +compare(newState.filter(notNull), ''); +*/ + +console.time('average'); +newState = domdiff( + document.body, + newState, + [nodes.a, nodes.b, nodes.c, nodes.d, nodes.e, nodes.f].reverse() +); +compare(newState, 'fedcba'); +console.timeEnd('average'); + +newState = domdiff( + document.body, + newState, + [nodes.a] +); +compare(newState, 'a'); + +newState = domdiff( + document.body, + newState, + [nodes.b, nodes.c, nodes.d] +); +compare(newState, 'bcd'); + +newState = domdiff( + document.body, + newState, + [nodes.a] +); +compare(newState, 'a'); + +newState = domdiff( + document.body, + newState, + [] +); + +var data = [ + {"id": 4054, "title": "Serie 2"}, + {"id": 3982, "title": "Serie 3"}, + {"id": 4016, "title": "Gracias"}, + {"id":3984, "title": "Comparte"}, + {"id":3952, "title": "Lecciรณn 1"}, + {"id":3955, "title": "Lecciรณn 2"} +]; + +var wm = {}; + +var getItem = function (item) { return wm[item.id]; }; + +data.forEach(function (item) { + wm[item.id] = document.createTextNode(item.id + ': ' + item.title); +}); + +newState = domdiff( + document.body, + newState, + data.slice().map(getItem) +); + +newState = domdiff( + document.body, + newState, + data.slice().sort(function (a, b) { + return a.title.localeCompare(b.title); + }).map(getItem) +); + +newState = domdiff( + document.body, + newState, + Array(1000).join('.').split('.').map(function (v, i) { + return document.createTextNode('' + i); + }) +); + +console.time('random'); +newState = domdiff( + document.body, + newState, + newState.slice().sort(function () { + return Math.random() < .5 ? 1 : -1; + }) +); +console.timeEnd('random'); + +console.time('reversed'); +newState = domdiff( + document.body, + newState, + newState.slice().reverse() +); +console.timeEnd('reversed'); + +// */ + +tressa.end(); diff --git a/test/edge.html b/test/edge.html index a7681200..b2b36711 100644 --- a/test/edge.html +++ b/test/edge.html @@ -4,10 +4,10 @@ Edge test -
      NO
      + \ No newline at end of file diff --git a/test/esm.html b/test/esm.html index 9f06fba6..3f8c0543 100644 --- a/test/esm.html +++ b/test/esm.html @@ -1,6 +1,5 @@ - \ No newline at end of file diff --git a/test/fuzzysort.html b/test/fuzzysort.html new file mode 100644 index 00000000..ed4c2cb1 --- /dev/null +++ b/test/fuzzysort.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/haunted.html b/test/haunted.html new file mode 100644 index 00000000..188be5be --- /dev/null +++ b/test/haunted.html @@ -0,0 +1,27 @@ + + + + + + + hyperHTML & haunted + + + + + + \ No newline at end of file diff --git a/test/ie/index.html b/test/ie/index.html index ea692584..ee2f0823 100644 --- a/test/ie/index.html +++ b/test/ie/index.html @@ -10,13 +10,16 @@ + - +

      results in console

      diff --git a/test/ie/test/test.js b/test/ie/test/test.js index 2acd422f..0b3662a0 100644 --- a/test/ie/test/test.js +++ b/test/ie/test/test.js @@ -1,1039 +1,3051 @@ -'use strict'; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _templateObject = _taggedTemplateLiteral(['\n

      \n Time: ', '\n

      \n '], ['\n

      \n Time: ', '\n

      \n ']), - _templateObject2 = _taggedTemplateLiteral(['

      ', ' world

      '], ['

      ', ' world

      ']), - _templateObject3 = _taggedTemplateLiteral(['

      ', '

      '], ['

      ', '

      ']), - _templateObject4 = _taggedTemplateLiteral(['click'], ['click']), - _templateObject5 = _taggedTemplateLiteral(['how cool'], ['how cool']), - _templateObject6 = _taggedTemplateLiteral(['\n

      1

      \n '], ['\n

      1

      \n ']), - _templateObject7 = _taggedTemplateLiteral(['\n 0\n

      1

      \n '], ['\n 0\n

      1

      \n ']), - _templateObject8 = _taggedTemplateLiteral(['', ''], ['', '']), - _templateObject9 = _taggedTemplateLiteral(['a'], ['a']), - _templateObject10 = _taggedTemplateLiteral(['b'], ['b']), - _templateObject11 = _taggedTemplateLiteral(['\n O'], ['\n O']), - _templateObject12 = _taggedTemplateLiteral(['\n
      \n
        ', '
      \n
      '], ['\n
      \n
        ', '
      \n
      ']), - _templateObject13 = _taggedTemplateLiteral(['\n
    • ', '
    • \n '], ['\n
    • ', '
    • \n ']), - _templateObject14 = _taggedTemplateLiteral(['
      ', '
      '], ['
      ', '
      ']), - _templateObject15 = _taggedTemplateLiteral([''], ['']), - _templateObject16 = _taggedTemplateLiteral(['

      '], ['

      ']), - _templateObject17 = _taggedTemplateLiteral(['\n \n

      ', '

      \n
      \n ', '\n
        \n ', '\n
      \n ', '\n
      \n
      \n '], ['\n \n

      ', '

      \n
      \n ', '\n
        \n ', '\n
      \n ', '\n
      \n
      \n ']), - _templateObject18 = _taggedTemplateLiteral(['
      ', '
      '], ['
      ', '
      ']), - _templateObject19 = _taggedTemplateLiteral(['
      ', ''], ['
      ', '']), - _templateObject20 = _taggedTemplateLiteral(['', '
      '], ['', '
      ']), - _templateObject21 = _taggedTemplateLiteral(['
      ', '
      '], ['
      ', '
      ']), - _templateObject22 = _taggedTemplateLiteral(['
        ', '
      '], ['
        ', '
      ']), - _templateObject23 = _taggedTemplateLiteral(['\n
    • ', '
    • \n '], ['\n
    • ', '
    • \n ']), - _templateObject24 = _taggedTemplateLiteral(['

      ', '
      '], ['

      ', '
      ']), - _templateObject25 = _taggedTemplateLiteral([' ', ' '], [' ', ' ']), - _templateObject26 = _taggedTemplateLiteral(['', ''], ['', '']), - _templateObject27 = _taggedTemplateLiteral(['\n \n '], ['\n \n ']), - _templateObject28 = _taggedTemplateLiteral(['

      ', '

      ', '
      ', '
      ', ''], ['

      ', '

      ', '
      ', '
      ', '']), - _templateObject29 = _taggedTemplateLiteral([''], ['']), - _templateObject30 = _taggedTemplateLiteral(['', '
      '], ['', '
      ']), - _templateObject31 = _taggedTemplateLiteral([''], ['']), - _templateObject32 = _taggedTemplateLiteral(['a=', ''], ['a=', '']), - _templateObject33 = _taggedTemplateLiteral(['[', ']'], ['[', ']']), - _templateObject34 = _taggedTemplateLiteral(['

      '], ['

      ']), - _templateObject35 = _taggedTemplateLiteral(['
      ', '
      '], ['
      ', '
      ']), - _templateObject36 = _taggedTemplateLiteral([''], ['']), - _templateObject37 = _taggedTemplateLiteral([''], ['']), - _templateObject38 = _taggedTemplateLiteral([''], ['']), - _templateObject39 = _taggedTemplateLiteral(['
      ok
      ok
      ok
      + + + \ No newline at end of file diff --git a/test/test.js b/test/test.js index 99191cb1..cda6bbb8 100644 --- a/test/test.js +++ b/test/test.js @@ -1,19 +1,8 @@ -var SKIP_ADOPT = typeof location !== typeof SKIP_ADOPT && -1 < location.search.indexOf('noadopt'); - tressa.title('HyperHTML'); tressa.assert(typeof hyperHTML === 'function', 'hyperHTML is a function'); try { tressa.log(''); } catch(e) { tressa.log = console.log.bind(console); } -/* -tressa.async(function (done) { - var wrap = document.createElement('p'); - hyperHTML.bind(wrap)`${1}`; - hyperHTML.bind(wrap)`${2}`; - tressa.assert(wrap.textContent == 2); - done(); -}) -*/ tressa.async(function (done) { tressa.log('## injecting text and attributes'); var i = 0; @@ -145,8 +134,31 @@ tressa.async(function (done) { }); }) .then(function () { - tressa.log('## hyperHTML.escape(html)'); - tressa.assert(hyperHTML.escape('') === '<html>', 'escape as expected'); + tressa.log('## multi wire removal'); + var render = hyperHTML.wire(); + var update = function () { + return render` +

      1

      +

      2

      + `; + }; + update().remove(); + update = function () { + return render` +

      1

      +

      2

      +

      3

      + `; + }; + update().remove(); + tressa.assert(true, 'OK'); +}) +.then(function () { + tressa.log('## the attribute id'); + var div = document.createElement('div'); + hyperHTML.bind(div)`

      OK

      `; + tressa.assert(div.firstChild.id === 'id', 'the id is preserved'); + tressa.assert(div.firstChild.className === 'class', 'the class is preserved'); }) .then(function () { return tressa.async(function (done) { @@ -159,7 +171,7 @@ tressa.async(function (done) { `; }; var node = update(); - tressa.assert(node.nodeName === 'P', 'correct node'); + tressa.assert(node.nodeName.toLowerCase() === 'p', 'correct node'); var same = update(); tressa.assert(node === same, 'same node returned'); @@ -170,15 +182,16 @@ tressa.async(function (done) {

      1

      `; }; - node = update(); + node = update().childNodes; tressa.assert(Array.isArray(node), 'list of nodes'); - same = update(); + same = update().childNodes; tressa.assert( node.length === same.length && node[0] && node.every(function (n, i) { return same[i] === n; }), 'same list returned' ); + var div = document.createElement('div'); render = hyperHTML.bind(div); render`${node}`; @@ -189,19 +202,14 @@ tressa.async(function (done) { 'same list applied' ); - render = hyperHTML.wire(); - if ( - (function(s){ return s; })`a` === - (function(s){ return s; })`a` - ) { - tressa.assert( - render`a` === render`a` && - render`a` !== render`b`, - 'template sensible wire' - ); - } else { - tressa.log('โš ๏ธ this *browser* is *not spec compliant*'); + function returnSame() { + return render`a`; } + render = hyperHTML.wire(); + tressa.assert( + returnSame() === returnSame(), + 'template sensible wire' + ); done(); }); @@ -218,6 +226,7 @@ tressa.async(function (done) { top: ${point.y}px; `}">O`; } + try { update(); } catch(e) { console.error(e) } tressa.assert(update() === update(), 'same output'); tressa.assert(hyperHTML.wire(point) === hyperHTML.wire(point), 'same wire'); done(); @@ -264,7 +273,7 @@ tressa.async(function (done) {
        ${ items.map(function (item, i) { return hyperHTML.wire((listItems[i] || (listItems[i] = {})))` -
      • ${item.text}
      • +
      • ${() => item.text}
      • `; }) }
      @@ -321,161 +330,17 @@ tressa.async(function (done) { tressa.log('## wire by id'); let ref = {}; let wires = { - a: hyperHTML.wire(ref, ':a')`
      `, - p: hyperHTML.wire(ref, ':p')`

      ` - }; - tressa.assert(wires.a.nodeName.toLowerCase() === 'a', ' is correct'); - tressa.assert(wires.p.nodeName.toLowerCase() === 'p', '

      is correct'); - tressa.assert(hyperHTML.wire(ref, ':a')`` === wires.a, 'same wire for '); - tressa.assert(hyperHTML.wire(ref, ':p')`

      ` === wires.p, 'same wire for

      '); -}) -.then(function () { - if (SKIP_ADOPT) return; - tressa.log('## hyperHTML.adopt(node)'); - let wrap = document.createElement('div'); - wrap.innerHTML = '

      before
      • lonely
      NO
      '; - let div = wrap.lastElementChild; - let text = div.firstChild; - let ul = div.firstElementChild; - let hr = div.lastElementChild; - let model = { - click: function () {}, - css: '* { color: blue; }', - test: 'after', - text: 'after', - list: [ - {name: 'first'}, - {name: 'second'} - ], - inBetween: 'OK' + a: function () { + return hyperHTML.wire(ref, ':a')`
      `; + }, + p: function () { + return hyperHTML.wire(ref, ':p')`

      `; + } }; - - let render = hyperHTML.adopt(wrap); - update(render, model); - tressa.assert(wrap.lastElementChild === div, 'structure has not changed'); - tressa.assert(div.firstElementChild === ul, 'not even the list'); - tressa.assert(div.lastElementChild === hr, 'or the hr'); - model.list.push({name: 'third'}); - model.inBetween = document.createElement('br'); - update(render, model); - tressa.assert(wrap.lastElementChild === div, 'not even after model changes'); - tressa.assert(div.firstElementChild === ul, 'including the list'); - tressa.assert(div.lastElementChild === hr, 'and the hr'); - - function update(render, model) { - render` - -

      ${Math.random()}

      -
      - ${model.text} -
        - ${model.list.map(item => `
      • ${item.name}
      • `)} -
      - ${model.inBetween} -
      -
      - `; - } -}) -.then(function () { - if (SKIP_ADOPT) return; - tressa.log('## weird .adopt(node) cases'); - let wrap = document.createElement('div'); - wrap.innerHTML = '
      text
      '; - hyperHTML.adopt(wrap)`
      ${' right'}
      `; - tressa.assert(/
      right<\/div>/.test(wrap.innerHTML), 'right text OK'); - wrap.innerHTML = '
      text
      '; - hyperHTML.adopt(wrap)`
      ${'left '}
      `; - tressa.assert(/
      left <\/div>/.test(wrap.innerHTML), 'left text OK'); - wrap.innerHTML = ''; - hyperHTML.adopt(wrap)`${'any'}`; - tressa.assert(/any/.test(wrap.innerHTML), '`${\'virtual\'}` is like `${\'any\'}`'); - wrap.innerHTML = '
      '; - hyperHTML.adopt(wrap)`
      ${'virtual'}`; - if (SKIP_ADOPT) return; - tressa.assert(/^
      virtual$/.test(wrap.innerHTML), '`
      ${\'virtual\'}`'); - wrap.innerHTML = '
      '; - hyperHTML.adopt(wrap)`${'virtual'}
      `; - tressa.assert(/^virtual
      $/.test(wrap.innerHTML), '${\'virtual\'}
      `'); - wrap.innerHTML = '
      before
      '; - hyperHTML.adopt(wrap)`
      ${['after']}
      `; - tressa.assert(/^
      after<\/strong>
      $/.test(wrap.innerHTML), '
      ${\'after\'}
      '); -}) -.then(function () { - if (SKIP_ADOPT) return; - tressa.log('## hyperHTML.wire(node, "adopt")'); - let wrap = document.createElement('div'); - wrap.innerHTML = '
      • before
      '; - let items = [{text: 'first'}]; - let li = wrap.querySelector('li'); - let result = hyperHTML.adopt(wrap)`
        ${ - items.map(item => hyperHTML.wire(item, 'adopt')` -
      • ${item.text}
      • - `) - }
      `; - let list = wrap.querySelectorAll('li'); - tressa.assert( - list.length === 1 && - list[0] === li && - /