From 5e53b4280f1454514d9ddda804ddb39daa53bbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 17 Mar 2020 03:29:30 +0900 Subject: [PATCH 01/43] Add DOMPurify for sanitizing HTML/SVG. --- README.md | 1 + package-lock.json | 5 +++++ package.json | 1 + 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index db22e7b2..db335cb4 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,7 @@ License - [JSZip](http://stuk.github.io/jszip) ... Copyright © Stuart Knightley (Dual licensed under [the MIT License or the GPLv3](https://github.com/Stuk/jszip/blob/HEAD/LICENSE.markdown).) - [JSZipUtils](http://stuk.github.io/jszip-utils) ... Copyright © Stuart Knightley (Dual licensed under [the the MIT License or the GPLv3](https://github.com/Stuk/jszip-utils/blob/master/LICENSE.markdown).) - [JS-YAML](http://nodeca.github.io/js-yaml/) ... Copyright © Vitaly Puzrin (Licensed under [the MIT License](https://github.com/nodeca/js-yaml/blob/master/LICENSE).) + - [DOMPurify](https://github.com/cure53/DOMPurify) ... Copyright © Mario Heiderich (Dual licensed under [the Apache License Version 2.0 or the Mozilla Public License Version 2.0](https://github.com/cure53/DOMPurify/blob/master/LICENSE).) * Polyfills: - [classlist-polyfill](https://github.com/yola/classlist-polyfill) ... by Yola Inc. (Released into the public domain under [the Unlicense](https://github.com/yola/classlist-polyfill/blob/master/LICENSE)) - [text-encoding-utf-8](https://github.com/arv/text-encoding-utf-8) ... by Erik Arvidsson (Released into the public domain under [the Unlicense](https://github.com/arv/text-encoding-utf-8/blob/master/LICENSE.md).) diff --git a/package-lock.json b/package-lock.json index 26081424..b05fd20e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3241,6 +3241,11 @@ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", "dev": true }, + "dompurify": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz", + "integrity": "sha512-vIOSyOXkMx81ghEalh4MLBtDHMx1bhKlaqHDMqM2yeitJ996SLOk5mGdDpI9ifJAgokred8Rmu219fX4OltqXw==" + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", diff --git a/package.json b/package.json index a2418a93..d7a91cac 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "classlist-polyfill": "^1.2.0", "current-script-polyfill": "^1.0.0", "custom-event-polyfill": "^1.0.7", + "dompurify": "^2.0.8", "easing-js": "^1.1.2", "intersection-observer": "^0.7.0", "js-yaml": "^3.13.1", From 203e20f20e035fcbb21eb1cfccfa7f2faf543f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 17 Mar 2020 04:31:37 +0900 Subject: [PATCH 02/43] Add "Sanitizer" extension. --- __src/bibi/extensions/sanitizer.js | 48 ++++++++++++++++++++++++++++++ bibi.info.js | 7 +++++ webpack.config.js | 1 + 3 files changed, 56 insertions(+) create mode 100644 __src/bibi/extensions/sanitizer.js diff --git a/__src/bibi/extensions/sanitizer.js b/__src/bibi/extensions/sanitizer.js new file mode 100644 index 00000000..21681e33 --- /dev/null +++ b/__src/bibi/extensions/sanitizer.js @@ -0,0 +1,48 @@ +import DOMPurify from 'dompurify/dist/purify.min.js'; + +Bibi.x({ + + id: 'Sanitizer', + description: 'Content Sanitizer.', + author: 'Satoru Matsushima (@satorumurmur)', + version: '1.0.0' + +})(function() { + + O.sanitizeItemContent = (Item, Opt) => { + if(Item && typeof Item.Content == 'string' && Opt && typeof Opt.As == 'string') { + const Settings = O.sanitizeItemContent.Settings[Opt.As]; + if(Settings) { + (pp => pp ? pp(Item) : true)(Settings.preprocess); + Item.Content = DOMPurify.sanitize(Item.Content, Settings.Options); + (pp => pp ? pp(Item) : true)(Settings.postprocess); + return Item.Content; + } + } + const ErrorMessage = `Sanitizer: Invalid Arguments.`; + I.note(ErrorMessage, 99999999999, 'ERROR'); + O.error(ErrorMessage); + throw new Error(ErrorMessage); + }; + + O.sanitizeItemContent.Settings = { + 'HTML': { + Options: { WHOLE_DOCUMENT: true, ADD_TAGS: ['link'] }, + preprocess: (Item) => { + const ContentHTMLAttributes = (Matched => Matched ? Matched[1] : '')(Item.Content.match(/]+)>/)); + if(!ContentHTMLAttributes) return; + Item.HasContentHTMLAttributes = true; + Item.Content += `bibi:html-attributes`; + }, + postprocess: (Item) => { + if(!Item.HasContentHTMLAttributes) return; + delete Item.HasContentHTMLAttributes; + const HolderRE = /]+)>bibi:html-attributes<\/div>/; + const ContentHTMLAttributes = (Matched => Matched ? Matched[1] : '')(Item.Content.match(HolderRE)); + if(ContentHTMLAttributes) Item.Content = Item.Content.replace(HolderRE, '').replace('', ''); + } + }, + 'SVG' : {} + }; + +}); diff --git a/bibi.info.js b/bibi.info.js index 17df0df9..64419a77 100644 --- a/bibi.info.js +++ b/bibi.info.js @@ -124,6 +124,13 @@ Bibi.Banners = { // ----------------------------------------------------------------------------------------------------------------------------- +'/extensions/sanitizer.js': _banner('Bibi Extension: Sanitizer', 'default', ` + * * Including: + * - DOMPurify ... Copyright (c) Mario Heiderich - https://github.com/cure53/DOMPurify (Dual licensed under the Apache License Version 2.0 or the Mozilla Public License Version 2.0.) +`, true), + +// ----------------------------------------------------------------------------------------------------------------------------- + '/extensions/unaccessibilizer.js': _banner(`# Bibi Extension: Unaccessibilizer ("What a...")`, ` * * Reluctantly coded by ${ Bibi.author.name } - ${ Bibi.homepage } * * Released into the public domain under the Unlicense. - http://unlicense.org/UNLICENSE diff --git a/webpack.config.js b/webpack.config.js index 8668b68f..913e9595 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -46,6 +46,7 @@ const Config = { 'bibi/extensions/epubcfi.js', 'bibi/extensions/extractor/at-once.js', 'bibi/extensions/extractor/on-the-fly.js', + 'bibi/extensions/sanitizer.js', 'bibi/extensions/unaccessibilizer.js', 'bibi/extensions/zine.js', 'bibi/resources/scripts/bibi.js', From 52ceea2187516c359dc99642a66ddb2efb17abe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 17 Mar 2020 04:39:24 +0900 Subject: [PATCH 03/43] Add "allow-scripts-in-content" option. --- __src/bibi/presets/default.js | 20 +++++++++++++++++++- __src/bibi/resources/scripts/bibi.heart.js | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/__src/bibi/presets/default.js b/__src/bibi/presets/default.js index 8067569d..65c63296 100644 --- a/__src/bibi/presets/default.js +++ b/__src/bibi/presets/default.js @@ -115,7 +115,25 @@ Bibi.preset({ "prioritise-fallbacks" : false, // true or false (If true, Bibi uses at the end of the fallback-chain. -"trustworthy-origins" : [], + +//============================================================================================================================================== +//-- DANGER ZONE +//---------------------------------------------------------------------------------------------------------------------------------------------- +// If you publish Bibi online, +// * keep these options as default, or/and +// * keep your Bibi and website not to open files which you can not guarantee its security. +//---------------------------------------------------------------------------------------------------------------------------------------------- + +/* !!!! BE CAREFUL !!!! */ "allow-scripts-in-content" : false, // true or false (false is recommended). +// If you change its value `true`, Bibi does not remove scripts natively-included in EPUB. +// It makes Bibi to be able to open EPUBs including useful scripts. +// But on the other hand, it may also allow XSS of malicious EPUB in some cases. + +/* !!!! BE CAREFUL !!!! */ "trustworthy-origins" : [], // origins you trust other than where this Bibi is installed. (blank is recommended). +// If you add origins to it, Bibi is made to open not only EPUBs in the same origin as Bibi itself is installed but also EPUBs in remote origins. +// It is useful for some cases like that you want to set directory on the other storaging server as "bookshelf". +// But note that not to set an origin where someone else also can publish files. +// If you do so, someone else can publish one's EPUB as it is on your website, and it may also allow XSS of malicious EPUB in some cases. /* diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index bed08a5b..810e5d18 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -5532,6 +5532,7 @@ O.SettingTypes_PresetOnly = { 'boolean': [ 'accept-base64-encoded-data', 'accept-blob-converted-data', + 'allow-scripts-in-content', 'remove-bibi-website-link' ], 'yes-no': [ From bdaa57cd6aa2f002844a7d7c981b2f94d998d3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 17 Mar 2020 04:40:30 +0900 Subject: [PATCH 04/43] Load "Sanitizer" extension automaticaly if "allow-scripts-in-content" is not `true`. --- __src/bibi/resources/scripts/bibi.heart.js | 1 + 1 file changed, 1 insertion(+) diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index 810e5d18..7dc0b857 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -139,6 +139,7 @@ Bibi.initialize = () => { Bibi.loadExtensions = () => { return new Promise((resolve, reject) => { const AdditionalExtensions = []; + if(!S['allow-scripts-in-content']) AdditionalExtensions.push('sanitizer.js'); let ReadyForExtraction = false, ReadyForBibiZine = false; if(S['book']) { if(O.isToBeExtractedIfNecessary(S['book'])) ReadyForExtraction = true; From b9fbfd2924b69bbedb45558f718f353064b1ced4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 17 Mar 2020 04:45:43 +0900 Subject: [PATCH 05/43] Sanitize HTML/SVG if "allow-scripts-in-content" is not `true`. --- __src/bibi/resources/scripts/bibi.heart.js | 128 ++++++++++----------- 1 file changed, 61 insertions(+), 67 deletions(-) diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index 7dc0b857..5a8ccd99 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -902,7 +902,12 @@ L.coordinateLinkages = (BasePath, RootElement, InNav) => { const HrefHashInSource = HrefPathInSource.split('#')[1]; HrefPathInSource = (HrefHashInSource ? '#' + HrefHashInSource : R.Items[0].RefChain[0]) } else { - A.setAttribute('target', A.getAttribute('target') || '_blank'); + A.addEventListener('click', Eve => { + Eve.preventDefault(); + Eve.stopPropagation(); + window.open(A.href); + return false; + }); continue; } } @@ -1012,73 +1017,58 @@ L.loadItem = (Item, Opt = {}) => { // !!!! Don't Call Directly. Use L.loadSpread } ItemBox.classList.remove('loaded'); return new Promise((resolve, reject) => { - if(Item.BlobURL) { resolve({}); return; } - if(/\.(html?|xht(ml)?|xml)$/i.test(Item.Path)) { // (X)HTML - if(!B.ExtractionPolicy /*!!!!!!!!*/ && !sML.UA.Gecko /*!!!!!!!!*/ ) { // Extracted (exclude Gecko from here, because of such books as styled only with -webkit/epub- prefixed properties. It's NOT Gecko's fault.) - resolve({ - URL: O.fullPath(Item.Path) - }); return; - } - O.file(Item, { Preprocess: true }).then(Item => { // Archived (or Gecko. It's NOT Gecko's fault...) - resolve({ - HTML: Item.Content.replace(/^<\?.+?\?>/, '') - }) - }).catch(reject); return; - } - if(/\.(gif|jpe?g|png)$/i.test(Item.Path)) { // Bitmap-in-Spine - O.file(Item, { URI: true }).then(Item => { - resolve({ - Head: (Item.Ref['rendition:layout'] == 'pre-paginated' && B.ICBViewport) ? `` : '', - Body: `` // URI is BlobURL or URI - }) - }).catch(reject); return; - } - if(/\.(svg)$/i.test(Item.Path)) { // SVG-in-Spine - O.file(Item, { Preprocess: true }).then(Item => { - const StyleSheetRE = /<\?xml-stylesheet\s*(.+?)\s*\?>/g, MatchedStyleSheets = Item.Content.match(StyleSheetRE); - let StyleSheets = '', Content = Item.Content; - if(MatchedStyleSheets) StyleSheets = MatchedStyleSheets.map(SS => SS.replace(StyleSheetRE, ``)).join(''), Content = Content.replace(StyleSheetRE, ''); - resolve({ - Head: (!B.ExtractionPolicy ? `` : '') + StyleSheets, - Body: Content - }); - }).catch(reject); return; - } - resolve({}); + if(Item.BlobURL) { + resolve(); + } else if(/\.(html?|xht(ml)?|xml)$/i.test(Item.Path)) { // (X)HTML + O.file(Item, { + Preprocess: (B.ExtractionPolicy || sML.UA.Gecko), // Preprocess if archived (or Gecko. For such books as styled only with -webkit/epub- prefixed properties. It's NOT Gecko's fault but requires preprocessing.) + initialize: () => { + if(!S['allow-scripts-in-content']) O.sanitizeItemContent(Item, { As: 'HTML' }); + } + }).then(Item => resolve(Item.Content)); + } else if(/\.(gif|jpe?g|png)$/i.test(Item.Path)) { // Bitmap-in-Spine + O.file(Item, { + URI: true + }).then(Item => resolve([ + (Item.Ref['rendition:layout'] == 'pre-paginated' && B.ICBViewport) ? `` : '', + `` // URI is BlobURL or URI + ])); + } else if(/\.(svg)$/i.test(Item.Path)) { // SVG-in-Spine + O.file(Item, { + Preprocess: (B.ExtractionPolicy ? true : false), + initialize: () => { + const StyleSheetRE = /<\?xml-stylesheet\s*(.+?)\s*\?>/g, MatchedStyleSheets = Item.Content.match(StyleSheetRE); + if(!S['allow-scripts-in-content']) O.sanitizeItemContent(Item, { As: 'SVG' }); + Item.Content = (MatchedStyleSheets ? MatchedStyleSheets.map(SS => SS.replace(StyleSheetRE, ``)).join('') : '') + '' + Item.Content; // Join for preprocessing. + } + }).then(Item => resolve(Item.Content.split(''))); + } else reject(); + }).catch(() => { + Item.Skipped = true; + return {}; }).then(Source => new Promise(resolve => { const DefaultStyleID = 'bibi-default-style'; - if(Source.URL) { - Item.onload = () => { - const Head = Item.contentDocument.getElementsByTagName('head')[0]; - const Link = sML.create('link', { rel: 'stylesheet', id: DefaultStyleID, href: Bibi.BookStyleURL, onload: resolve }); - Head.insertBefore(Link, Head.firstChild); - }; - Item.src = Source.URL; - } else { - if(!Item.BlobURL) { - let HTML = Source.HTML || `\n${ B.FullTitle } - #${ Item.Index + 1 }/${ R.Items.length }${ Source.Head || '' }${ Source.Body || '' }`; - HTML = HTML.replace(/(]+)?>)/i, `$1`); - if(sML.UA.Trident || sML.UA.EdgeHTML) { - // Legacy Microsoft Browsers do not accept DataURIs for src of + + + + + diff --git a/__src/bibi-demo/embedding/index.scss b/__src/bibi-demo/embedding/index.scss new file mode 100644 index 00000000..716af01a --- /dev/null +++ b/__src/bibi-demo/embedding/index.scss @@ -0,0 +1,50 @@ +@charset "utf-8"; +@import "../../bibi/resources/styles/#globals"; + +* { + margin: 0; + border: none 0; + padding: 0; + font-size: 100%; + font-weight: inheirt; + font-style: inherit; +} + +html { + font-size: 12px; + @include size(100%); + background: white; +} + +body { + display: flex; + flex-direction: column; + justify-content: space-between; + margin: 10px; + @include size(calc(100% - 20px)); +} + +main { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: space-between; + @include size(auto, 100%); + > iframe.bibi-frame:nth-of-type(1) { + margin-bottom: 10px; + @include size(100%, calc(50% - 5px)); + box-shadow: 0 0 0 4px rgba(hotpink, 0); animation: FLASH-R .222s linear; + } + > iframe.bibi-frame:nth-of-type(2) { + @include size(calc(50% - 5px)); + box-shadow: 0 0 0 4px rgba(turquoise, 0); animation: FLASH-G .222s linear; + } + > iframe.bibi-frame:nth-of-type(3) { + @include size(calc(50% - 5px)); + box-shadow: 0 0 0 4px rgba(steelblue, 0); animation: FLASH-B .222s linear; + } +} + +@keyframes FLASH-R { 7% { box-shadow: 0 0 0 4px hotpink; } } +@keyframes FLASH-G { 7% { box-shadow: 0 0 0 4px turquoise; } } +@keyframes FLASH-B { 7% { box-shadow: 0 0 0 4px steelblue; } } diff --git a/__src/bibi/and/jo.js b/__src/bibi/and/jo.js index 7267ba72..c2a7cf36 100644 --- a/__src/bibi/and/jo.js +++ b/__src/bibi/and/jo.js @@ -1,185 +1,191 @@ -(() => { - 'use strict'; - if(window['bibi:jo']) return; - if(!Array.prototype.includes) Array.prototype.includes = function(I) { for(let l = this.length, i = 0; i < l; i++) if(this[i] == I) return true; return false; }; - const Jo = window['bibi:jo'] = { 'version': '____Bibi-Version____', - CSS: require('./jo.scss'), - Status: '', - Bibis: [], - Anchors: [], - Holders: [], - Frames: [], - TrustworthyOrigins: [location.origin], - Loaded: 0 - }; - Jo.Path = (() => { - if(document.currentScript) return document.currentScript.src; - const Scripts = document.getElementsByTagName('script'); - return Scripts[Scripts.length - 1].src; - })(); - Jo.embed = () => { - Jo.Status = 'Started'; - const As = document.body.querySelectorAll('a[data-bibi]'); - for(let l = As.length, i = 0; i < l; i++) { - if(!As[i].getAttribute('href') || As[i].Bibi) continue; - // Bibi Object - const Bibi = { Index: i, Number: i + 1 }; - // Anchor - const Anchor = Bibi.Anchor = As[i]; - if(!/ bibi-anchor /.test(' ' + Anchor.className + ' ')) Anchor.className = 'bibi-anchor' + (Anchor.className ? ' ' + Anchor.className : ''); - if(Anchor.origin != location.origin) Jo.TrustworthyOrigins.push(Anchor.origin); - Anchor.addEventListener('bibi:loaded', function(Eve) { console.log('Bibi: Loaded. - #' + Eve.detail.Number + ': ' + Eve.detail.Anchor.href); }, false); - Jo.Anchors.push(Anchor); - // Holder - const BibiClass = Anchor.getAttribute('data-bibi-class'); - const BibiID = Anchor.getAttribute('data-bibi-id'); - const BibiStyle = Anchor.getAttribute('data-bibi-style'); - const Holder = Bibi.Holder = Jo.create('span', { - className: 'bibi-holder' + (BibiClass ? ' ' + BibiClass : ''), - id: (BibiID ? BibiID : 'bibi-holder-' + (i + 1)), - title: (Anchor.innerText ? Anchor.innerText + ' ' : '') + '(powered by Bibi)' - }); - if(BibiStyle) Holder.setAttribute('style', BibiStyle); - Jo.Holders.push(Holder); - // Fragments - const Fragments = new Jo.Fragments(); - Fragments.add('parent-title', document.title); - Fragments.add('parent-uri', location.href); - Fragments.add('parent-origin', location.origin); - Fragments.add('parent-jo-path', Jo.Path); - Fragments.add('parent-bibi-label', Anchor.innerHTML); - Fragments.add('parent-holder-id', Holder.id); - [ - 'to', - 'nav', - 'autostart', 'autostart-embedded', - 'fix-reader-view-mode', - 'preprocess-html-always', - 'reader-view-mode', - 'single-page-always', - 'start-in-new-window', 'start-embedded-in-new-window', - 'use-arrows', - 'use-font-size-changer', - 'use-full-height', - 'use-keys', - 'use-loupe', - 'use-menubar', //'place-menubar-at-top', - 'use-nombre' - ].forEach(PresetKey => { - const PresetValue = Anchor.getAttribute('data-bibi-' + PresetKey); - if(!PresetValue) return; - let RE; - switch(PresetKey) { - case 'to': RE = /^[1-9][\d\-\.]*$/; break; - case 'nav': RE = /^[1-9]\d*$/; break; - case 'reader-view-mode': RE = /^(horizontal|vertical|paged)$/; break; - default: RE = /^(true|false|yes|no|mobile|desktop)?$/; break; - } - if(/^(autostart|start-in-new-window)$/.test(PresetKey)) PresetKey = PresetKey.replace('start', 'start-embedded'); - if(RE.test(PresetValue)) Fragments.add(PresetKey, PresetValue); - }); - // Frame - const BibiSrc = Anchor.getAttribute('href'); - const Frame = Bibi.Frame = Holder.appendChild( - Jo.create('iframe', { - className: 'bibi-frame', - frameborder: '0', - scrolling: 'auto', - allowfullscreen: 'true', - src: BibiSrc + (/#/.test(BibiSrc) ? ',' : '#') + Fragments.make() - }) - ); - Frame.addEventListener('load', () => { - Jo.Loaded++; - Frame.Bibi.Anchor.dispatchEvent(new CustomEvent('bibi:loaded', { detail: Frame.Bibi })); - if(Jo.Status != 'TimedOut' && Jo.Loaded == Jo.Bibis.length) { - Jo.Status = 'Loaded'; - document.dispatchEvent(new CustomEvent('bibi:loaded', { detail: Jo })); - } - }, false); - Jo.Frames.push(Frame); - // Add - Jo.Bibis.push(Bibi); - Frame.Bibi = Holder.Bibi = Anchor.Bibi = Bibi; - } - // Put - for(let l = Jo.Bibis.length, i = 0; i < l; i++) { - if(Jo.Bibis[i].Embedded) continue; - const Bibi = Jo.Bibis[i]; - Bibi.move = (Distance) => { - if(typeof Target != 'number') return; - Bibi.Frame.contentWindow.postMessage(`{'bibi:commands:move':'${ Distance }'}`, Bibi.Anchor.origin); - }; - Bibi.focus = (Target) => { - if(typeof Target != 'string' && typeof Target != 'number') return; - Bibi.Frame.contentWindow.postMessage(`{'bibi:commands:focus':'${ Target }'}`, Bibi.Anchor.origin); - }; - Bibi.changeView = (BDM) => { - if(typeof Target != 'string') return; - Bibi.Frame.contentWindow.postMessage(`{'bibi:commands:change-view':'${ BDM }'}`, Bibi.Anchor.origin); - }; - Bibi.togglePanel = () => { - Bibi.Frame.contentWindow.postMessage(`{'bibi:command:toggle-panel':''}`, Bibi.Anchor.origin); - }; - Bibi.Anchor.style.display = 'none'; - Bibi.Anchor.parentNode.insertBefore(Bibi.Holder, Bibi.Anchor); - Bibi.Anchor.dispatchEvent(new CustomEvent('bibi:readied', { detail: Bibi })); +(() => { 'use strict'; if(window['bibi:jo']) return; + + + + +const Jo = window['bibi:jo'] = { 'version': '____Bibi-Version____', + CSS: require('./jo.scss'), + Status: '', + Bibis: [], + TrustworthyOrigins: [location.origin], + Loaded: 0, +}; + +const BibiEventRE = /^bibi:[a-z][a-z:\-]*$/; + + + + +Jo.Bibi = function() { return Jo.callBibi.apply(Jo, arguments); }; + +Jo.callBibi = (Love) => { + let Anchor = null, Frame = null, Receiver = null, ToReceive = []; + try { + if(!(Love instanceof HTMLElement)) { + if(Love && typeof Love == 'object') { + if(!Love['bibi-href']) return null; + Anchor = Jo.create('a', { href: Love['bibi-href'] }); + Frame = Jo.create('iframe'); + Receiver = Frame; + } + if(Love['bibi-receive'] instanceof Array) ToReceive = Love['bibi-receive']; + } else { + if(/^iframe$/i.test(Love.tagName)) { + const BibiHref = Love.getAttribute('data-bibi-href'); + if(!BibiHref) return null; + Anchor = Love.parentNode.insertBefore(Jo.create('a', { href: BibiHref }), Love); + Frame = Love.parentNode.removeChild(Love); + } else if(/^a$/i.test(Love.tagName)) { + if(!Love.href) return null; + Anchor = Love; + Frame = Jo.create('iframe'); + (BibiClass => BibiClass ? BibiClass.trim().replace(/\s+/, ' ').split(' ').forEach(CN => CN ? Frame.classList.add(CN) : false) : false)(Anchor.getAttribute('data-bibi-class')); + (BibiID => BibiID ? Frame.setAttribute('id', BibiID ) : false)(Anchor.getAttribute('data-bibi-id' )); + (BibiStyle => BibiStyle ? Frame.setAttribute('style', BibiStyle) : false)(Anchor.getAttribute('data-bibi-style')); + } + Receiver = Love; + let BibiReceive = Receiver.getAttribute('data-bibi-receive'); + if(BibiReceive && (BibiReceive = BibiReceive.replace(/\s+/, ''))) ToReceive = BibiReceive.split(','); + } - setTimeout(() => { - if(Jo.Status == 'Loaded') return; - Jo.Status = 'TimedOut'; - document.dispatchEvent(new CustomEvent('bibi:timed-out', { detail: Jo })); - }, 12000); - Jo.Status = 'Readied'; - document.dispatchEvent(new CustomEvent('bibi:readied', { detail: Jo })); - return Jo.Bibis; + } catch(Err) { return null; } if(!Anchor || !Frame || !Receiver) return null; + const Bibi = Anchor.Bibi = Frame.Bibi = { Jo: Jo, Anchor: Anchor, Frame: Frame, Receiver: Receiver, Index: Jo.Bibis.length, Status: '' }; + Bibi.listen = (EN, fun) => !BibiEventRE.test(EN) ? false : Receiver.addEventListener(EN, Eve => fun.call(Receiver, Eve.detail), false); + Bibi.dispatch = (EN, Det = Bibi) => !BibiEventRE.test(EN) ? false : Receiver.dispatchEvent(new CustomEvent(EN, { detail: Det })); + Bibi.receive = (EN) => !BibiEventRE.test(EN) ? false : Frame.contentWindow.E.add(EN, Det => Bibi.dispatch(EN, Det)); + Bibi.post = (EN, V) => !BibiEventRE.test(EN) ? false : Frame.contentWindow.postMessage(`{ "${ EN }" : "${ V }" }`, Anchor.origin); + Bibi.listen('bibi:initialized', (Status) => Bibi.Status = Bibi.Initialized = Status); if(ToReceive.length) Bibi.listen('bibi:initialized', () => ToReceive.forEach(EN => Bibi.receive('' + EN.trim()))); + Bibi.listen('bibi:readied', (Status) => Bibi.Status = Bibi.Readied = Status); + Bibi.listen('bibi:prepared', (Status) => Bibi.Status = Bibi.Prepared = Status); + Bibi.listen('bibi:opened', (Status) => Bibi.Status = Bibi.Opened = Status); + Bibi.listen('bibi:opened', () => { + Bibi.move = (Distance) => Bibi.post('bibi:commands:move', Distance); + Bibi.focus = (Target) => Bibi.post('bibi:commands:focus', Target); + Bibi.changeView = (RVM) => Bibi.post('bibi:commands:change-view', RVM); + Bibi.togglePanel = () => Bibi.post('bibi:commands:toggle-panel', ''); + }); + Anchor.style.display = 'none'; + if(!Jo.TrustworthyOrigins.includes(Anchor.origin)) Jo.TrustworthyOrigins.push(Anchor.origin); // It is NOT reflected to S['trustworthy-origins']. + Anchor.href += (/#/.test(Anchor.href) ? ',' : '#') + (() => { + const Fragments = new Jo.Fragments(); + Fragments.add('parent-bibi-index', Bibi.Index); + [ + 'autostart-embedded', 'autostart', + 'fix-reader-view-mode', 'fix-view', 'view-unchangeable', + 'full-breadth-layout-in-scroll', + 'iipp', + 'nav', + 'reader-view-mode', 'rvm', 'view', + 'start-embedded-in-new-window', 'start-in-new-window' + ].forEach(K => { let V = '' + (Love.ownerDocument ? Love.getAttribute('data-bibi-' + K) || '' : Love['bibi-' + K]); + if(V && (() => { switch(K) { + case 'iipp': return /^(\d*\.)?\d+$/; + case 'nav': return /^[1-9][0-9]*$/; + case 'rvm': case 'view': K = 'reader-view-mode'; + case 'reader-view-mode': return /^(paged|horizontal|vertical)$/; + case 'autostart': case 'start-in-new-window': K = K.replace('start', 'start-embedded'); break; + case 'view-unchangeable': K = 'fix-reader-view-mode'; break; + } return /^(true|false|1|0|yes|no|mobile|desktop)$/; })().test(V)) Fragments.add(K, V); + }); + return Fragments.make(); + })(); + Frame.classList.add('bibi-frame'); + Frame.setAttribute('frameborder', '0'); + Frame.setAttribute('scrolling', 'auto'); + Frame.setAttribute('allowfullscreen', 'true'); + Frame.src = Anchor.href; + Jo.Bibis.push(Bibi); + return Bibi; +}; + + + + +Jo.embed = () => { + const BibisToBeLoaded = [], BibisLoaded = []; + Array.prototype.forEach.call(document.body.querySelectorAll('*[data-bibi]'), Bed => { + if(Bed.getAttribute('data-bibi-processed')) return; + Bed.setAttribute('data-bibi-processed', 'true'); + const Bibi = new Jo.Bibi(Bed); + if(Bibi) BibisToBeLoaded.push(Bibi); + }); + if(!BibisToBeLoaded.length) return; + //Jo.listen('bibi:jo:embedded', Bibis => console.log(`[Bibi:Jo] Embedded. - ${ Bibis.length } of ${ Jo.Bibis.length }`)); + BibisToBeLoaded.forEach(Bibi => { + const Anchor = Bibi.Anchor, Frame = Bibi.Frame; + Bibi.listen('bibi:initialized', () => (BibisLoaded.push(Bibi) < BibisToBeLoaded.length) ? false : Jo.dispatch('bibi:jo:embedded', BibisLoaded)); + Anchor.parentNode.insertBefore(Frame, Anchor); + }); +}; + + + + +document.addEventListener('DOMContentLoaded', Jo.embed), window.addEventListener('load', Jo.embed); + + + + +window.addEventListener('message', Eve => { + if(!Eve || !Jo.judge(Eve.data, Eve.origin)) return false; try { + Data = JSON.parse(Data); + if(typeof Data != 'object' || !Data) return false; + for(let EN in Data) Jo.dispatch(EN, Data[EN]); + return true; } catch(Err) {} return false; +}, false); + + + + +// Utility + +Jo.create = (TagName, Properties) => { + const Ele = document.createElement(TagName); + for(let Attribute in Properties) Ele[Attribute] = Properties[Attribute]; + return Ele; +}; + +Jo.encode = (Str) => encodeURIComponent(Str).replace('(', '_BibiKakkoOpen_').replace(')', '_BibiKakkoClose_'); + +Jo.Fragments = function() { // constructor + this.FragmentKeys = []; + this.FragmentKeysAndValues = {}; + this.add = function(Key, Value) { + if(!this.FragmentKeys.includes(Key)) this.FragmentKeys.push(Key); + this.FragmentKeysAndValues[Key] = Value; }; - Jo.encode = (Str) => encodeURIComponent(Str).replace('(', '_BibiKakkoOpen_').replace(')', '_BibiKakkoClose_'); - Jo.create = (TagName, Properties) => { - const Ele = document.createElement(TagName); - for(let Attribute in Properties) Ele[Attribute] = Properties[Attribute]; - return Ele; + this.make = function() { + if(!this.FragmentKeys.length) return ''; + const Fragments = []; + for(let l = this.FragmentKeys.length, i = 0; i < l; i++) Fragments.push(`${ this.FragmentKeys[i] }:${ Jo.encode(this.FragmentKeysAndValues[this.FragmentKeys[i]]) }`); + return `jo(${ Fragments.join(',') })`; }; - Jo.Fragments = function() { // constructor - this.FragmentKeys = []; - this.FragmentKeysAndValues = {}; - this.add = function(Key, Value) { - if(!this.FragmentKeys.includes(Key)) this.FragmentKeys.push(Key); - this.FragmentKeysAndValues[Key] = Value; - }; - this.make = function() { - if(!this.FragmentKeys.length) return ''; - const Fragments = []; - for(let l = this.FragmentKeys.length, i = 0; i < l; i++) Fragments.push(`${ this.FragmentKeys[i] }:${ Jo.encode(this.FragmentKeysAndValues[this.FragmentKeys[i]]) }`); - return `jo(${ Fragments.join(',') })`; - }; - return this; + return this; +}; + +Jo.judge = (Msg, Origin) => (Msg && typeof Msg == 'string' && Origin && typeof Origin == 'string' && Jo.TrustworthyOrigins.includes(Origin)); + +Jo.listen = (EN, fun) => !BibiEventRE.test(EN) ? false : document.addEventListener(EN, Eve => fun.call(document, Eve.detail)); +Jo.dispatch = (EN, Det = Jo) => !BibiEventRE.test(EN) ? false : document.dispatchEvent(new CustomEvent(EN, { detail: Det })); + + + + +// Polyfill + +if(!Array.prototype.includes) Array.prototype.includes = function(I) { for(let l = this.length, i = 0; i < l; i++) if(this[i] == I) return true; return false; }; + +if(!window.CustomEvent || (typeof window.CustomEvent !== 'function') && (window.CustomEvent.toString().indexOf('CustomEventConstructor') === -1)) { + window.CustomEvent = function(EventName, Arguments) { // constructor + Arguments = Arguments || { bubbles: false, cancelable: false, detail: undefined }; + const Eve = document.createEvent('CustomEvent'); + Eve.initCustomEvent(EventName, Arguments.bubbles, Arguments.cancelable, Arguments.detail); + return Eve; }; - if(!window.CustomEvent || (typeof window.CustomEvent !== 'function') && (window.CustomEvent.toString().indexOf('CustomEventConstructor') === -1)) { - window.CustomEvent = function(EventName, Arguments) { // constructor - Arguments = Arguments || { bubbles: false, cancelable: false, detail: undefined }; - const Eve = document.createEvent('CustomEvent'); - Eve.initCustomEvent(EventName, Arguments.bubbles, Arguments.cancelable, Arguments.detail); - return Eve; - }; - window.CustomEvent.prototype = window.Event.prototype; - } - window.addEventListener('message', Eve => { - if(!Eve || !Eve.data) return; - for(let l = Jo.TrustworthyOrigins.length, i = 0; i < l; i++) { - if(Eve.origin != Jo.TrustworthyOrigins[i]) continue; - let Data = Eve.data; - try { - Data = JSON.parse(Data); - if(typeof Data != 'object' || !Data) return false; - for(let EventName in Data) if(/^bibi:commands:/.test(EventName)) document.dispatchEvent(new CustomEvent(EventName, { detail: Data[EventName] })); - return true; - } catch(Err) {} - return false; - } - }, false); - document.addEventListener('bibi:readied', Eve => console.log(`Bibi: Readied. - ${ Eve.detail.Bibis.length } Bibi${ Eve.detail.Bibis.length > 1 ? 's' : '' }.`)); - document.addEventListener('bibi:loaded', Eve => console.log(`Bibi: Loaded. - ${ Eve.detail.Bibis.length } Bibi${ Eve.detail.Bibis.length > 1 ? 's' : '' }.`)); - document.addEventListener('bibi:timed-out', Eve => console.log(`Bibi: Timed Out.` )); - document.addEventListener('DOMContentLoaded', Jo.embed, false); + window.CustomEvent.prototype = window.Event.prototype; +} + + + + })(); \ No newline at end of file diff --git a/__src/bibi/and/jo.scss b/__src/bibi/and/jo.scss index 47e0d8be..1a2546de 100644 --- a/__src/bibi/and/jo.scss +++ b/__src/bibi/and/jo.scss @@ -1,24 +1,19 @@ -span.bibi-holder { - &, - >iframe.bibi-frame { - display: block; - box-sizing: border-box; - position: relative; - margin: 0; - padding: 0; - border: none 0 transparent; - vertical-align: top; - line-height: 1; - text-decoration: none; - background: transparent; - } - & { - max-width: 100%; - max-height: 100%; - } - >iframe.bibi-frame { - border: solid 1px rgb(216,216,216); - width: 100%; - height: 100%; - } +/*! Bibi Frame Style */ + +iframe.bibi-frame { + display: inline-block; + box-sizing: border-box; + position: relative; + margin: 0; + padding: 0; + border: solid 1px rgb(222,222,222); + border-radius: 1px; + max-width: 100%; + max-height: 100%; + width: 100%; + height: 100%; + vertical-align: top; + line-height: 1; + text-decoration: none; + background: transparent; } \ No newline at end of file diff --git a/__src/bibi/extensions/extractor/at-once.js b/__src/bibi/extensions/extractor/at-once.js index 3f819e8e..68122d2c 100644 --- a/__src/bibi/extensions/extractor/at-once.js +++ b/__src/bibi/extensions/extractor/at-once.js @@ -50,10 +50,14 @@ Bibi.x({ } if(!FilesToBeExtract.length) return reject(`Does Not Contain Any Resources`); let FolderName = '', FolderNameRE = undefined; - if(!FilesToBeExtract.includes(B.Container.Path) && !FilesToBeExtract.includes(B.ZineData.Path)) { - [B.Container.Path, B.ZineData.Path].forEach(ToBeFound => { + const PathsToBeChecked = []; + if(B.Type != 'Zine') PathsToBeChecked.push(B.Container.Path); // EPUB or unknown. + if(B.Type != 'EPUB') PathsToBeChecked.push(B.ZineData.Path ); // Zine or unknown. + if(!PathsToBeChecked.filter(PathToBeChecked => FilesToBeExtract.includes(PathToBeChecked)).length) { + PathsToBeChecked.forEach(PathToBeChecked => { + if(!PathToBeChecked) return; if(FolderName) return; - const RE = new RegExp('^(.+?\\/)' + ToBeFound.replace(/\//g, '\\/').replace(/\./g, '\\.') + '$'); + const RE = new RegExp('^(.+?\\/)' + PathToBeChecked.replace(/\//g, '\\/').replace(/\./g, '\\.') + '$'); for(let l = FilesToBeExtract.length, i = 0; i < l; i++) { const FileName = FilesToBeExtract[i]; if(RE.test(FileName)) { @@ -64,15 +68,11 @@ Bibi.x({ } }); } - if(FilesToBeExtract.includes(FolderName + B.Container.Path)) { - if(!B.Type) B.Type = 'EPUB'; - else if(B.Type == 'Zine') reject({ BookTypeError: `It Seems to Be an EPUB. Not a Zine.` }); - } else if(FilesToBeExtract.includes(FolderName + B.ZineData.Path)) { - if(!B.Type) B.Type = 'Zine'; - else if(B.Type == 'EPUB') reject({ BookTypeError: `It Seems to Be a Zine. Not an EPUB.` }); - } else { - reject(`Required Metafile Is Not Contained.`); - } + let RootFileFound = false; + if(B.Type) RootFileFound = FilesToBeExtract.includes(FolderName + PathsToBeChecked[0]); + else if(FilesToBeExtract.includes(FolderName + B.Container.Path)) B.Type = 'EPUB', RootFileFound = true; + else if(FilesToBeExtract.includes(FolderName + B.ZineData.Path )) B.Type = 'Zine', RootFileFound = true; + if(!RootFileFound) return reject(`Required Metafile${ B.Type ? ' (' + (B.Type != 'EPUB' ? B.ZineData.Path : B.Container.Path).split('/').slice(-1)[0] + ')' : '' } Is Not Contained.`); const FileCount = { Particular: 0 }; const FileTypesToBeCounted = { 'Meta XML': 'xml|opf|ncx', @@ -95,7 +95,7 @@ Bibi.x({ O.log(`Extracting Book Data...`, ''); const Promises = []; FilesToBeExtract.forEach(FileName => { - if(FolderName) FileName = FileName.replace(FolderNameRE, ''); + if(FolderNameRE) FileName = FileName.replace(FolderNameRE, ''); const IsBin = O.isBin({ Path: FileName }); Promises.push( BookDataArchive.file(FolderName + FileName).async(IsBin ? 'blob' : 'string').then(FileContent => { diff --git a/__src/bibi/extensions/zine.js b/__src/bibi/extensions/zine.js index b05fe75d..cf80ef71 100644 --- a/__src/bibi/extensions/zine.js +++ b/__src/bibi/extensions/zine.js @@ -5,50 +5,69 @@ Bibi.x({ id: 'Zine', description: 'Utilities for BibiZine.', author: 'Satoru MATSUSHIMA (@satorumurmur)', - version: '1.1.1' + version: '1.2.0' })(function() { 'use strict'; - B.ZineData = { Path: 'zine.yaml', Dir: '' }; + this.loadZineData = () => this.setZineMode().then(this.openYAML).then(this.createPackageDocument).then(L.loadPackage.process); - this.loadZineData = () => this.openYAML(B.ZineData.Path).then(this.processZineData).then(L.loadPackage.process); + this.setZineMode = () => { + delete B.Container; + B.Package.Path = B.ZineData.Path; + Object.defineProperty(B, 'ZineData', { get: () => B.Package }); + return Promise.resolve(); + }; - this.openYAML = (Path) => O.file(Path).then(jsyaml.safeLoad); + this.openYAML = () => O.file(B.ZineData).then(ZineFile => jsyaml.safeLoad(ZineFile.Content)); - this.processZineData = (Data) => { - sML.edit(B.Package, B.ZineData); - const Doc = document.createElement('bibi:zine'); + this.createPackageDocument = (YAML) => { + const NS = { + OPF: 'http://www.idpf.org/2007/opf', + DC: 'http://purl.org/dc/elements/1.1/' + }; + const Doc = document.implementation.createDocument(NS.OPF, 'package'); + // Package + const Package = Doc.documentElement; + Package.setAttribute('xmlns', NS.OPF); + Package.setAttribute('xmlns:dc', NS.DC); // Metadata - const Metadata = Doc.appendChild(document.createElement('metadata')); - ['identifier', 'title', 'creator', 'publisher', 'language', 'rendition-layout', 'rendition-orientation', 'rendition-spread'].forEach(Pro => { - if(!Data[Pro]) return; - const Meta = Metadata.appendChild(document.createElement('meta')); + const Metadata = Package.appendChild(document.createElementNS(NS.OPF, 'metadata')); + ['identifier', 'language', 'title', 'creator', 'publisher'].forEach(Pro => { + if(!YAML[Pro]) return; + const Meta = Metadata.appendChild(document.createElementNS(NS.DC, 'dc:' + Pro)); + Meta.textContent = YAML[Pro]; + }); + ['rendition-layout', 'rendition-orientation', 'rendition-spread'].forEach(Pro => { + if(!YAML[Pro]) return; + const Meta = Metadata.appendChild(document.createElementNS(NS.OPF, 'meta')); Meta.setAttribute('property', Pro.replace('-', ':')); - Meta.textContent = Data[Pro]; + Meta.textContent = YAML[Pro]; }); // Manifest & Spine - const Manifest = Doc.appendChild(document.createElement('manifest')); + const Manifest = Package.appendChild(document.createElementNS(NS.OPF, 'manifest')); ['cover-image', 'nav'].forEach(Pro => { - if(!Data[Pro]) return; - const Item = Manifest.appendChild(document.createElement('item')); + if(!YAML[Pro]) return; + const Item = Manifest.appendChild(document.createElementNS(NS.OPF, 'item')); Item.setAttribute('id', Pro + '-item'); Item.setAttribute('properties', Pro); - Item.setAttribute('href', Data[Pro]); + Item.setAttribute('media-type', O.getContentType(YAML[Pro])); + Item.setAttribute('href', YAML[Pro]); }); - const Spine = Doc.appendChild(document.createElement('spine')); - if(Data['page-progression-direction']) Spine.setAttribute('page-progression-direction', Data['page-progression-direction']); - Data['spine'].forEach((ItemrefData, i) => { - if(!ItemrefData) return; - ItemrefData = ItemrefData.trim().replace(/\s+/, ' ').split(' '); + const Spine = Package.appendChild(document.createElementNS(NS.OPF, 'spine')); + if(YAML['page-progression-direction']) Spine.setAttribute('page-progression-direction', YAML['page-progression-direction']); + YAML['spine'].forEach((ItemRefData, i) => { + if(!ItemRefData) return; const ID = 'spine-item-' + (i + 1 + '').padStart(3, 0); - const Item = Manifest.appendChild(document.createElement('item')); + const [Href, PageSpread] = ItemRefData.trim().replace(/\s+/, ' ').split(' '); + const Item = Manifest.appendChild(document.createElementNS(NS.OPF, 'item')); Item.setAttribute('id', ID); - Item.setAttribute('href', ItemrefData[0]); - const Itemref = Spine.appendChild(document.createElement('itemref')); - Itemref.setAttribute('idref', ID); - if(ItemrefData[1]) Itemref.setAttribute('properties', 'page-spread-' + ItemrefData[1]); + Item.setAttribute('media-type', O.getContentType(Href)); + Item.setAttribute('href', Href); + const ItemRef = Spine.appendChild(document.createElementNS(NS.OPF, 'itemref')); + ItemRef.setAttribute('idref', ID); + if(PageSpread) ItemRef.setAttribute('properties', 'page-spread-' + PageSpread); }); return Promise.resolve(Doc); }; diff --git a/__src/bibi/presets/default.js b/__src/bibi/presets/default.js index 70258780..8715ecec 100644 --- a/__src/bibi/presets/default.js +++ b/__src/bibi/presets/default.js @@ -12,15 +12,16 @@ Bibi.preset({ //-- Behavior //---------------------------------------------------------------------------------------------------------------------------------------------- -"reader-view-mode" : "paged", // "paged" or "vertical" or "horizontal" ("paged" is for flipping, "vertical" and "horizontal" are for scrolling) -"fix-reader-view-mode" : "no", // "yes" or "no" or "desktop" or "mobile" +"reader-view-mode" : "paged", // "paged" or "vertical" or "horizontal" ("paged" is for flipping, "vertical" and "horizontal" are for scrolling) +"full-breadth-layout-in-scroll" : "no", // "yes" or "no" or "desktop" or "mobile" +"fix-reader-view-mode" : "no", // "yes" or "no" or "desktop" or "mobile" -"keep-settings" : "yes", // "yes" or "no" or "desktop" or "mobile" -"resume-from-last-position" : "yes", // "yes" or "no" or "desktop" or "mobile" +"keep-settings" : "yes", // "yes" or "no" or "desktop" or "mobile" +"resume-from-last-position" : "yes", // "yes" or "no" or "desktop" or "mobile" -"autostart" : "yes", // "yes" or "no" or "desktop" or "mobile" -"autostart-embedded" : "no", // "yes" or "no" or "desktop" or "mobile" (It takes priority over "autostart" when the book is embedded in a webpage) -"start-embedded-in-new-window" : "mobile", // "yes" or "no" or "desktop" or "mobile" (It is used only when "autostart" (or "autostart-embedded") is NOT enabled) +"autostart" : "yes", // "yes" or "no" or "desktop" or "mobile" +"autostart-embedded" : "no", // "yes" or "no" or "desktop" or "mobile" (It takes priority over "autostart" when the book is embedded in a webpage) +"start-embedded-in-new-window" : "mobile", // "yes" or "no" or "desktop" or "mobile" (It is used only when "autostart" (or "autostart-embedded") is NOT enabled) //============================================================================================================================================== diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index 733ffbba..c9a55cc5 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -7,7 +7,176 @@ -export const Bibi = { 'version': '____Bibi-Version____', 'href': 'https://bibi.epub.link', TimeOrigin: Date.now() }; +export const Bibi = { 'version': '____Bibi-Version____', 'href': 'https://bibi.epub.link', Status: '', TimeOrigin: Date.now() }; + + +Bibi.SettingTypes = { + 'boolean': [ + 'allow-placeholders', + 'prioritise-fallbacks' + ], + 'yes-no': [ + 'accept-orthogonal-input', + 'autostart', + 'autostart-embedded', + 'fix-nav-ttb', + 'fix-reader-view-mode', + 'full-breadth-layout-in-scroll', + 'start-embedded-in-new-window', + 'use-arrows', + 'use-bookmarks', + 'use-font-size-changer', + 'use-full-height', + 'use-history', + 'use-keys', + 'use-loupe', + 'use-menubar', + 'use-nombre', + 'use-slider', + 'zoom-out-for-utilities' + ], + 'string': [ + 'book', + 'slider-mode', + 'default-page-progression-direction', + 'pagination-method', + 'reader-view-mode' + ], + 'integer': [ + 'item-padding-bottom', + 'item-padding-left', + 'item-padding-right', + 'item-padding-top', + 'spread-gap', + 'spread-margin' + ], + 'number': [ + 'base-font-size', + 'flipper-width', + 'font-size-scale-per-step', + 'loupe-max-scale', + 'loupe-scale-per-step', + 'orientation-border-ratio' + ], + 'array': [ + ] +}; + +Bibi.SettingTypes_PresetOnly = { + 'boolean': [ + 'accept-base64-encoded-data', + 'accept-blob-converted-data', + 'allow-scripts-in-content', + 'remove-bibi-website-link' + ], + 'yes-no': [ + 'accept-local-file', + 'keep-settings', + 'resume-from-last-position' + ], + 'string': [ + 'bookshelf' + ], + 'integer': [ + 'max-history', + 'max-bookmarks' + ], + 'number': [ + ], + 'array': [ + 'extract-if-necessary', + 'extensions', + 'trustworthy-origins' + ] +}; + +Bibi.SettingTypes_UserOnly = { + 'boolean': [ + 'debug', + 'wait', + 'zine' + ], + 'yes-no': [ + ], + 'string': [ + 'epubcfi', + 'bibidi' + ], + 'integer': [ + 'log', + 'nav', + 'parent-bibi-index' + ], + 'number': [ + 'iipp', + 'sipp' + ], + 'array': [ + ] +}; + +Bibi.verifySettingValue = (SettingType, _P, _V, Fill) => Bibi.verifySettingValue[SettingType](_P, _V, Fill); (Verifiers => { for(const SettingType in Verifiers) Bibi.verifySettingValue[SettingType] = Verifiers[SettingType]; })({ + 'boolean': (_P, _V, Fill) => { + if(typeof _V == 'boolean') return _V; + if(_V == 'true' || _V == '1' || _V == 1) return true; + if(_V == 'false' || _V == '0' || _V == 0) return false; + if(Fill) return false; + }, + 'yes-no': (_P, _V, Fill) => { + if(/^(yes|no|mobile|desktop)$/.test(_V)) return _V; + if(_V == 'true' || _V == '1' || _V == 1) return 'yes'; + if(_V == 'false' || _V == '0' || _V == 0) return 'no'; + if(Fill) return 'no'; + }, + 'string': (_P, _V, Fill) => { + if(typeof _V == 'string' && _V) { + switch(_P) { + case 'book': return decodeURIComponent(_V).trim() || undefined; + case 'bibidi': return R.getBibiToDestination(_V) || undefined; + case 'reader-view-mode': return /^(paged|horizontal|vertical)$/.test(_V) ? _V : undefined; + case 'default-page-progression-direction': return /^(ltr|rtl)$/.test(_V) ? _V : undefined; + case 'pagination-method': return (_V == 'x') ? _V : undefined; + } + return _V; + } + if(Fill) return ''; + }, + 'integer': (_P, _V, Fill) => { + if(typeof (_V *= 1) == 'number' && isFinite(_V) && _V >= 0) { + switch(_P) { + case 'log': return _V > 9 ? 9 : Math.round(_V); + } + return Math.round(_V); + } + if(Fill) return 0; + }, + 'number': (_P, _V, Fill) => { + if(typeof (_V *= 1) == 'number' && isFinite(_V) && _V >= 0) return _V; + if(Fill) return 0; + }, + 'array': (_P, _V, Fill) => { + if(_V instanceof Array) return _V; + if(Fill) return []; + } +}); + + +Bibi.applyFilteredSettingsTo = (To, From, ListOfSettingTypes, Fill) => { + ListOfSettingTypes.forEach(STs => { + for(const ST in STs) { + STs[ST].forEach(_P => { + const VSV = Bibi.verifySettingValue[ST](_P, From[_P]); + if(Fill) { + To[_P] = Bibi.verifySettingValue[ST](_P, To[_P]); + if(typeof VSV != 'undefined' || typeof To[_P] == 'undefined') To[_P] = Bibi.verifySettingValue[ST](_P, From[_P], true); + } else if(From.hasOwnProperty(_P)) { + if(typeof VSV != 'undefined') To[_P] = VSV; + } + }); + } + }); + return To; +}; @@ -77,29 +246,38 @@ Bibi.initialize = () => { } return 'en'; })([]))); } - E.initialize(); O.Biscuits.initialize(); - R.initialize(); - I.initialize(); - P.initialize(); - H.initialize(); - U.initialize(); - S.initialize( - () => O.Embedded = (() => { // Window Embedded or Not + { // Modules + E.initialize(); O.Biscuits.initialize(); + R.initialize(); + I.initialize(); + B.initialize(); + P.initialize(); + U.initialize(); + S.initialize(); + } + { // Embedding, Window, Fullscreen + O.Embedded = (() => { // Window Embedded or Not if(window.parent == window) { O.HTML.classList.add('window-direct' ); return 0; } // false else { O.HTML.classList.add('window-embedded'); try { if(location.host == parent.location.host || parent.location.href) return 1; } catch(Err) {} return -1; } // true (1:Reachable or -1:Unreachable) - })(), - () => O.FullscreenTarget = (() => { // Fullscreen Target + })(); + O.ParentBibi = O.Embedded == 1 && typeof S['parent-bibi-index'] == 'number' ? window.parent['bibi:jo'].Bibis[S['parent-bibi-index']] || null : null; + O.ParentOrigin = O.ParentBibi ? window.parent.location.origin : ''; + O.FullscreenTarget = (() => { // Fullscreen Target const FsT = (() => { - if(O.Embedded == 0) { sML.Fullscreen.polyfill(window ); return O.HTML; } - else if(O.Embedded == 1) { sML.Fullscreen.polyfill(window.parent); try { return window.parent.document.getElementById(S['parent-holder-id']).Bibi.Frame; } catch(Err) {} } + if(!O.Embedded) { sML.Fullscreen.polyfill(window ); return O.HTML; } + if(O.ParentBibi) { sML.Fullscreen.polyfill(window.parent); return O.ParentBibi.Frame; } })() || null; if(FsT && FsT.ownerDocument.fullscreenEnabled) { O.HTML.classList.add('fullscreen-enabled' ); return FsT; } else { O.HTML.classList.add('fullscreen-disabled'); return null; } - })() - ); + })(); + if(O.ParentBibi) { + O.ParentBibi.Window = window, O.ParentBibi.Document = document, O.ParentBibi.HTML = O.HTML, O.ParentBibi.Body = O.Body; + ['bibi:initialized', 'bibi:readied', 'bibi:prepared', 'bibi:opened'].forEach(EN => E.add(EN, Det => O.ParentBibi.dispatch(EN, Det))); + } + } if(sML.UA.Trident && !(sML.UA.Trident[0] >= 7)) { // Say Bye-bye I.note(`Your Browser Is Not Compatible`, 99999999999, 'ErrorOccured'); - return O.error(I.Veil.byebye({ + O.error(I.Veil.byebye({ 'en': `Sorry.... Your Browser Is Not Compatible.`, 'ja': `大変申し訳ありません。 お使いのブラウザでは、動作しません。` })); @@ -131,7 +309,7 @@ Bibi.initialize = () => { } O.HTML.classList.toggle('book-full-height', S['use-full-height']); O.HTML.classList.remove('welcome'); - E.dispatch('bibi:initialized'); + E.dispatch('bibi:initialized', Bibi.Status = Bibi.Initialized = 'Initialized'); //return PromiseTryingRangeRequest; }; @@ -174,15 +352,15 @@ Bibi.ready = () => new Promise(resolve => { O.HTML.classList.add('ready'); O.ReadiedURL = location.href; E.add('bibi:readied', resolve); - setTimeout(() => E.dispatch('bibi:readied'), (O.TouchOS && !O.Embedded) ? 1234 : 0); + setTimeout(() => E.dispatch('bibi:readied', Bibi.Status = Bibi.Readied = 'Readied'), (O.TouchOS && !O.Embedded) ? 1234 : 0); }).then(() => { O.HTML.classList.remove('ready'); }); Bibi.getBookData = () => + B.Data ? Promise.resolve({ BookData: B.Data, BookDataType: B.DataType }) : S['book'] ? Promise.resolve({ BookData: S['book'] }) : - S.BookDataElement ? Promise.resolve({ BookData: S.BookDataElement.innerText.trim(), BookDataType: S.BookDataElement.getAttribute('data-bibi-book-mimetype') }) : S['accept-local-file'] ? new Promise(resolve => { Bibi.getBookData.resolve = (Par) => { resolve(Par), O.HTML.classList.remove('waiting-file'); }; O.HTML.classList.add('waiting-file'); }) : Promise.reject (`Tell me EPUB name via ${ O.Embedded ? 'embedding tag' : 'URI' }.`); @@ -234,7 +412,7 @@ Bibi.loadBook = (BookDataParam) => Promise.resolve().then(() => { }); }).then(() => { // Announce "Prepared" (and Wait, sometime) - E.dispatch('bibi:prepared'); + E.dispatch('bibi:prepared', Bibi.Status = Bibi.Prepared = 'Prepared'); if(!S['autostart'] && !L.Played) return L.wait(); }).then(() => { // Background Preparing @@ -250,13 +428,30 @@ Bibi.loadBook = (BookDataParam) => Promise.resolve().then(() => { addResetter: () => { window .addEventListener('resize', LayoutOption.resetter); }, removeResetter: () => { window.removeEventListener('resize', LayoutOption.resetter); } }; - if(typeof S['to'] == 'object') { - LayoutOption.TargetSpreadIndex = - (typeof S['to'].SpreadIndex == 'number') ? S['to'].SpreadIndex : - (typeof S['to'].ItemIndexInSpine == 'number') ? B.Package.Spine.Items[S['to'].ItemIndexInSpine].Spread.Index : - ( S['to']['SI-PPiS'] ) ? S['to']['SI-PPiS'].split('-')[0] : - 0; - LayoutOption.Destination = S['to']; + if(typeof R.StartOn == 'object') { + const Item = typeof R.StartOn.Item == 'object' ? R.StartOn.Item : (() => { + if(typeof R.StartOn.IIPP == 'number') { + let II = Math.floor(R.StartOn.IIPP); + if(II >= R.Items.length) { + const PP = R.StartOn.IIPP - II; + II = R.Items.length - 1; + R.StartOn.IIPP = II + PP; + } + return R.Items[II]; + } + if(typeof R.StartOn.ItemIndex == 'number') { + if(R.StartOn.ItemIndex >= R.Items.length) R.StartOn.ItemIndex = R.Items.length - 1; + return R.Items[R.StartOn.ItemIndex]; + } + if(typeof R.StartOn.ItemIndexInSpine == 'number') { + if(R.StartOn.ItemIndexInSpine >= B.Package.Spine.Items.length) R.StartOn.ItemIndexInSpine = B.Package.Spine.Items.length - 1; + const Item = B.Package.Spine.Items[R.StartOn.ItemIndexInSpine]; + if(Item.Spread) return Item; + R.StartOn = { ItemIndex: 0 }; + } + })(); + LayoutOption.TargetSpreadIndex = Item && Item.Spread ? Item.Spread.Index : 0; + LayoutOption.Destination = R.StartOn; } LayoutOption.addResetter(); let LoadedItems = 0; @@ -293,12 +488,13 @@ Bibi.openBook = (LayoutOption) => new Promise(resolve => { document.body.click(); // To responce for user scrolling/keypressing immediately I.note(''); O.log(`Enjoy Readings!`, ''); - E.dispatch('bibi:opened'); + E.dispatch('bibi:opened', Bibi.Status = Bibi.Opened = 'Opened'); + E.dispatch('bibi:scrolled'); resolve(); }).then(() => { const LandingPage = R.hatchPage(LayoutOption.Destination) || R.Pages[0]; if(!I.History.List.length) { - I.History.List = [{ UI: Bibi, Spread: LandingPage.Spread, PageProgressInSpread: LandingPage.IndexInSpread / LandingPage.Spread.Pages.length }]; + I.History.List = [{ UI: Bibi, Item: LandingPage.Item, PageProgressInItem: LandingPage.IndexInItem / LandingPage.Item.Pages.length }]; I.History.update(); } if(S['allow-placeholders']) { @@ -309,13 +505,12 @@ Bibi.openBook = (LayoutOption) => new Promise(resolve => { } if(S['resume-from-last-position']) E.add('bibi:changed-intersection', () => { try { const CurrentPage = I.PageObserver.Current.List[0].Page; - O.Biscuits.memorize('Book', { 'Position': { 'SI-PPiS': CurrentPage.Spread.Index + '-' + (CurrentPage.IndexInSpread / CurrentPage.Spread.Pages.length) } }); + O.Biscuits.memorize('Book', { Position: { IIPP: CurrentPage.Item.Index + CurrentPage.IndexInItem / CurrentPage.Item.Pages.length } }); } catch(Err) {} }); E.add('bibi:commands:move-by', R.moveBy); E.add('bibi:commands:scroll-by', R.scrollBy); E.add('bibi:commands:focus-on', R.focusOn); E.add('bibi:commands:change-view', R.changeView); - window.addEventListener('message', M.gate, false); (Bibi.Dev && !/:61671/.test(location.href)) ? Bibi.createDevNote() : delete Bibi.createDevNote; /* alert((Alert => { @@ -383,14 +578,29 @@ export const B = { // Bibi.Book Path: '', PathDelimiter: ' > ', Container: { Path: 'META-INF/container.xml' }, - Package: { - Manifest: { Items: {} }, - Spine: { Items: [] } - }, + Package: { Metadata: {}, Manifest: { Items: {} }, Spine: { Items: [] } }, FileDigit: 0 }; +B.initialize = () => { + const BookDataElement = document.getElementById('bibi-book-data'); + if(BookDataElement) { + const BookData = BookDataElement.innerText.trim(); + if(BookData) { + const BookDataType = BookDataElement.getAttribute('data-bibi-book-mimetype'); + if(/^application\/(epub\+zip|zip|x-zip(-compressed)?)$/i.test(BookDataType)) B.Data = BookData, B.DataType = BookDataType; + } + if(!B.Data) { + BookDataElement.innerHTML = ''; + BookDataElement.parentNode.removeChild(BookDataElement); + } + } + B.Type = !U['book'] ? '' : U['zine'] ? 'Zine' : 'EPUB'; + if(B.Type != 'EPUB') B.ZineData = { Path: 'zine.yaml' }; +}; + + //============================================================================================================================================== @@ -450,11 +660,10 @@ L.initializeBook = (Par) => new Promise((resolve, reject) => { if(BookDataFormat == 'URI') { // Online B.Path = BookData; - if(!S['trustworthy-origins'].includes(new URL(B.Path).origin)) return reject(`The Origin of the Path of the Book Is Not Allowed.`); let RootFile; switch(B.Type) { case 'EPUB': RootFile = B.Container; break; // Online EPUB - case 'Zine': RootFile = B.ZineData ; break; // Online Zine + case 'Zine': RootFile = B.ZineData; break; // Online Zine } const initialize_as = (FileOrFolder) => ({ Promised: ( @@ -467,14 +676,14 @@ L.initializeBook = (Par) => new Promise((resolve, reject) => { resolve(`${ B.Type} ${ FileOrFolder }`); }).catch(ErrorDetail => { if(ErrorDetail.BookTypeError) return reject(ErrorDetail.BookTypeError); - O.log(`Failed to Open as ${ B.Type } ${ FileOrFolder }.` + '\n' + `... ${ ErrorDetail }`); + O.log(`Failed to Open as ${ B.Type } ${ FileOrFolder }: ${ ErrorDetail }`); return Promise.reject(); }), or: function(fun) { return this.Promised.catch(ErrorDetail => fun(ErrorDetail)); }, or_reject: function(Msg) { return this.or(() => reject(Msg)); } }); O.isToBeExtractedIfNecessary(B.Path) - ? initialize_as('File').or(() => initialize_as('Folder').or_reject(`Failed to Open Both as ${ B.Type } File and ${ B.Type } Folder.` )) + ? initialize_as('File').or(() => initialize_as('Folder').or_reject(`(Both as ${ B.Type } File/Folder)`)) : initialize_as('Folder').or_reject(`Changing "extract-if-necessary" May Be Required to Open This Book as ${ B.Type } File.`); } else { let FileOrData; @@ -535,25 +744,20 @@ L.initializeBook = (Par) => new Promise((resolve, reject) => { return InitializedAs; })).catch(Log => { //if(S['accept-local-file']) O.HTML.classList.add('waiting-file'); - const Message = `Failed to Open the Book.`; - O.error(Message + '\n* ' + Log); - return Promise.reject(Message); + O.error(`Failed to Open the Book:` + '\n' + Log); }); L.loadContainer = () => O.openDocument(B.Container).then(L.loadContainer.process).then(() => E.dispatch('bibi:loaded-container')); - L.loadContainer.process = (Doc) => { - B.Package.Path = Doc.getElementsByTagName('rootfile')[0].getAttribute('full-path'); - B.Package.Dir = B.Package.Path.replace(/\/?[^\/]+$/, ''); - }; + L.loadContainer.process = (Doc) => B.Package.Path = Doc.getElementsByTagName('rootfile')[0].getAttribute('full-path'); L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then(() => E.dispatch('bibi:loaded-package-document')); L.loadPackage.process = (Doc) => { // This is Used also from the Zine Extention. const _Package = Doc.getElementsByTagName('package' )[0]; - const _Metadata = Doc.getElementsByTagName('metadata')[0], Metadata = B.Package.Metadata = {};// = { 'identifier': [], 'title': [], 'creator': [], 'publisher': [], 'language': [] }; + const _Metadata = Doc.getElementsByTagName('metadata')[0], Metadata = B.Package.Metadata; const _Manifest = Doc.getElementsByTagName('manifest')[0], Manifest = B.Package.Manifest; const _Spine = Doc.getElementsByTagName('spine' )[0], Spine = B.Package.Spine; const _ItemPaths = {}; @@ -595,6 +799,7 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then // ================================================================================ // MANIFEST // -------------------------------------------------------------------------------- + const PackageDir = B.Package.Path.replace(/\/?[^\/]+$/, ''); sML.forEach(_Manifest.getElementsByTagName('item'))(_Item => { let Item = { 'id': _Item.getAttribute('id'), @@ -602,7 +807,7 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then 'media-type': _Item.getAttribute('media-type') }; if(!Item['id'] || !Item['href'] || (!Item['media-type'] && B.Type == 'EPUB')) return false; - Item.Path = O.getPath(B.Package.Dir, Item['href']); + Item.Path = O.getPath(PackageDir, Item['href']); if(Manifest.Items[Item.Path]) Item = sML.edit(Manifest.Items[Item.Path], Item); if(!Item.Content) Item.Content = ''; let Properties = _Item.getAttribute('properties'); @@ -616,6 +821,12 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then Manifest.Items[Item.Path] = Item; _ItemPaths[Item['id']] = Item.Path; }); + [B.Container, B.Package].forEach(MetaItem => { + if(!MetaItem) return; + const MetaItemPath = MetaItem.Path; + (Item => ['Path', 'Content', 'DataType'].forEach(Pro => { Item[Pro] = undefined; delete Item[Pro]; }))(Manifest.Items[MetaItemPath]); + delete Manifest.Items[MetaItemPath]; + }); // ================================================================================ // SPINE // -------------------------------------------------------------------------------- @@ -632,7 +843,7 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then let SpreadBefore, SpreadAfter; if(B.PPD == 'rtl') SpreadBefore = 'right', SpreadAfter = 'left'; else SpreadBefore = 'left', SpreadAfter = 'right'; - Spine.SpreadsDocumentFragment = document.createDocumentFragment(); + const SpreadsDocumentFragment = document.createDocumentFragment(); sML.forEach(_Spine.getElementsByTagName('itemref'))(_ItemRef => { const ItemRef = { 'idref': _ItemRef.getAttribute('idref') @@ -703,7 +914,7 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then case SpreadAfter: Spread.Box.classList.add('single-item-spread-after' ); break; } } - R.Spreads.push(Spine.SpreadsDocumentFragment.appendChild(Spread.Box).appendChild(Spread)); + R.Spreads.push(SpreadsDocumentFragment.appendChild(Spread.Box).appendChild(Spread)); } Item.IndexInSpread = Spread.Items.length; Spread.Items.push(Item); @@ -722,7 +933,7 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then } } }); - R.Main.Book.appendChild(B.Package.Spine.SpreadsDocumentFragment); + R.Main.Book.appendChild(SpreadsDocumentFragment); // -------------------------------------------------------------------------------- B.FileDigit = (Spine.Items.length + '').length; // ================================================================================ @@ -743,11 +954,6 @@ L.loadPackage = () => O.openDocument(B.Package).then(L.loadPackage.process).then : /^(mo?n)$/.test(B.Language) ? 'tb-lr' : 'lr-tb'; B.AllowPlaceholderItems = (B.ExtractionPolicy != 'at-once' && Metadata['rendition:layout'] == 'pre-paginated'); - [B.Container.Path, B.Package.Path].forEach(Path => { - const Item = B.Package.Manifest.Items[Path]; - delete Item.Path, delete Item.Content, delete Item.DataType; - delete B.Package.Manifest.Items[Path]; - }); // ================================================================================ E.dispatch('bibi:processed-package'); }; @@ -873,7 +1079,7 @@ L.coordinateLinkages = (BasePath, RootElement, InNav) => { A.setAttribute('data-bibi-original-href', HrefPathInSource); A.setAttribute(HrefAttribute, B.Path + '/' + HrefPath); A.InNav = InNav; - A.Destination = { Item: Item }; + A.Destination = { ItemIndex: Item.Index }; // not IIPP. ElementSelector may be added. if(Item.Ref['rendition:layout'] == 'pre-paginated') A.Destination.PageIndexInItem = 0; else if(HrefHash) A.Destination.ElementSelector = '#' + HrefHash; L.coordinateLinkages.setJump(A); @@ -896,7 +1102,7 @@ L.coordinateLinkages = (BasePath, RootElement, InNav) => { }); } } - if(InNav && typeof S['nav'] == (i + 1) && A.Destination) S['to'] = A.Destination; + if(InNav && R.StartOn && R.StartOn.Nav == (i + 1) && A.Destination) R.StartOn = A.Destination; } }; @@ -910,7 +1116,7 @@ L.coordinateLinkages = (BasePath, RootElement, InNav) => { } if(!L.Waiting) return false; if(S['start-in-new-window']) return L.openNewWindow(location.href + (location.hash ? ',' : '#') + 'jo(nav:' + A.NavANumber + ')'); - S['to'] = A.Destination; + R.StartOn = A.Destination; L.play(); }); return false; @@ -1680,7 +1886,7 @@ R.layOut = (Opt) => new Promise((resolve, reject) => { if(!Opt.NoNotification) I.note(`Laying out...`); if(!Opt.Destination) { const CurrentPage = I.PageObserver.Current.List.length ? I.PageObserver.Current.List[0].Page : R.Pages[0]; - Opt.Destination = { SpreadIndex: CurrentPage.Spread.Index, PageProgressInSpread: CurrentPage.IndexInSpread / CurrentPage.Spread.Pages.length } + Opt.Destination = { Item: CurrentPage.Item, PageProgressInItem: CurrentPage.IndexInItem / CurrentPage.Item.Pages.length }; } if(Opt.Setting) S.update(Opt.Setting); const Layout = {}; ['reader-view-mode', 'spread-layout-direction', 'apparent-reading-direction'].forEach(Pro => Layout[Pro] = S[Pro]); @@ -1767,7 +1973,7 @@ R.changeView = (Par, Opt = {}) => { }); L.play(); } - if(S['keep-settings']) O.Biscuits.memorize('Book', { 'RVM': Par.Mode }); + if(S['keep-settings']) O.Biscuits.memorize('Book', { RVM: Par.Mode }); }; @@ -1781,32 +1987,32 @@ R.focusOn = (Par) => new Promise((resolve, reject) => { if(R.Moving) return reject(); if(!Par) return reject(); if(typeof Par == 'number') Par = { Destination: Par }; - Par.Destination = R.hatchDestination(Par.Destination); - if(!Par.Destination) return reject(); + const _ = Par.Destination = R.hatchDestination(Par.Destination); + if(!_) return reject(); E.dispatch('bibi:is-going-to:focus-on', Par); R.Moving = true; Par.FocusPoint = 0; if(S['book-rendition-layout'] == 'reflowable') { - if(typeof Par.Destination.Point == 'number') { - Par.FocusPoint = Par.Destination.Point; + if(typeof _.Point == 'number') { + Par.FocusPoint = _.Point; } else { - Par.FocusPoint = O.getElementCoord(Par.Destination.Page)[C.L_AXIS_L]; - if(Par.Destination.Side == 'after') Par.FocusPoint += (Par.Destination.Page['offset' + C.L_SIZE_L] - R.Stage[C.L_SIZE_L]) * C.L_AXIS_D; - if(S.SLD == 'rtl') Par.FocusPoint += Par.Destination.Page.offsetWidth; + Par.FocusPoint = O.getElementCoord(_.Page)[C.L_AXIS_L]; + if(_.Side == 'after') Par.FocusPoint += (_.Page['offset' + C.L_SIZE_L] - R.Stage[C.L_SIZE_L]) * C.L_AXIS_D; + if(S.SLD == 'rtl') Par.FocusPoint += _.Page.offsetWidth; } if(S.SLD == 'rtl') Par.FocusPoint -= R.Stage.Width; } else { - if(S['allow-placeholders'] && Par.Turn != false) R.turnSpreads({ Origin: Par.Destination.Page.Spread }); - if(R.Stage[C.L_SIZE_L] >= Par.Destination.Page.Spread['offset' + C.L_SIZE_L]) { - Par.FocusPoint = O.getElementCoord(Par.Destination.Page.Spread)[C.L_AXIS_L]; - Par.FocusPoint -= Math.floor((R.Stage[C.L_SIZE_L] - Par.Destination.Page.Spread['offset' + C.L_SIZE_L]) / 2); + if(S['allow-placeholders'] && Par.Turn != false) R.turnSpreads({ Origin: _.Page.Spread }); + if(R.Stage[C.L_SIZE_L] >= _.Page.Spread['offset' + C.L_SIZE_L]) { + Par.FocusPoint = O.getElementCoord(_.Page.Spread)[C.L_AXIS_L]; + Par.FocusPoint -= Math.floor((R.Stage[C.L_SIZE_L] - _.Page.Spread['offset' + C.L_SIZE_L]) / 2); } else { - Par.FocusPoint = O.getElementCoord(Par.Destination.Page)[C.L_AXIS_L]; - if(R.Stage[C.L_SIZE_L] > Par.Destination.Page['offset' + C.L_SIZE_L]) Par.FocusPoint -= Math.floor((R.Stage[C.L_SIZE_L] - Par.Destination.Page['offset' + C.L_SIZE_L]) / 2); - else if(Par.Destination.Side == 'after') Par.FocusPoint += (Par.Destination.Page['offset' + C.L_SIZE_L] - R.Stage[C.L_SIZE_L]) * C.L_AXIS_D; + Par.FocusPoint = O.getElementCoord(_.Page)[C.L_AXIS_L]; + if(R.Stage[C.L_SIZE_L] > _.Page['offset' + C.L_SIZE_L]) Par.FocusPoint -= Math.floor((R.Stage[C.L_SIZE_L] - _.Page['offset' + C.L_SIZE_L]) / 2); + else if(_.Side == 'after') Par.FocusPoint += (_.Page['offset' + C.L_SIZE_L] - R.Stage[C.L_SIZE_L]) * C.L_AXIS_D; } } - if(typeof Par.Destination.TextNodeIndex == 'number') R.selectTextLocation(Par.Destination); // Colorize Destination with Selection + if(typeof _.TextNodeIndex == 'number') R.selectTextLocation(_); // Colorize Destination with Selection const ScrollTarget = { Frame: R.Main, X: 0, Y: 0 }; ScrollTarget[C.L_AXIS_L] = Par.FocusPoint; if(!S['use-full-height'] && S.RVM == 'vertical') ScrollTarget.Y -= I.Menu.Height; return sML.scrollTo(ScrollTarget, { @@ -1815,74 +2021,76 @@ R.focusOn = (Par) => new Promise((resolve, reject) => { Easing: (Pos) => (Pos === 1) ? 1 : Math.pow(2, -10 * Pos) * -1 + 1 }).then(() => { R.Moving = false; - resolve(Par.Destination); + resolve(_); E.dispatch('bibi:focused-on', Par); - //console.log(`FOCUSED`); }); }).catch(() => Promise.resolve()); - R.hatchDestination = (Dest) => { - if(!Dest) return null; + R.hatchDestination = (_) => { + if(!_) return null; if( - (Dest.Element || Dest.ElementSelector) + (_.Element || _.ElementSelector) && S.BRL == 'reflowable' && (S.SLA == 'vertical' && /-tb$/.test(B.WritingMode) || S.SLA == 'horizontal' && /^tb-/.test(B.WritingMode)) ) { - Dest.Point = R.hatchPoint(Dest); - return Dest; + _.Point = R.hatchPoint(_); + return _; } - delete Dest.Point; - if(Dest.Page) { - if(R.Pages[Dest.Page.Index] != Dest.Page) delete Dest.Page; // Pages of the Item have been replaced. - else return Dest; + delete _.Point; + if(_.Page) { + if(R.Pages[_.Page.Index] != _.Page) delete _.Page; // Pages of the Item have been replaced. + else return _; } - if(typeof Dest == 'number' || (typeof Dest == 'string' && /^\d+$/.test(Dest))) { - Dest = R.getBibiToDestination(Dest); - } else if(typeof Dest == 'string') { - if(Dest == 'head' || Dest == 'foot') Dest = { Edge: Dest }; - else if(X['EPUBCFI']) Dest = X['EPUBCFI'].getDestination(Dest); - } else if(typeof Dest.IndexInItem == 'number') { - if(R.Pages[Dest.Index] == Dest) return { Page: Dest }; // Page (If Pages of the Item have not been replaced) - } else if(typeof Dest.Index == 'number') { - return { Page: Dest.Pages[0] }; // Item or Spread - } else if(Dest.tagName) { - Dest = { Element: Dest }; + if(typeof _ == 'number' || (typeof _ == 'string' && /^\d+$/.test(_))) { + return { Page: R.Items[_].Pages[0] }; + } else if(typeof _ == 'string') { + if(_ == 'head' || _ == 'foot') _ = { Edge: _ }; + else if(X['EPUBCFI']) _ = X['EPUBCFI'].getDestination(_); + } else if(typeof _.IndexInItem == 'number') { + if(R.Pages[_.Index] == _) return { Page: _ }; // Page (If Pages of the Item have not been replaced) + } else if(typeof _.Index == 'number') { + return { Page: _.Pages[0] }; // Item or Spread + } else if(_.tagName) { + _ = { Element: _ }; } - Dest.Page = R.hatchPage(Dest); - return Dest; + _.Page = R.hatchPage(_); + return _; }; - R.hatchPage = (Dest) => { - if(Dest.Page) return Dest.Page; - if(Dest.Edge == 'head') return R.Pages[0]; - if(Dest.Edge == 'foot') return R.Pages[R.Pages.length - 1]; - if(typeof Dest.PageIndex == 'number') return R.Pages[Dest.PageIndex]; - if(typeof Dest.PageProgressInSpread != 'number' && typeof Dest.SpreadIndex != 'number' && !Dest.Spread && typeof Dest['SI-PPiS'] == 'string') [Dest.SpreadIndex, Dest.PageProgressInSpread] = Dest['SI-PPiS'].split('-').map(Num => Num * 1); + R.hatchPage = (_) => { + if(_.Page) return _.Page; + if(_.Edge == 'head') return R.Pages[0]; + if(_.Edge == 'foot') return R.Pages[R.Pages.length - 1]; + if(typeof _.PageIndex == 'number') return R.Pages[_.PageIndex]; + if(typeof _.BibiTo == 'string' && _.BibiTo) Object.assign(_, R.getBibiToDestination(_.BibiTo)); + if(typeof _.IIPP == 'number' && ((typeof _.PageIndexInItem != 'number' && typeof _.PageProgressInItem != 'number') || (typeof _.ItemIndex != 'number' && !_.Item ))) _.ItemIndex = Math.floor(_.IIPP), _.PageProgressInItem = _.IIPP - _.ItemIndex; + if(typeof _.SIPP == 'number' && ((typeof _.PageIndexInSpread != 'number' && typeof _.PageProgressInSpread != 'number') || (typeof _.SpreadIndex != 'number' && !_.Spread))) _.SpreadIndex = Math.floor(_.SIPP), _.PageProgressInSpread = _.SIPP - _.SpreadIndex; try { - if(typeof Dest.PageIndexInItem == 'number') return R.hatchItem(Dest).Pages[Dest.PageIndexInItem]; - if(typeof Dest.PageIndexInSpread == 'number') return R.hatchSpread(Dest).Pages[Dest.PageIndexInSpread]; - if(typeof Dest.PageProgressInSpread == 'number') return (DestSpread => DestSpread.Pages[Math.floor(DestSpread.Pages.length * Dest.PageProgressInSpread)])(R.hatchSpread(Dest)); - if(typeof Dest.ElementSelector == 'string') { Dest.Element = R.hatchItem(Dest).contentDocument.querySelector(Dest.ElementSelector); delete Dest.ElementSelector; } - if(Dest.Element) return R.hatchNearestPageOfElement(Dest.Element); - return (R.hatchItem(Dest) || R.hatchSpread(Dest)).Pages[0]; - } catch(_) {} + if(typeof _.PageIndexInItem == 'number') return R.hatchItem(_).Pages[_.PageIndexInItem]; + if(typeof _.PageIndexInSpread == 'number') return R.hatchSpread(_).Pages[_.PageIndexInSpread]; + if(typeof _.PageProgressInItem == 'number') return (_Item => _Item.Pages[sML.limitMax(Math.floor( _Item.Pages.length * _.PageProgressInItem ), _Item.Pages.length - 1)])(R.hatchItem( _)); + if(typeof _.PageProgressInSpread == 'number') return (_Spread => _Spread.Pages[sML.limitMax(Math.floor(_Spread.Pages.length * _.PageProgressInSpread), _Spread.Pages.length - 1)])(R.hatchSpread(_)); + if(typeof _.ElementSelector == 'string') { _.Element = R.hatchItem(_).contentDocument.querySelector(_.ElementSelector); delete _.ElementSelector; } + if(_.Element) return R.hatchNearestPageOfElement(_.Element); + return (R.hatchItem(_) || R.hatchSpread(_)).Pages[0]; + } catch(Err) {} return null; }; - R.hatchItem = (Dest) => { - if(Dest.Item) return Dest.Item; - if(typeof Dest.ItemIndex == 'number') return R.Items[Dest.ItemIndex]; - if(typeof Dest.ItemIndexInSpine == 'number') return B.Package.Spine.Items[Dest.ItemIndexInSpine]; - if(typeof Dest.ItemIndexInSpread == 'number') try { return R.hatchSpread(Dest).Items[Dest.ItemIndexInSpread]; } catch(_) { return null; } - //if(Dest.Element && Dest.Element.ownerDocument.body.Item && Dest.Element.ownerDocument.body.Item.Pages) return Dest.Element.ownerDocument.body.Item; + R.hatchItem = (_) => { + if(_.Item) return _.Item; + if(typeof _.ItemIndex == 'number') return R.Items[_.ItemIndex]; + if(typeof _.ItemIndexInSpine == 'number') return B.Package.Spine.Items[_.ItemIndexInSpine]; + if(typeof _.ItemIndexInSpread == 'number') try { return R.hatchSpread(_).Items[_.ItemIndexInSpread]; } catch(_) { return null; } + //if(_.Element && _.Element.ownerDocument.body.Item && _.Element.ownerDocument.body.Item.Pages) return _.Element.ownerDocument.body.Item; return null; }; - R.hatchSpread = (Dest) => { - if(Dest.Spread) return Dest.Spread; - if(typeof Dest.SpreadIndex == 'number') return R.Spreads[Dest.SpreadIndex]; + R.hatchSpread = (_) => { + if(_.Spread) return _.Spread; + if(typeof _.SpreadIndex == 'number') return R.Spreads[_.SpreadIndex]; return null; }; @@ -1913,10 +2121,10 @@ R.focusOn = (Par) => new Promise((resolve, reject) => { return NearestPage; }; - R.hatchPoint = (Dest) => { + R.hatchPoint = (_) => { try { - if(typeof Dest.ElementSelector == 'string') { Dest.Element = R.hatchItem(Dest).contentDocument.querySelector(Dest.ElementSelector); delete Dest.ElementSelector; } - if(Dest.Element) return R.hatchPointOfElement(Dest.Element); + if(typeof _.ElementSelector == 'string') { _.Element = R.hatchItem(_).contentDocument.querySelector(_.ElementSelector); delete _.ElementSelector; } + if(_.Element) return R.hatchPointOfElement(_.Element); } catch(_) {} return null; }; @@ -1949,24 +2157,24 @@ R.getBibiToDestination = (BibitoString) => { }; -R.selectTextLocation = (Dest) => { - if(typeof Dest.TextNodeIndex != 'number' || !Dest.Element) return false; - const DestNode = Dest.Element.childNodes[Dest.TextNodeIndex]; - if(!DestNode || !DestNode.textContent) return; - const Sides = { Start: { Node: DestNode, Index: 0 }, End: { Node: DestNode, Index: DestNode.textContent.length } }; - if(Dest.TermStep) { - if(Dest.TermStep.Preceding || Dest.TermStep.Following) { - Sides.Start.Index = Dest.TermStep.Index, Sides.End.Index = Dest.TermStep.Index; - if(Dest.TermStep.Preceding) Sides.Start.Index -= Dest.TermStep.Preceding.length; - if(Dest.TermStep.Following) Sides.End.Index += Dest.TermStep.Following.length; - if(Sides.Start.Index < 0 || DestNode.textContent.length < Sides.End.Index) return; - if(DestNode.textContent.substr(Sides.Start.Index, Sides.End.Index - Sides.Start.Index) != Dest.TermStep.Preceding + Dest.TermStep.Following) return; - } else if(Dest.TermStep.Side && Dest.TermStep.Side == 'a') { - Sides.Start.Node = DestNode.parentNode.firstChild; while(Sides.Start.Node.childNodes.length) Sides.Start.Node = Sides.Start.Node.firstChild; - Sides.End.Index = Dest.TermStep.Index - 1; +R.selectTextLocation = (_) => { + if(typeof _.TextNodeIndex != 'number' || !_.Element) return false; + const _Node = _.Element.childNodes[_.TextNodeIndex]; + if(!_Node || !_Node.textContent) return; + const Sides = { Start: { Node: _Node, Index: 0 }, End: { Node: _Node, Index: _Node.textContent.length } }; + if(_.TermStep) { + if(_.TermStep.Preceding || _.TermStep.Following) { + Sides.Start.Index = _.TermStep.Index, Sides.End.Index = _.TermStep.Index; + if(_.TermStep.Preceding) Sides.Start.Index -= _.TermStep.Preceding.length; + if(_.TermStep.Following) Sides.End.Index += _.TermStep.Following.length; + if(Sides.Start.Index < 0 || _Node.textContent.length < Sides.End.Index) return; + if(_Node.textContent.substr(Sides.Start.Index, Sides.End.Index - Sides.Start.Index) != _.TermStep.Preceding + _.TermStep.Following) return; + } else if(_.TermStep.Side && _.TermStep.Side == 'a') { + Sides.Start.Node = _Node.parentNode.firstChild; while(Sides.Start.Node.childNodes.length) Sides.Start.Node = Sides.Start.Node.firstChild; + Sides.End.Index = _.TermStep.Index - 1; } else { - Sides.Start.Index = Dest.TermStep.Index; - Sides.End.Node = DestNode.parentNode.lastChild; while(Sides.End.Node.childNodes.length) Sides.End.Node = Sides.End.Node.lastChild; + Sides.Start.Index = _.TermStep.Index; + Sides.End.Node = _Node.parentNode.lastChild; while(Sides.End.Node.childNodes.length) Sides.End.Node = Sides.End.Node.lastChild; Sides.End.Index = Sides.End.Node.textContent.length; } } @@ -1997,7 +2205,7 @@ R.moveBy = (Par) => new Promise((resolve, reject) => { Par.Distance > 0 && CurrentPage.IndexInItem == CurrentItem.Pages.length - 1 ) { let Side = Par.Distance > 0 ? 'before' : 'after'; - if(Current.PageIntersectionStatus.Oversize) { + if(Current.PageIntersectionStatus.Oversized) { if(Par.Distance > 0) { if(Current.PageIntersectionStatus.Entering) Par.Distance = 0, Side = 'before'; else if(Current.PageIntersectionStatus.Headed ) Par.Distance = 0, Side = 'after'; @@ -2258,7 +2466,7 @@ I.PageObserver = { create: () => { else if(FC_B == PC_B ) IntersectionStatus.Headed = true; else if( PC_A == FC_A) IntersectionStatus.Footed = true; else if( PC_A < FC_A) IntersectionStatus.Passing = true; - if(R.Main['offset' + L] < Coord[C.L_SIZE_L]) IntersectionStatus.Oversize = true; + if(R.Main['offset' + L] < Coord[C.L_SIZE_L]) IntersectionStatus.Oversized = true; } } return IntersectionStatus; @@ -2281,19 +2489,27 @@ I.PageObserver = { create: () => { E.bind(['bibi:changed-intersection', 'bibi:scrolled'], PageObserver.updateCurrent); }, // ---- PageChange - Past: { Pages: [] }, + Past: { List: [{ Page: null, PageIntersectionStatus: null }] }, observePageMove: () => { E.bind('bibi:scrolled', () => { - const CurrentStartPage = PageObserver.Current.Pages[0], CurrentEndPage = PageObserver.Current.Pages.slice(-1)[0]; - if(CurrentStartPage != PageObserver.Past.Pages[0] || CurrentEndPage != PageObserver.Past.Pages.slice(-1)[0]) { - E.dispatch('bibi:moved-page', { - PastPages: PageObserver.Past.Pages, - CurrentPages: PageObserver.Current.Pages, - OnTheFirstPage: (CurrentStartPage.Index == 0), - OnTheLastPage: (CurrentEndPage.Index == R.Pages.length - 1) - }); + const CS = PageObserver.Current.List[0], CE = PageObserver.Current.List.slice(-1)[0], CSP = CS.Page, CEP = CE.Page, CSPIS = CS.PageIntersectionStatus, CEPIS = CE.PageIntersectionStatus; + const PS = PageObserver.Past.List[0], PE = PageObserver.Past.List.slice(-1)[0], PSP = PS.Page, PEP = PE.Page; + const FPI = 0, LPI = R.Pages.length - 1; + let Flipped = false, AtTheBeginning = false, AtTheEnd = false; + if(CSP != PSP || CEP != PEP) { + Flipped = true; + if(CSP.Index == FPI && (CSPIS.Contained || CSPIS.Headed)) AtTheBeginning = true; + if(CEP.Index == LPI && (CEPIS.Contained || CEPIS.Footed)) AtTheEnd = true; + } else { + const PSPIS = PS.PageIntersectionStatus, PEPIS = PE.PageIntersectionStatus + if(CSP.Index == FPI && (CSPIS.Contained || CSPIS.Headed) && !(PSPIS.Contained || PSPIS.Headed)) AtTheBeginning = true; + if(CEP.Index == LPI && (CEPIS.Contained || CEPIS.Footed) && !(PEPIS.Contained || PEPIS.Footed)) AtTheEnd = true; } - PageObserver.Past.Pages = PageObserver.Current.Pages; + const ReturnValue = { Past: PageObserver.Past, Current: PageObserver.Current }; + if(Flipped ) E.dispatch('bibi:flipped', ReturnValue); + if(AtTheBeginning) E.dispatch('bibi:got-to-the-beginning', ReturnValue); + if(AtTheEnd ) E.dispatch('bibi:got-to-the-end', ReturnValue); + Object.assign(PageObserver.Past, PageObserver.Current); }); } } @@ -2906,6 +3122,7 @@ I.Veil = { create: () => { onopened: () => (O.HTML.classList.add('veil-opened'), Veil.classList.remove('closed')), onclosed: () => (Veil.classList.add('closed'), O.HTML.classList.remove('veil-opened')) }); + ['touchstart', 'pointerdown', 'mousedown', 'click'].forEach(EN => Veil.addEventListener(EN, Eve => Eve.stopPropagation(), E.Cpt0Psv0)); Veil.open(); const PlayButtonTitle = (O.TouchOS ? 'Tap' : 'Click') + ' to Open'; const PlayButton = Veil.PlayButton = Veil.appendChild( @@ -2931,7 +3148,7 @@ I.Veil = { create: () => { }}; -I.Catcher = { create: () => { if(S['book'] || S.BookDataElement || !S['accept-local-file']) return; +I.Catcher = { create: () => { if(B.Data || S['book'] || !S['accept-local-file']) return; const Catcher = I.Catcher = O.Body.appendChild(sML.create('div', { id: 'bibi-catcher' })); Catcher.insertAdjacentHTML('afterbegin', I.distillLabels.distillLanguage({ default: [ @@ -3112,7 +3329,7 @@ I.Menu = { create: () => { if(IsActive) O.HTML.classList.add( 'book-full-breadth'); else O.HTML.classList.remove('book-full-breadth'); if(S.RVM == 'horizontal' || S.RVM == 'vertical') R.changeView({ Mode: S.RVM, Force: true }); - if(S['keep-settings']) O.Biscuits.memorize('Book', { 'FBL': S['full-breadth-layout-in-scroll'] }); + if(S['keep-settings']) O.Biscuits.memorize('Book', { FBL: S['full-breadth-layout-in-scroll'] }); } }] }] @@ -3340,7 +3557,7 @@ I.FontSizeChanger = { create: () => { if(typeof Actions.before == 'function') Actions.before(); FontSizeChanger.Step = Step; if(S['use-font-size-changer'] && S['keep-settings']) { - O.Biscuits.memorize('Book', { 'FontSize': { 'Step': Step } }); + O.Biscuits.memorize('Book', { FontSize: { Step: Step } }); } setTimeout(() => { R.layOut({ @@ -3742,8 +3959,7 @@ I.History = { LastPage = R.hatchPage(I.History.List[I.History.List.length - 1]); if(CurrentPage != LastPage) { if(Opt.SumUp && I.History.List[I.History.List.length - 1].UI == Opt.UI) I.History.List.pop(); - const Spread = CurrentPage.Spread; - I.History.List.push({ UI: Opt.UI, Spread: Spread, PageProgressInSpread: CurrentPage.IndexInSpread / Spread.Pages.length }); + I.History.List.push({ UI: Opt.UI, Item: CurrentPage.Item, PageProgressInItem: CurrentPage.IndexInItem / CurrentPage.Item.Pages.length }); if(I.History.List.length - 1 > S['max-history']) { // Not count the first (oldest). const First = I.History.List.shift(); // The first (oldest) is the landing point. I.History.List.shift(); // Remove the second @@ -4086,7 +4302,7 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; delete BookmarkManager.initialize; }, exists: (Bookmark) => { - for(let l = BookmarkManager.Bookmarks.length, i = 0; i < l; i++) if(BookmarkManager.Bookmarks[i]['SI-PPiS'] == Bookmark['SI-PPiS']) return BookmarkManager.Bookmarks[i]; + for(let l = BookmarkManager.Bookmarks.length, i = 0; i < l; i++) if(BookmarkManager.Bookmarks[i].IIPP == Bookmark.IIPP) return BookmarkManager.Bookmarks[i]; return null; }, add: (Bookmark) => { @@ -4098,7 +4314,7 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; } else BookmarkManager.update(); }, remove: (Bookmark) => { - BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => Bmk['SI-PPiS'] != Bookmark['SI-PPiS']); + BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => Bmk.IIPP != Bookmark.IIPP); BookmarkManager.update({ Removed: Bookmark }); }, update: (Opt = {}) => { @@ -4107,31 +4323,53 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; BookmarkManager.ButtonGroup.Buttons = []; BookmarkManager.ButtonGroup.innerHTML = ''; } - //BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => Bmk['SI-PPiS'] && Bmk['%']); + //BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => typeof Bmk.IIPP == 'number' && typeof Bmk['%'] == 'number'); let Bookmark = null, ExistingBookmark = null; + if(typeof Opt.Bookmarks == 'object' && Opt.Bookmarks.map) BookmarkManager.Bookmarks = Opt.Bookmarks; if(Opt.Added) Bookmark = Opt.Added; else if(L.Opened) { I.PageObserver.updateCurrent(); const Page = I.PageObserver.Current.List[0].Page; Bookmark = { - 'SI-PPiS': Page.Spread.Index + '-' + (Page.IndexInSpread / Page.Spread.Pages.length), + IIPP: Page.Item.Index + Page.IndexInItem / Page.Item.Pages.length, '%': Math.floor((Page.Index + 1) / R.Pages.length * 100) // only for showing percentage in waiting status }; } if(BookmarkManager.Bookmarks.length) { - BookmarkManager.Bookmarks.forEach(Bmk => { - let Label = '', ClassName = ''; const BB = 'bibi-bookmark', Page = R.hatchPage({ 'SI-PPiS': Bmk['SI-PPiS'] }); - if(Page && typeof Page.Index == 'number') { - const PageNumber = Page.Index + 1; - Bmk['%'] = Math.floor(PageNumber / R.Pages.length * 100); + const UpdatedBookmarks = [] + for(let l = BookmarkManager.Bookmarks.length, i = 0; i < l; i++) { + let Bmk = BookmarkManager.Bookmarks[i]; + if(typeof Bmk == 'number') Bmk = { IIPP: Bmk }; + else if(!Bmk) continue; + else if(typeof Bmk.IIPP != 'number') { + if(Bmk.ItemIndex) Bmk.IIPP = Bmk.ItemIndex + (Bmk.PageProgressInItem ? Bmk.PageProgressInItem : 0); + else if(B.Package.Metadata['rendition:layout'] == 'pre-paginated') { + if(typeof Bmk.PageNumber == 'number') Bmk.PageIndex = Bmk.PageNumber - 1; + if(typeof Bmk.PageIndex == 'number') Bmk.IIPP = Bmk.PageIndex; + } + } + if(typeof Bmk.IIPP != 'number') continue; + if(/^\d+(\.\d+)?$/.test(Bmk['%'])) Bmk['%'] *= 1; else delete Bmk['%']; + let Label = '', ClassName = ''; + const BB = 'bibi-bookmark'; + const Page = R.hatchPage(Bmk); + let PageNumber = 0; + if(Page && typeof Page.Index == 'number') PageNumber = Page.Index + 1; + else if(B.Package.Metadata['rendition:layout'] == 'pre-paginated') PageNumber = Math.floor(Bmk.IIPP) + 1; + if(PageNumber) { Label += `P.${ PageNumber }`; - Label += `/${ R.Pages.length }`; - Label += ` (${ Bmk['%'] }%)`; - } else { - Label += `` + `${ Bmk['%'] }%` + ``; + if(R.Pages.length) { + if(PageNumber > R.Pages.length) continue; + Label += `/${ R.Pages.length }`; + Bmk['%'] = Math.floor(PageNumber / R.Pages.length * 100); + } + } + if(typeof Bmk['%'] == 'number') { + if(Label) Label += ` (${ Bmk['%'] }%)`; + else Label += `` + `${ Bmk['%'] }%` + ``; } - const Labels = { default: { default: Label, ja: Label } }; - if(Bookmark && Bmk['SI-PPiS'] == Bookmark['SI-PPiS']) { + const Labels = Label ? { default: { default: Label, ja: Label } } : { default: { default: `Bookmark #${ UpdatedBookmarks.length + 1 }`, ja: `しおり #${ UpdatedBookmarks.length + 1 }` } }; + if(Bookmark && Bmk.IIPP == Bookmark.IIPP) { ExistingBookmark = Bmk; ClassName = `bibi-button-bookmark-is-current`; Labels.default.default += ` `; @@ -4146,8 +4384,8 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; action: () => { if(L.Opened) return R.focusOn({ Destination: Bmk }).then(Destination => I.History.add({ UI: BookmarkManager, SumUp: false/*true*/, Destination: Destination })); if(!L.Waiting) return false; - if(S['start-in-new-window']) return L.openNewWindow(location.href + (location.hash ? ',' : '#') + 'jo(si-ppis:' + Bmk['SI-PPiS'] + ')'); - S['to'] = { 'SI-PPiS': Bmk['SI-PPiS'] }; + if(S['start-in-new-window']) return L.openNewWindow(location.href + (location.hash ? ',' : '#') + 'jo(iipp:' + Bmk.IIPP + ')'); + R.StartOn = { IIPP: Bmk.IIPP }; L.play(); }, remove: () => BookmarkManager.remove(Bmk) @@ -4170,7 +4408,11 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; } else if(ExistingBookmark == Bmk) I.setUIState(Button, 'disabled'); else I.setUIState(Button, 'default'); - }); + const UpdatedBookmark = { IIPP: Bmk.IIPP }; + if(Bmk['%']) UpdatedBookmark['%'] = Bmk['%']; + UpdatedBookmarks.push(UpdatedBookmark); + } + BookmarkManager.Bookmarks = UpdatedBookmarks; } else { if(!L.Opened) BookmarkManager.Subpanel.Opener.ButtonGroup.style.display = 'none'; } @@ -4186,7 +4428,8 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; I.setUIState(BookmarkManager.AddButton, 'disabled'); } } - O.Biscuits.memorize('Book', { 'Bookmarks': BookmarkManager.Bookmarks.map(Bmk => ({ 'SI-PPiS': Bmk['SI-PPiS'], '%': Bmk['%'] })) }); + O.Biscuits.memorize('Book', { Bookmarks: BookmarkManager.Bookmarks }); + E.dispatch('bibi:updated-bookmarks', BookmarkManager.Bookmarks); }, }; BookmarkManager.initialize(); @@ -4682,72 +4925,45 @@ export const P = {}; // Bibi.Preset Bibi.preset = (Preset) => { - sML.applyRtL(P, Preset, 'ExceptFunctions'); + Bibi.applyFilteredSettingsTo(P, Preset, [Bibi.SettingTypes, Bibi.SettingTypes_PresetOnly], 'Fill'); + delete P['book']; P.Script = document.getElementById('bibi-preset'); }; -P.initialize = (Preset) => { - O.SettingTypes['boolean'].concat(O.SettingTypes_PresetOnly['boolean']).forEach(PropertyName => { - if(P[PropertyName] !== true) P[PropertyName] = false; - }); - O.SettingTypes['yes-no'].concat(O.SettingTypes_PresetOnly['yes-no']).forEach(PropertyName => { - if(typeof P[PropertyName] == 'string') P[PropertyName] = /^(yes|no|mobile|desktop)$/.test(P[PropertyName]) ? P[PropertyName] : 'no'; - else P[PropertyName] = P[PropertyName] ? 'yes' : 'no'; - }); - O.SettingTypes['string'].concat(O.SettingTypes_PresetOnly['string']).forEach(PropertyName => { - if(typeof P[PropertyName] != 'string') P[PropertyName] = ''; - }); - O.SettingTypes['integer'].concat(O.SettingTypes_PresetOnly['integer']).forEach(PropertyName => { - P[PropertyName] = (typeof P[PropertyName] != 'number' || P[PropertyName] < 0) ? 0 : Math.round(P[PropertyName]); - }); - O.SettingTypes['number'].concat(O.SettingTypes_PresetOnly['number']).forEach(PropertyName => { - if(typeof P[PropertyName] != 'number') P[PropertyName] = 0; - }); - O.SettingTypes['array'].concat(O.SettingTypes_PresetOnly['array']).forEach(PropertyName => { - if(!(P[PropertyName] instanceof Array)) P[PropertyName] = []; - }); +P.initialize = () => { if(!/^(horizontal|vertical|paged)$/.test(P['reader-view-mode'])) P['reader-view-mode'] = 'paged'; - P['bookshelf'] = (!P['bookshelf'] || typeof P['bookshelf'] != 'string') ? '' : new URL(P['bookshelf'], P.Script.src).href; - P['extensions'] = !(P['extensions'] instanceof Array) ? [] : P['extensions'].filter(Xtn => { - if(Xtn.hasOwnProperty('-spell-of-activation-') && (!Xtn['-spell-of-activation-'] || typeof Xtn['-spell-of-activation-'] != 'string' || !U.hasOwnProperty(Xtn['-spell-of-activation-']))) return false; - if(!Xtn || !Xtn['src'] || typeof Xtn['src'] != 'string') return false; - return (Xtn['src'] = new URL(Xtn['src'], P.Script.src).href); - }); -}; - - - -//============================================================================================================================================== -//---------------------------------------------------------------------------------------------------------------------------------------------- - -//-- HTML-Defined Settings - -//---------------------------------------------------------------------------------------------------------------------------------------------- - - -export const H = {}; - - -H.initialize = () => { - const Extensions = document.getElementById('bibi-script').getAttribute('data-bibi-extensions') - const Bookshelf = document.getElementById('bibi-preset').getAttribute('data-bibi-bookshelf'); - const Book = O.Body.getAttribute('data-bibi-book'); - if(Bookshelf ) H['bookshelf'] = new URL(Bookshelf, location.href.split('?')[0]).href; - if(Book ) H['book'] = Book; - const BookDataElement = document.getElementById('bibi-book-data'); - if(BookDataElement) { - if(BookDataElement.innerText.trim()) { - const BookDataMIMEType = BookDataElement.getAttribute('data-bibi-book-mimetype'); - if(typeof BookDataMIMEType == 'string' && /^application\/(epub\+zip|zip|x-zip(-compressed)?)$/i.test(BookDataMIMEType)) { - H.BookDataElement = BookDataElement; + const DocHref = location.href.split('?')[0]; + P['bookshelf'] = (() => { + const Bookshelf_HTML = document.getElementById('bibi-preset').getAttribute('data-bibi-bookshelf'); + return (Bookshelf_HTML ? new URL(Bookshelf_HTML, DocHref) : new URL(P['bookshelf'] || '../../bibi-bookshelf', P.Script.src)).href.replace(/\/$/, ''); + })(); + P['book'] = (() => { + if(!B.Data) { + const Book_HTML = O.Body.getAttribute('data-bibi-book'); + if(Book_HTML) { + delete U['book']; + return Book_HTML; } } - if(!H.BookDataElement) { - BookDataElement.innerHTML = ''; - BookDataElement.parentNode.removeChild(BookDataElement); + return ''; + })(); + P['extensions'] = (() => { + let Extensions_HTML = document.getElementById('bibi-preset').getAttribute('data-bibi-extensions'); + if(Extensions_HTML) { + Extensions_HTML = Extensions_HTML.trim().replace(/\s+/, ' ').split(' ').map(EPath => ({ src: new URL(EPath, DocHref).href })); + if(Extensions_HTML.length) P['extensions'] = Extensions_HTML; } - } + return !(P['extensions'] instanceof Array) ? [] : P['extensions'].filter(Xtn => { + if(Xtn.hasOwnProperty('-spell-of-activation-')) { + const SoA = Xtn['-spell-of-activation-']; + if(!SoA || !/^[a-zA-Z0-9_\-]+$/.test(SoA) || !U.hasOwnProperty(SoA)) return false; + } + if(!Xtn || !Xtn['src'] || typeof Xtn['src'] != 'string') return false; + return (Xtn['src'] = new URL(Xtn['src'], P.Script.src).href); + }); + })(); + delete P.initialize; }; @@ -4759,42 +4975,47 @@ H.initialize = () => { //---------------------------------------------------------------------------------------------------------------------------------------------- - -export const U = (LS => { - if(typeof LS != 'string') return {}; - LS = LS.replace(/^\?/, ''); - const Qs = {}; - LS.split('&').forEach(PnV => { - PnV = PnV.split('='); - if(/^[a-zA-Z0-9_\-]+$/.test(PnV[0])) Qs[PnV[0]] = PnV[1]; +export const U = (() => { + let Q = {}; + Q.translateData = (PnV) => { + let [_P, _V] = PnV; + switch(_P) { + case 'bbd': _P = 'bibidi'; break; + case 'paged': case 'horizontal': case 'vertical': _V = _P, _P = 'reader-view-mode'; break; + case 'view': case 'rvm': _P = 'reader-view-mode'; break; + case 'dppd': case 'default-ppd': _P = 'default-page-progression-direction'; break; + case 'pagination': _P = 'pagination-method'; break; + } + return [_P, _V]; + }; + const LS = location.search; + if(typeof LS != 'string') return Q; + LS.replace(/^\?/, '').split('&').forEach(PnV => { + let [_P, _V] = PnV.split('='); + if(!_V) _V = undefined; + switch(_P) { + case 'log': + if(!_V) _V = '1'; break; + case 'book': + if(!_V) return; + case 'zine': case 'wait': case 'debug': + if(!_V) _V = 'true'; break; + default: + [_P, _V] = Q.translateData([_P, _V]); + } + Q[_P] = _V; }); - if(Qs.hasOwnProperty('debug')) { - Bibi.Debug = true; - Qs['log'] = 9; - } - return Qs; -})(location.search); + Object.assign(Q, Bibi.applyFilteredSettingsTo({}, Q, [Bibi.SettingTypes, Bibi.SettingTypes_UserOnly])); + if(!Q['book']) delete Q['zine']; + if(Q['debug']) Bibi.Debug = true, Q['log'] = 9; + return Q; +})(); -U.initialize = () => { // formerly O.readExtras - if( U['book']) U['book'] = decodeURIComponent(U['book']).trim() || ''; - if(!U['book']) delete U['book']; - const HashData = U.parseHash(location.hash); - if(HashData['bibi']) { - U.importFromDataString(HashData['bibi']); - } - if(HashData['jo']) { - U.importFromDataString(HashData['jo']); - if(U['parent-origin'] && U['parent-origin'] != O.Origin) P['trustworthy-origins'].push(U['parent-origin']); - if(history.replaceState) history.replaceState(null, null, location.href.replace(/[\,#]jo\([^\)]*\)$/g, '')); - } - if(HashData['epubcfi']) { - U['epubcfi'] = HashData['epubcfi']; - E.add('bibi:readied', () => { if(X['EPUBCFI']) S['to'] = U['to'] = X['EPUBCFI'].getDestination(H['epubcfi']); }); - } -}; - - U.parseHash = (Hash) => { +U.initialize = () => { + const _U = Bibi.applyFilteredSettingsTo({}, U, [Bibi.SettingTypes, Bibi.SettingTypes_UserOnly]); + const HashData = (() => { + const Hash = location.hash; const Data = {}, ParREStr = '([a-z_]+)\\(([^\\(\\)]+)\\)'; if(typeof Hash != 'string') return Data; //if(!new RegExp('^#?' + ParREStr + '(,' + ParREStr + ')*$').test(Hash)) return Data; @@ -4805,75 +5026,42 @@ U.initialize = () => { // formerly O.readExtras Data[Label_KnV[1]] = Label_KnV[2]; }); return Data; - }; + })(); + if(HashData['bibi']) { + HashData['bibi'] = U.initialize.parseDataString(HashData['bibi']); + delete HashData['bibi']['book']; + _U['Bibi'] = Bibi.applyFilteredSettingsTo({}, HashData['bibi'], [Bibi.SettingTypes, Bibi.SettingTypes_UserOnly]); + Object.assign(_U, _U['Bibi']); + } + if(HashData['jo']) { + HashData['jo'] = U.initialize.parseDataString(HashData['jo']); + delete HashData['jo']['book']; + _U['Jo'] = Bibi.applyFilteredSettingsTo({}, HashData['jo'], [Bibi.SettingTypes, Bibi.SettingTypes_UserOnly]); + Object.assign(_U, _U['Jo']); + if(history.replaceState) history.replaceState(null, null, location.href.replace(/[\,#]jo\([^\)]*\)$/g, '')); + } + if(HashData['epubcfi']) { + U['epubcfi'] = HashData['epubcfi']; + E.add('bibi:readied', () => { if(X['EPUBCFI']) R.StartOn = X['EPUBCFI'].getDestination(H['epubcfi']); }); + } + _U['Query'] = {}; + for(const Pro in U) { + if(typeof U[Pro] != 'function') _U['Query'][Pro] = U[Pro]; + U[Pro] = undefined; delete U[Pro]; + } + Object.assign(U, _U); + if(typeof U['nav'] == 'number') U['nav'] < 1 ? delete U['nav'] : R.StartOn = { Nav: U['nav'] }; + else if(typeof U['iipp'] == 'number') R.StartOn = { IIPP: U['iipp'] }; +}; - U.importFromDataString = (DataString) => { + U.initialize.parseDataString = (DataString) => { + const Data = {}; if(typeof DataString != 'string') return false; DataString.replace(' ', '').split(',').forEach(PnV => { - PnV = PnV.split(':'); if(PnV.length != 2) return; - let _P = PnV[0], _V = PnV[1]; - switch(_P) { - case 'parent-title': - case 'parent-uri': - case 'parent-origin': - case 'parent-jo-path': - case 'parent-bibi-label': - case 'parent-holder-id': - _V = decodeURIComponent(_V.replace('_BibiKakkoClose_', ')').replace('_BibiKakkoOpen_', '(')); if(!_V) _V = ''; - break; //// - case 'to': - _V = R.getBibiToDestination(_V); if(!_V) return; - break; //// - case 'nav': - if(/^[1-9][0-9]*$/.test(_V)) _V *= 1; else return; - break; //// - case 'si-ppis': - if(/^\d+\-(0(\.\d+)*|1)$/.test(_V)) _V = { 'SI-PPiS': _V }; else return; - break; //// - case 'paged': case 'horizontal': case 'vertical': - _V = _P, _P = 'reader-view-mode'; - break; //// - case 'view': case 'rvm': case 'view-mode': - _P = 'reader-view-mode'; - case 'reader-view-mode': - _V = _V == 'p' ? 'paged' : _V == 'h' ? 'horizontal' : _V == 'v' ? 'vertical' : _V; - if(!/^(paged|horizontal|vertical)$/.test(_V)) return; - break; //// - case 'ppd': case 'default-ppd': - _P = 'default-page-progression-direction'; - case 'default-page-progression-direction': - if(!/^(ltr|rtl)$/.test(_V)) return; - break; //// - case 'pagination': - _P = 'pagination-method'; - case 'pagination-method': - if(_V != 'x') return; - break; //// - default: - if(O.SettingTypes['boolean'].concat(O.SettingTypes_UserOnly['boolean']).includes(_P)) { - if(_V == 'true' ) _V = true; - else if(_V == 'false') _V = false; - else return; - } else if(O.SettingTypes['yes-no'].concat(O.SettingTypes_UserOnly['yes-no']).includes(_P)) { - if(!/^(yes|no|mobile|desktop)$/.test(_V)) return; - } else if(O.SettingTypes['integer'].concat(O.SettingTypes_UserOnly['integer']).includes(_P)) { - if(/^(0|[1-9][0-9]*)$/.test(_V)) _V *= 1; else return; - } else if(O.SettingTypes['number'].concat(O.SettingTypes_UserOnly['number']).includes(_P)) { - if(/^(0|[1-9][0-9]*)(\.[0-9]+)?$/.test(_V)) _V *= 1; else return; - } else { - return; - } - } - if(!_P || typeof _V == 'undefined') return; - U[_P] = _V; + const DD = U.translateData(PnV.split(':')); + if(DD && typeof DD[1] != 'undefined') Data[DD[0]] = DD[1]; }); - if(U['si-ppis']) { - delete U['nav']; - U['to'] = U['si-ppis']; - } else if(U['nav']) { - delete U['to']; - } // Priority: to < nav < si-ppis - return U; + return Data; }; @@ -4890,20 +5078,19 @@ U.initialize = () => { // formerly O.readExtras export const S = {}; // Bibi.Settings -S.initialize = (before, after) => { - if(before) before(); - // -------- - for(const Property in S) if(typeof S[Property] != 'function') delete S[Property]; +S.initialize = () => { + for(const Pro in S) if(typeof S[Pro] != 'function') delete S[Pro]; sML.applyRtL(S, P, 'ExceptFunctions'); - sML.applyRtL(S, H, 'ExceptFunctions'); sML.applyRtL(S, U, 'ExceptFunctions'); - O.SettingTypes['yes-no'].concat(O.SettingTypes_PresetOnly['yes-no']).concat(O.SettingTypes_UserOnly['yes-no']).forEach(Property => { - S[Property] = (typeof S[Property] == 'string') ? (S[Property] == 'yes' || (S[Property] == 'mobile' && O.TouchOS) || (S[Property] == 'desktop' && !O.TouchOS)) : false; - }); + Bibi.SettingTypes['yes-no'].concat(Bibi.SettingTypes_PresetOnly['yes-no']).concat(Bibi.SettingTypes_UserOnly['yes-no']).forEach(Pro => S[Pro] = (S[Pro] == 'yes' || (S[Pro] == 'mobile' && O.TouchOS) || (S[Pro] == 'desktop' && !O.TouchOS))); + // -------- + if(!S['trustworthy-origins'].includes(O.Origin)) S['trustworthy-origins'].unshift(O.Origin); + // -------- + S['book'] = (!B.Data && typeof S['book'] == 'string' && S['book']) ? new URL(S['book'], S['bookshelf'] + '/').href : ''; + if(!B.Data && S['book'] && !S['trustworthy-origins'].includes(new URL(S['book']).origin)) O.error(`The Origin of the Path of the Book Is Not Allowed.`); + // -------- + if(typeof S['parent-bibi-index'] != 'number') delete S['parent-bibi-index']; // -------- - S['bookshelf'] = (typeof S['bookshelf'] == 'string' && S['bookshelf']) ? S['bookshelf'].replace(/\/$/, '') : ''; - S['book'] = (typeof S['book'] == 'string' && S['book'] ) ? new URL(S['book'], S['bookshelf'] + '/').href : ''; - B.Type = !S['book'] ? '' : U.hasOwnProperty('zine') ? 'Zine' : 'EPUB'; S['extract-if-necessary'] = (() => { if(!S['extract-if-necessary'].length) return []; if(S['extract-if-necessary'].includes('*')) return ['*']; @@ -4918,7 +5105,6 @@ S.initialize = (before, after) => { })(); if(S['book'] || !window.File) S['accept-local-file'] = false, S['accept-blob-converted-data'] = false, S['accept-base64-encoded-data'] = false; else S['accept-local-file'] = S['accept-local-file'] && (S['extract-if-necessary'].includes('*') || S['extract-if-necessary'].includes('.epub') || S['extract-if-necessary'].includes('.zip')) ? true : false; - if(!S['trustworthy-origins'].includes(O.Origin)) S['trustworthy-origins'].unshift(O.Origin); // -------- S['autostart'] = S['wait'] ? false : !S['book'] ? true : window.parent != window ? S['autostart-embedded'] : S['autostart']; S['start-in-new-window'] = (window.parent != window && !S['autostart']) ? S['start-embedded-in-new-window'] : false; @@ -4936,16 +5122,14 @@ S.initialize = (before, after) => { E.bind('bibi:initialized-book', () => { const BookBiscuits = O.Biscuits.remember('Book'); if(S['keep-settings']) { - if(!U['reader-view-mode'] && BookBiscuits['RVM']) S['reader-view-mode'] = BookBiscuits['RVM']; - if(!U['full-breadth-layout-in-scroll'] && BookBiscuits['FBL']) S['full-breadth-layout-in-scroll'] = BookBiscuits['FBL']; + if(!U['reader-view-mode'] && BookBiscuits.RVM) S['reader-view-mode'] = BookBiscuits.RVM; + if(!U['full-breadth-layout-in-scroll'] && BookBiscuits.FBL) S['full-breadth-layout-in-scroll'] = BookBiscuits.FBL; } if(S['resume-from-last-position']) { - if(!U['to'] && BookBiscuits['Position']) S['to'] = sML.clone(BookBiscuits['Position']); + if(!R.StartOn && BookBiscuits.Position && BookBiscuits.Position.IIPP) R.StartOn = sML.clone(BookBiscuits.Position); } }); // -------- - if(after) after(); - // -------- S.Modes = { // 'Mode': { SH: 'ShortHand', CNP: 'ClassNamePrefix' } 'book-rendition-layout' : { SH: 'BRL', CNP: 'book' }, 'reader-view-mode' : { SH: 'RVM', CNP: 'view' }, @@ -5091,7 +5275,7 @@ O.log = (Log, A2, A3) => { let Obj = '', Tag = ''; O.log.initialize = () => { if(parent && parent != window) return O.log = () => true; - O.log.Limit = !U.hasOwnProperty('log') ? 0 : /^(0|[1-9][0-9]*)(\.[0-9]+)?$/.test(U['log']) ? U['log'] : 1; + O.log.Limit = U.hasOwnProperty('log') && typeof (U['log'] *= 1) == 'number' ? U['log'] : 0; O.log.Depth = 1; O.log.NStyle = 'font: normal normal 10px/1 Menlo, Consolas, monospace;'; O.log.BStyle = 'font: normal bold 10px/1 Menlo, Consolas, monospace;'; @@ -5133,6 +5317,7 @@ O.error = (Msg) => { O.HTML.classList.remove('waiting'); E.dispatch('bibi:x_x', Msg); O.log(Msg, ''); + return Msg; }; @@ -5241,6 +5426,7 @@ O.getBlobURL = (Item) => new Promise(resolve => { Item = O.item(Item); if(!Item.URI) { // if(!Item.Content) throw `Item "${Item.id}" Has No Content. (O.getBlobURL)`; + if(!Item['media-type']) Item['media-type'] = O.getContentType(Item.Path); Item.URI = URL.createObjectURL(Item.DataType == 'Blob' ? Item.Content: new Blob([Item.Content], { type: Item['media-type'] })); } resolve(Item); @@ -5288,6 +5474,11 @@ O.ContentTypes = { 'webm' : 'video/webm' }; +O.getContentType = (FileName) => { + for(const Ext in O.ContentTypes) if(new RegExp('\\.' + Ext + '$').test(FileName)) return O.ContentTypes[Ext]; + return null; +}; + O.preprocess = (Item) => { Item = O.item(Item); @@ -5713,97 +5904,6 @@ O.Biscuits = { }; -O.SettingTypes = { - 'boolean': [ - 'allow-placeholders', - 'prioritise-fallbacks' - ], - 'yes-no': [ - 'accept-orthogonal-input', - 'autostart', - 'autostart-embedded', - 'fix-nav-ttb', - 'fix-reader-view-mode', - 'start-embedded-in-new-window', - 'use-arrows', - 'use-bookmarks', - 'use-font-size-changer', - 'use-full-height', - 'use-history', - 'use-keys', - 'use-loupe', - 'use-menubar', - 'use-nombre', - 'use-slider', - 'zoom-out-for-utilities' - ], - 'string': [ - 'slider-mode', - 'default-page-progression-direction', - 'pagination-method' - ], - 'integer': [ - 'item-padding-bottom', - 'item-padding-left', - 'item-padding-right', - 'item-padding-top', - 'spread-gap', - 'spread-margin' - ], - 'number': [ - 'base-font-size', - 'flipper-width', - 'font-size-scale-per-step', - 'loupe-max-scale', - 'loupe-scale-per-step', - 'orientation-border-ratio' - ], - 'array': [ - ] -}; - -O.SettingTypes_PresetOnly = { - 'boolean': [ - 'accept-base64-encoded-data', - 'accept-blob-converted-data', - 'allow-scripts-in-content', - 'remove-bibi-website-link' - ], - 'yes-no': [ - 'accept-local-file', - 'keep-settings', - 'resume-from-last-position' - ], - 'string': [ - ], - 'integer': [ - 'max-history', - 'max-bookmarks', - ], - 'number': [ - ], - 'array': [ - 'trustworthy-origins', - 'extract-if-necessary' - ] -}; - -O.SettingTypes_UserOnly = { - 'boolean': [ - 'wait' - ], - 'yes-no': [ - ], - 'integer': [ - 'nav' - ], - 'number': [ - ], - 'array': [ - ] -}; - - //============================================================================================================================================== @@ -5836,7 +5936,8 @@ E.initialize = () => { E['pointerout'] = 'mouseout'; } E['resize'] = O.TouchOS ? 'orientationchange' : 'resize'; - E.Cpt1Psv0 = { capture: true, passive: false }; + E.Cpt0Psv0 = { capture: false, passive: false }; + E.Cpt1Psv0 = { capture: true, passive: false }; //sML.applyRtL(E, new sML.CustomEvents('bibi')); E.CustomEvents = new sML.CustomEvents('bibi'); E.add = function(/*[Tar,]*/ Nam, fun, Opt) { @@ -5873,28 +5974,18 @@ E.initialize = () => { export const M = {}; // Bibi.Messages -M.post = (Msg, TargetOrigin) => { - if(!O.Embedded) return false; - if(typeof Msg != 'string' || !Msg) return false; - if(typeof TargetOrigin != 'string' || !TargetOrigin) TargetOrigin = '*'; - return window.parent.postMessage(Msg, TargetOrigin); -}; +M.judge = (Msg, Origin) => (O.ParentBibi && Msg && typeof Msg == 'string' && Origin && typeof Origin == 'string' && S['trustworthy-origins'].includes(Origin)); -M.receive = (Data) => { - try { - Data = JSON.parse(Data); - if(typeof Data != 'object' || !Data) return false; - for(const EventName in Data) if(/^bibi:commands:/.test(EventName)) E.dispatch(EventName, Data[EventName]); - return true; - } catch(_) {} - return false; -}; +M.post = (Msg) => !M.judge(Msg, O.ParentOrigin) ? false : window.parent.postMessage(Msg, window.parent.location.origin); -M.gate = (Eve) => { - if(!Eve || !Eve.data) return; - for(let l = S['trustworthy-origins'].length, i = 0; i < l; i++) if(S['trustworthy-origins'][i] == Eve.origin) return M.receive(Eve.data); +M.receive = (Eve) => { + if(!Eve || !M.judge(Eve.data, Eve.origin)) return false; try { + const Data = JSON.parse(Eve.data); + if(!Data || typeof Data != 'object') return false; + for(const EventName in Data) if(/^bibi:commands:/.test(EventName)) E.dispatch(EventName, Data[EventName]); + return true; } catch(Err) {} return false; }; diff --git a/gulpfile.js b/gulpfile.js index 7cf0e982..dd7f359b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -26,7 +26,9 @@ gulp.task('clean', done => { 'bibi/wardrobe', 'bib/i/*.html', 'bib/i.js', - 'bib/i/presets' + 'bib/i/presets', + 'bibi-bookshelf/__samples', + 'bibi-demo' ].map( X => Bibi.DIST + '/' + X )); diff --git a/webpack.config.js b/webpack.config.js index a4fc58bf..6c6293e8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -56,6 +56,7 @@ const Config = { 'bibi/resources/scripts/polyfills/intersection-observer.js', 'bibi/resources/styles/bibi.css', 'bibi/resources/scripts/bibi.js', + 'bibi-demo/embedding/index.css' ].concat(Dresses['custom-made'].map(D => 'bibi/wardrobe/' + D + '/bibi.dress.css')), [Bibi.SRCBC]: !Bibi.WithBCK ? [] : [ 'bib/i.js' @@ -76,7 +77,8 @@ const Config = { [Bibi.SRC]: [ 'bibi/*.html', 'bibi/presets/**', - 'bibi-bookshelf/__samples/**/*.epub' + 'bibi-bookshelf/__samples/**/*.epub', + 'bibi-demo/**/*.html' ], [Bibi.SRCBC]: !Bibi.WithBCK ? [] : [ 'README.BackCompatKit.md', From 3032865d47d88a443037037a2588159dd9d57049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Tue, 14 Apr 2020 10:26:47 +0900 Subject: [PATCH 37/43] Refactor and update development environment and documents. --- LICENSE | 2 +- README.md | 52 +- .../wardrobe/_dress-codes/bibi.dress.scss | 6 - __src/bibi/wardrobe/everyday/bibi.dress.scss | 9 - bibi.info.js | 180 +- package-lock.json | 1842 ++++++++--------- package.json | 32 +- webpack.config.js | 41 +- 8 files changed, 1067 insertions(+), 1097 deletions(-) diff --git a/LICENSE b/LICENSE index c3d0605f..c0f8faa5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 Satoru MATSUSHIMA +Copyright (c) 2013 Satoru Matsushima Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 437307de..83d8c736 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ And you can embed it in other webpages (like YouTube videos). ### Spec. -* EPUB 3+ and 2 compliant. Supports both fixed-layout and reflowable books of various language. +* EPUB 3+ and 2 compliant. Supports both reflowable and fixed-layout books of various language. * Made with JavaScript. Works compatibly with all major web browsers on various OS/devices. -* Open source software released under the MIT License. +* Free. Open source software released under the MIT License. ### Table of Contents -1. [How to Setup & Read/Publish EPUB Books](#how-to-setup--readpublish-epub-books) (for Users/Publishers) +1. [How to Setup & Read/Publish EPUB Books](#how-to-setup--readpublish-epub-books) (for Users/Publishers) 2. [How to Arrange Development Environment](#how-to-arrange-development-environment) (for Developers) 3. [License](#license) 4. [Special Thanks](#special-thanks) @@ -38,7 +38,7 @@ And you can embed it in other webpages (like YouTube videos). -How to Setup & Read/Publish EPUB Books +How to Setup & Read/Publish EPUB Books -------------------------------------------------------------------------------------------------------------------------------- Bibi supports 3 ways to read/publish EPUB books: @@ -124,6 +124,7 @@ If you want to terminate this feature, set "no" to "accept-files" in `bibi/prese + How to Arrange Development Environment -------------------------------------------------------------------------------------------------------------------------------- @@ -194,32 +195,34 @@ License ### Bibi ([ja](https://bibi.epub.link) / [en](https://github.com/satorumurmur/bibi)) -* Copyright © [Satoru Matsushima](https://string-letters.com) ([@satorumurmur](https://twitter.com/satorumurmur)) -* Licensed under [the MIT License](https://github.com/satorumurmur/bibi/blob/master/LICENSE). +* © [Satoru Matsushima](https://string-letters.com) ([@satorumurmur](https://twitter.com/satorumurmur)) +* Open source under [the MIT License](https://github.com/satorumurmur/bibi/blob/master/LICENSE) ### Bibi is including and powered by these open source softwares: * Core: - - [sML.js](https://github.com/satorumurmur/sML) ... Copyright © Satoru Matsushima (Licensed under [the MIT License](https://github.com/satorumurmur/sML/blob/master/LICENSE).) - - [Material Icons](https://material.io/icons/) ... Copyright © Material Design Authors / Google Inc. (Licensed under [the Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).) + - [sML.js](https://github.com/satorumurmur/sML) : © Satoru Matsushima / Licensed under [the MIT License](https://github.com/satorumurmur/sML/blob/master/LICENSE) + - [Material Icons](https://material.io/icons/) : © Material Design Authors & Google Inc. / Licensed under [the Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) * Extensions: - - [Bibi Zip Loader](https://github.com/lunascape/bibi-zip-loader) ... Copyright © Lunascape (Licensed under [the MIT License](https://github.com/lunascape/bibi-zip-loader/blob/master/LICENSE).) - - [JSZip](http://stuk.github.io/jszip) ... Copyright © Stuart Knightley (Dual licensed under [the MIT License or the GPLv3](https://github.com/Stuk/jszip/blob/HEAD/LICENSE.markdown).) - - [JSZipUtils](http://stuk.github.io/jszip-utils) ... Copyright © Stuart Knightley (Dual licensed under [the the MIT License or the GPLv3](https://github.com/Stuk/jszip-utils/blob/master/LICENSE.markdown).) - - [JS-YAML](http://nodeca.github.io/js-yaml/) ... Copyright © Vitaly Puzrin (Licensed under [the MIT License](https://github.com/nodeca/js-yaml/blob/master/LICENSE).) - - [DOMPurify](https://github.com/cure53/DOMPurify) ... Copyright © Mario Heiderich (Dual licensed under [the Apache License Version 2.0 or the Mozilla Public License Version 2.0](https://github.com/cure53/DOMPurify/blob/master/LICENSE).) + - [Bibi Zip Loader](https://github.com/lunascape/bibi-zip-loader) : © Lunascape / Licensed under [the MIT License](https://github.com/lunascape/bibi-zip-loader/blob/master/LICENSE) + - [JSZip](http://stuk.github.io/jszip) : © Stuart Knightley / Dual licensed under [the MIT License or the GPLv3](https://github.com/Stuk/jszip/blob/HEAD/LICENSE.markdown) + - [JSZipUtils](http://stuk.github.io/jszip-utils) : © Stuart Knightley / Dual licensed under [the MIT License or the GPLv3](https://github.com/Stuk/jszip-utils/blob/master/LICENSE.markdown) + - [JS-YAML](http://nodeca.github.io/js-yaml/) : © Vitaly Puzrin / Licensed under [the MIT License](https://github.com/nodeca/js-yaml/blob/master/LICENSE) + - [DOMPurify](https://github.com/cure53/DOMPurify) : © Mario Heiderich / Dual licensed under [the Apache License Version 2.0 or the Mozilla Public License Version 2.0](https://github.com/cure53/DOMPurify/blob/master/LICENSE) * Polyfills: - - [classlist-polyfill](https://github.com/yola/classlist-polyfill) ... by Yola Inc. (Released into the public domain under [the Unlicense](https://github.com/yola/classlist-polyfill/blob/master/LICENSE)) - - [text-encoding-utf-8](https://github.com/arv/text-encoding-utf-8) ... by Erik Arvidsson (Released into the public domain under [the Unlicense](https://github.com/arv/text-encoding-utf-8/blob/master/LICENSE.md).) - - [IntersectionObserver polyfill](https://github.com/w3c/IntersectionObserver) ... Copyright (c) W3C (Licensed under [the W3C Software and Document License](https://github.com/w3c/IntersectionObserver/blob/master/LICENSE.md).) - - [document.currentScript Polyfill](https://github.com/amiller-gh/currentScript-polyfill) ... Copyright © Adam Miller (Licensed under [the MIT License](https://github.com/amiller-gh/currentScript-polyfill/blob/master/LICENSE).) - - [custom-event-polyfill](https://github.com/kumarharsh/custom-event-polyfill) ... Copyright © Evan Krambuhl (Licensed under [the MIT License](https://github.com/kumarharsh/custom-event-polyfill/blob/master/LICENSE).) - - [Native Promise Only (NPO)](https://github.com/getify/native-promise-only) ... Copyright © Kyle Simpson (Licensed under [the MIT License](http://getify.mit-license.org/).) - - [Polyfill Array.prototype.includes](https://github.com/latusinski/polyfill-array-includes) ... Copyright © Kevin Latusinski (Licensed under [the MIT License](https://www.npmjs.com/package/polyfill-array-includes).) - - [String.prototype.padStart](https://github.com/KhaledElAnsari/String.prototype.padStart) ... Copyright © Khaled Al-Ansari (Licensed under [the MIT License](https://github.com/KhaledElAnsari/String.prototype.padStart/blob/master/LICENSE).) - - [url-polyfill](https://github.com/lifaon74/url-polyfill) ... Copyright © Valentin Richard (Licensed under [the MIT License](https://github.com/lifaon74/url-polyfill/blob/master/LICENSE).) + - [classlist-polyfill](https://github.com/yola/classlist-polyfill) : by Yola Inc. / Released into the public domain under [the Unlicense](https://github.com/yola/classlist-polyfill/blob/master/LICENSE) + - [text-encoding-utf-8](https://github.com/arv/text-encoding-utf-8) : by Erik Arvidsson / Released into the public domain under [the Unlicense](https://github.com/arv/text-encoding-utf-8/blob/master/LICENSE.md) + - [IntersectionObserver polyfill](https://github.com/w3c/IntersectionObserver) : © W3C / Licensed under [the W3C Software and Document License](https://github.com/w3c/IntersectionObserver/blob/master/LICENSE.md) + - [document.currentScript Polyfill](https://github.com/amiller-gh/currentScript-polyfill) : © Adam Miller / Licensed under [the MIT License](https://github.com/amiller-gh/currentScript-polyfill/blob/master/LICENSE) + - [custom-event-polyfill](https://github.com/kumarharsh/custom-event-polyfill) : © Evan Krambuhl / Licensed under [the MIT License](https://github.com/kumarharsh/custom-event-polyfill/blob/master/LICENSE) + - [Native Promise Only (NPO)](https://github.com/getify/native-promise-only) : © Kyle Simpson / Licensed under [the MIT License](http://getify.mit-license.org/) + - [Polyfill Array.prototype.includes](https://github.com/latusinski/polyfill-array-includes) : © Kevin Latusinski / Licensed under [the MIT License](https://www.npmjs.com/package/polyfill-array-includes) + - [String.prototype.padStart](https://github.com/KhaledElAnsari/String.prototype.padStart) : © Khaled Al-Ansari / Licensed under [the MIT License](https://github.com/KhaledElAnsari/String.prototype.padStart/blob/master/LICENSE) + - [url-polyfill](https://github.com/lifaon74/url-polyfill) : © Valentin Richard / Licensed under [the MIT License](https://github.com/lifaon74/url-polyfill/blob/master/LICENSE) + + Special Thanks @@ -228,6 +231,8 @@ Special Thanks Thanks to the contributors and the users around the world. + + Supported and Sponsored by -------------------------------------------------------------------------------------------------------------------------------- @@ -235,3 +240,6 @@ Supported and Sponsored by * Bibi v1.0.0 was developed with greateful support and sponsoring from [Lunascape](https://lunascape.org) (and their parent company [MEDIA DO Co.,Ltd.](https://mediado.jp/mediado) who absorbed and merged them). * Lunascape also developed [Bibi Zip Loader](https://github.com/lunascape/bibi-zip-loader) especially for Bibi, which realized fast progressive loading of zipped EPUBs. + + + diff --git a/__src/bibi/wardrobe/_dress-codes/bibi.dress.scss b/__src/bibi/wardrobe/_dress-codes/bibi.dress.scss index 015f3c43..9c44e884 100644 --- a/__src/bibi/wardrobe/_dress-codes/bibi.dress.scss +++ b/__src/bibi/wardrobe/_dress-codes/bibi.dress.scss @@ -1,9 +1,3 @@ -/*! - * - * ## Bibi Dress - * - */ - // You can add some variables or mixins here, as you like. @import "@"; diff --git a/__src/bibi/wardrobe/everyday/bibi.dress.scss b/__src/bibi/wardrobe/everyday/bibi.dress.scss index 0482959b..b0935ed7 100644 --- a/__src/bibi/wardrobe/everyday/bibi.dress.scss +++ b/__src/bibi/wardrobe/everyday/bibi.dress.scss @@ -1,10 +1 @@ -/*! - * (℠) - * ## Bibi Dress: Everyday - * - * * Copyright (c) Satoru MATSUSHIMA - https://bibi.epub.link or https://github.com/satorumurmur/bibi - * * Licensed under the MIT License. - https://opensource.org/licenses/mit-license.php - * - */ - @import "@"; \ No newline at end of file diff --git a/bibi.info.js b/bibi.info.js index 8aba9470..8b1efa99 100644 --- a/bibi.info.js +++ b/bibi.info.js @@ -28,137 +28,123 @@ Bibi.Arguments = (() => { Bibi.ForPack = (Bibi.Arguments['pack']); Bibi.WithBCK = (Bibi.Arguments['bc'] || Bibi.ForPack); -// ============================================================================================================================= - -const _banner = (Name, Credit, Extra, Mark) => '/*!' + ` - *` + (!Mark ? '' : ` (℠)`) + ` - * # ${ Name } - *` + (!Credit ? '' : (Credit == 'default' ? ` - * * Copyright (c) ${ Bibi.author.name } - ${ Bibi.homepage } - * * Licensed under the MIT License. - https://opensource.org/licenses/mit-license.php` : '\n' + Credit.replace(/^\n|\n$/g, '')) + ` - *`) + (!Extra ? '' : '\n' + Extra.replace(/^\n|\n$/g, '') + ` +Bibi.ARCHIVES = '__archives', Bibi.ARCHIVETMP = Bibi.ARCHIVES + '/.tmp', Bibi.DIST = '__dist', Bibi.SRC = '__src', Bibi.SRCBC = '__src__back-compat'; + +Bibi.Dresses = (_ => { + const Dresses = require('./' + Bibi.SRC + '/bibi/wardrobe/_dresses.js') || {}; + Dresses['custom-made'] = _(Dresses['custom-made']).filter(D => !Dresses['ready-made'].includes(D)); + Dresses[ 'ready-made'] = _(Dresses[ 'ready-made']); + return Dresses; +})(Ds => Ds instanceof Array ? Ds.filter(D => typeof D == 'string' && /^[a-zA-Z0-9][a-zA-Z0-9_\-]*$/.test(D)) : []); + +const _banner = (Opt) => '/*!' + ` + *` + (!Opt.Mark ? '' : ` (℠)`) + ` + * # ${ Opt.Name } + *` + (!Opt.Credit ? '' : (Opt.Credit == Bibi ? ` + * * © ${ Bibi.author.name } - ${ Bibi.homepage } + * * Open source under the MIT License - https://github.com/satorumurmur/bibi/blob/master/LICENSE` : '\n' + Opt.Credit.replace(/^\n|\n$/g, '')) + ` + *`) + (!Opt.Extra ? '' : '\n' + Opt.Extra.replace(/^\n|\n$/g, '') + ` *`) + '\n */'; -Bibi.Banners = { - -// ----------------------------------------------------------------------------------------------------------------------------- - -'/bibi.js': _banner(`Bibi | EPUB Reader on your website.`, 'default', ` - * * Including: - * - sML.js ... Copyright (c) Satoru Matsushima - https://github.com/satorumurmur/sML (Licensed under the MIT License.) -`, true), +Bibi.Banners = Object.assign({ -// ----------------------------------------------------------------------------------------------------------------------------- +// ============================================================================================================================= -'/bibi.css': '@charset "utf-8";\n' + _banner(`Bibi Style`, 'default', ` +'bibi/resources/scripts/bibi.js': _banner({ Name: `Bibi | EPUB Reader on your website.`, Credit: Bibi, Extra: ` * * Including: - * - Material Icons ... Copyright (c) Material Design Authors / Google Inc. - https://material.io/icons/ (Licensed under the Apache License version 2.0.) -`, true), + * - sML.js : © Satoru Matsushima - https://github.com/satorumurmur/sML / Licensed under the MIT License - https://github.com/satorumurmur/sML/blob/master/LICENSE +`, Mark: true }), -// ----------------------------------------------------------------------------------------------------------------------------- +'bibi/and/jo.js': _banner({ Name: `Jo | Helper for Embedding Bibi-Frames in Webpage.`, Credit: Bibi, Mark: true }), -'/bibi.dress.css': '@charset "utf-8";\n' + _banner(`Bibi Dress`, ` - * * Base Design: - * - Copyright (c) ${ Bibi.author.name } - ${ Bibi.homepage } - * - Licensed under the MIT License. - https://opensource.org/licenses/mit-license.php -`, null, true), +'bib/i.js': _banner({ Name: `bib/i.js (BCK)`, Credit: Bibi, Extra: ` + * * Calling: + * - Jo | Helper for Embedding Bibi-Frames in Webpage. - bibi/and/jo.js +`, Mark: true }), // ----------------------------------------------------------------------------------------------------------------------------- -'/polyfills/bundle.js': _banner(`Polyfill Bundle for Bibi on Museum-Quality Retro Browsers`, ` +'bibi/resources/scripts/polyfills/bundle.js': _banner({ Name: `Polyfill Bundle for Bibi`, Credit: ` * * Consists of: - * - classlist-polyfill ... by Yola Inc. - https://github.com/yola/classlist-polyfill (Released into the public domain under the Unlicense.) - * - text-encoding-utf-8 ... by Erik Arvidsson - https://github.com/arv/text-encoding-utf-8 (Released into the public domain under the Unlicense.) - * - IntersectionObserver polyfill ... Copyright (c) W3C - https://github.com/w3c/IntersectionObserver (Licensed under the W3C Software and Document License.) - * - document.currentScript Polyfill ... Copyright (c) Adam Miller - https://github.com/amiller-gh/currentScript-polyfill (Licensed under the MIT License.) - * - custom-event-polyfill ... Copyright (c) Evan Krambuhl - https://github.com/kumarharsh/custom-event-polyfill (Licensed under the MIT License.) - * - Native Promise Only (NPO) ... Copyright (c) Kyle Simpson - https://github.com/getify/native-promise-only (Licensed under the MIT License.) - * - Polyfill Array.prototype.includes ... Copyright (c) Kevin Latusinski - https://github.com/latusinski/polyfill-array-includes (Licensed under the MIT License.) - * - String.prototype.padStart ... Copyright (c) Khaled Al-Ansari - https://github.com/KhaledElAnsari/String.prototype.padStart (Licensed under the MIT License.) - * - url-polyfill ... Copyright (c) Valentin Richard - https://github.com/lifaon74/url-polyfill (Licensed under the MIT License.) -`, null, null), - -// ----------------------------------------------------------------------------------------------------------------------------- + * - classlist-polyfill : by Yola Inc. - https://github.com/yola/classlist-polyfill / Released into the public domain under the Unlicense - https://github.com/yola/classlist-polyfill/blob/master/LICENSE + * - text-encoding-utf-8 : by Erik Arvidsson - https://github.com/arv/text-encoding-utf-8 / Released into the public domain under the Unlicense - https://github.com/arv/text-encoding-utf-8/blob/master/LICENSE.md + * - IntersectionObserver polyfill : © W3C - https://github.com/w3c/IntersectionObserver / Licensed under the W3C Software and Document License - https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document + * - document.currentScript Polyfill : © Adam Miller - https://github.com/amiller-gh/currentScript-polyfill / Licensed under the MIT License - https://github.com/amiller-gh/currentScript-polyfill/blob/master/LICENSE + * - custom-event-polyfill : © Evan Krambuhl - https://github.com/kumarharsh/custom-event-polyfill / Licensed under the MIT License - https://github.com/kumarharsh/custom-event-polyfill/blob/master/LICENSE + * - Native Promise Only (NPO) : © Kyle Simpson - https://github.com/getify/native-promise-only / Licensed under the MIT License - https://getify.mit-license.org/ + * - Polyfill Array.prototype.includes : © Kevin Latusinski - https://github.com/latusinski/polyfill-array-includes / Licensed under the MIT License - https://github.com/kevlatus/polyfill-array-includes/blob/master/LICENSE + * - String.prototype.padStart : © Khaled Al-Ansari - https://github.com/KhaledElAnsari/String.prototype.padStart / Licensed under the MIT License - https://github.com/KhaledElAnsari/String.prototype.padStart/blob/master/LICENSE + * - url-polyfill : © Valentin Richard - https://github.com/lifaon74/url-polyfill / Licensed under the MIT License - https://github.com/lifaon74/url-polyfill/blob/master/LICENSE +` }), + +'bibi/resources/scripts/polyfills/encoding.js': _banner({ Name: `Polyfill for Bibi: text-encoding-utf-8`, Credit: ` + * * Consists of: + * - text-encoding-utf-8 : by Erik Arvidsson - https://github.com/arv/text-encoding-utf-8 / Released into the public domain under the Unlicense - https://github.com/arv/text-encoding-utf-8/blob/master/LICENSE.md +` }), -'/polyfills/encoding.js': _banner(`text-encoding-utf-8`, ` - * * by Erik Arvidsson - https://github.com/arv/text-encoding-utf-8 - * * Released into the public domain under the Unlicense. -`, null, null), +'bibi/resources/scripts/polyfills/intersection-observer.js': _banner({ Name: `Polyfill for Bibi: IntersectionObserver polyfill`, Credit: ` + * * Consists of: + * - IntersectionObserver polyfill : © W3C - https://github.com/w3c/IntersectionObserver / Licensed under the W3C Software and Document License - https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document +` }), // ----------------------------------------------------------------------------------------------------------------------------- -'/polyfills/intersection-observer.js': _banner(`IntersectionObserver polyfill`, ` - * * Copyright (c) W3C - https://github.com/w3c/IntersectionObserver - * * Licensed under the W3C Software and Document License. -`, null, null), +'bibi/extensions/analytics.js': _banner({ Name: `Bibi Extension: Analytics`, Credit: Bibi, Mark: true }), -// ----------------------------------------------------------------------------------------------------------------------------- +'bibi/extensions/epubcfi.js': _banner({ Name: `Bibi Extension: EPUBCFI`, Credit: Bibi, Mark: true }), -'/and/jo.js': _banner(`Jo | Helper for Embedding Bibi-Frames in Webpage.`, 'default', null, true), +'bibi/extensions/extractor/on-the-fly.js': _banner({ Name: 'Bibi Extension: Extractor (on the fly)', Credit: Bibi, Extra: ` + * * Depends on: + * - Bibi Zip Loader : © Lunascape - https://github.com/lunascape/bibi-zip-loader / Licensed under the MIT License - https://github.com/lunascape/bibi-zip-loader/blob/master/LICENSE +`, Mark: true }), - '^bib/i.js': _banner(`bib/i.js (BCK)`, ` - * * Calling: - * - Jo | Helper for Embedding Bibi-Frames in Webpage. - bibi/and/jo.js -`, null, true), +'bibi/extensions/extractor/at-once.js': _banner({ Name: 'Bibi Extension: Extractor (at once)', Credit: Bibi, Extra: ` + * * Depends on: + * - JSZip : © Stuart Knightley - https://stuk.github.io/jszip / Dual licensed under the MIT License or the GPLv3 - https://github.com/Stuk/jszip/blob/master/LICENSE.markdown + * - JSZipUtils : © Stuart Knightley - https://stuk.github.io/jszip-utils / Dual licensed under the MIT License or the GPLv3 - https://github.com/Stuk/jszip-utils/blob/master/LICENSE.markdown +`, Mark: true }), -// ----------------------------------------------------------------------------------------------------------------------------- +'bibi/extensions/sanitizer.js': _banner({ Name: 'Bibi Extension: Sanitizer', Credit: Bibi, Extra: ` + * * Depends on: + * - DOMPurify : © Mario Heiderich - https://github.com/cure53/DOMPurify / Dual licensed under the Apache License Version 2.0 or the Mozilla Public License Version 2.0 - https://github.com/cure53/DOMPurify/blob/master/LICENSE +`, Mark: true }), -'/extensions/analytics.js': _banner(`Bibi Extension: Analytics`, 'default', null, true), - -// ----------------------------------------------------------------------------------------------------------------------------- - -'/extensions/epubcfi.js': _banner(`Bibi Extension: EPUBCFI`, 'default', null, true), - -// ----------------------------------------------------------------------------------------------------------------------------- +'bibi/extensions/unaccessibilizer.js': _banner({ Name: `# Bibi Extension: Unaccessibilizer ("What a...")`, Credit: ` + * * Reluctantly coded by ${ Bibi.author.name } - ${ Bibi.homepage } + * * Released into the public domain under the Unlicense - http://unlicense.org/UNLICENSE +` }), -'/extensions/extractor/on-the-fly.js': _banner('Bibi Extension: Extractor (on the fly)', 'default', ` - * * Including: - * - Bibi Zip Loader ... Copyright (c) Lunascape - https://github.com/lunascape/bibi-zip-loader (Licensed under the MIT License.) -`, true), +'bibi/extensions/zine.js': _banner({ Name: 'Bibi Extension: Zine', Credit: Bibi, Extra: ` + * * Depends on: + * - JS-YAML : © Vitaly Puzrin - https://nodeca.github.io/js-yaml / Licensed under the MIT License - https://github.com/nodeca/js-yaml/blob/master/LICENSE +`, Mark: true }) -'/extensions/extractor/on-the-fly.bibi-zip-loader.worker.js': _banner('Bibi-Zip-Loader (Worker)', ` - * * Copyright (c) Lunascape - https://github.com/lunascape/bibi-zip-loader - * * Licensed under the MIT License. -`, null, null), +// ============================================================================================================================= -'/extensions/extractor/at-once.js': _banner('Bibi Extension: Extractor (at once)', 'default', ` - * * Including: - * - JSZip ... Copyright (c) Stuart Knightley - https://stuk.github.io/jszip (Dual licensed under the MIT License or the GPLv3.) - * - JSZipUtils ... Copyright (c) Stuart Knightley - https://stuk.github.io/jszip-utils (Dual licensed under the MIT License or the GPLv3.) -`, true), +}, [{ -// ----------------------------------------------------------------------------------------------------------------------------- +// ============================================================================================================================= -'/extensions/sanitizer.js': _banner('Bibi Extension: Sanitizer', 'default', ` +'bibi/resources/styles/bibi.css': _banner({ Name: `Bibi Style`, Credit: Bibi, Extra: ` * * Including: - * - DOMPurify ... Copyright (c) Mario Heiderich - https://github.com/cure53/DOMPurify (Dual licensed under the Apache License Version 2.0 or the Mozilla Public License Version 2.0.) -`, true), + * - Material Icons : © Material Design Authors & Google Inc. - https://material.io/resources/icons / Licensed under the Apache License version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.html +`, Mark: true }) // ----------------------------------------------------------------------------------------------------------------------------- -'/extensions/unaccessibilizer.js': _banner(`# Bibi Extension: Unaccessibilizer ("What a...")`, ` - * * Reluctantly coded by ${ Bibi.author.name } - ${ Bibi.homepage } - * * Released into the public domain under the Unlicense. - http://unlicense.org/UNLICENSE -`, null, null), +}].concat(Bibi.Dresses['custom-made'].map(D => ({ // ----------------------------------------------------------------------------------------------------------------------------- -'/extensions/zine.js': _banner('Bibi Extension: Zine', 'default', ` - * * Including: - * - JS-YAML ... Copyright (c) Vitaly Puzrin - https://nodeca.github.io/js-yaml (Licensed under the MIT License.) -`, true), - -// ----------------------------------------------------------------------------------------------------------------------------- - -'':'' }; +[`bibi/wardrobe/${ D }/bibi.dress.css`]: _banner({ Name: `Bibi Dress: "${ D }"`, Credit: D == 'everyday' ? Bibi : ` + * * © The Creator(s) of This Dress +`, Extra: ` + * * Based on: + * - The Bibi Dress Design System : © ${ Bibi.author.name } - ${ Bibi.homepage } / Licensed under the MIT License - https://github.com/satorumurmur/bibi/blob/master/LICENSE +`, Mark: true }) // ============================================================================================================================= -Bibi.ARCHIVES = '__archives', Bibi.ARCHIVETMP = Bibi.ARCHIVES + '/.tmp'; -Bibi.DIST = '__dist'; -Bibi.SRC = '__src'; -Bibi.SRCBC = '__src__back-compat'; - -// ============================================================================================================================= +}))).reduce((Bs, B) => { for(const P in B) B[P] = '@charset "utf-8";\n' + B[P]; return Object.assign(Bs, B); }, {})); module.exports = Bibi; diff --git a/package-lock.json b/package-lock.json index 314183e9..dcbc208d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,75 +14,34 @@ } }, "@babel/compat-data": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.6.tgz", - "integrity": "sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", + "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", "dev": true, "requires": { - "browserslist": "^4.8.5", + "browserslist": "^4.9.1", "invariant": "^2.2.4", "semver": "^5.5.0" - }, - "dependencies": { - "browserslist": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", - "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001030", - "electron-to-chromium": "^1.3.363", - "node-releases": "^1.1.50" - } - }, - "caniuse-lite": { - "version": "1.0.30001035", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", - "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.376", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz", - "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==", - "dev": true - }, - "node-releases": { - "version": "1.1.51", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.51.tgz", - "integrity": "sha512-1eQEs6HFYY1kMXQPOLzCf7HdjReErmvn85tZESMczdCNVWP3Y7URYLBAyYynuI7yef1zj4HN5q+oB2x67QU0lw==", - "dev": true, - "requires": { - "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/core": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz", - "integrity": "sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", + "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.7", - "@babel/helpers": "^7.8.4", - "@babel/parser": "^7.8.7", + "@babel/generator": "^7.9.0", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.0", + "@babel/parser": "^7.9.0", "@babel/template": "^7.8.6", - "@babel/traverse": "^7.8.6", - "@babel/types": "^7.8.7", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", - "json5": "^2.1.0", + "json5": "^2.1.2", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", @@ -90,12 +49,12 @@ } }, "@babel/generator": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.7.tgz", - "integrity": "sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz", + "integrity": "sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==", "dev": true, "requires": { - "@babel/types": "^7.8.7", + "@babel/types": "^7.9.5", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -120,17 +79,6 @@ "@babel/types": "^7.8.3" } }, - "@babel/helper-call-delegate": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz", - "integrity": "sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.7" - } - }, "@babel/helper-compilation-targets": { "version": "7.8.7", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", @@ -142,59 +90,17 @@ "invariant": "^2.2.4", "levenary": "^1.1.1", "semver": "^5.5.0" - }, - "dependencies": { - "browserslist": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", - "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001030", - "electron-to-chromium": "^1.3.363", - "node-releases": "^1.1.50" - } - }, - "caniuse-lite": { - "version": "1.0.30001035", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", - "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.376", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz", - "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==", - "dev": true - }, - "node-releases": { - "version": "1.1.51", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.51.tgz", - "integrity": "sha512-1eQEs6HFYY1kMXQPOLzCf7HdjReErmvn85tZESMczdCNVWP3Y7URYLBAyYynuI7yef1zj4HN5q+oB2x67QU0lw==", - "dev": true, - "requires": { - "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/helper-create-regexp-features-plugin": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.6.tgz", - "integrity": "sha512-bPyujWfsHhV/ztUkwGHz/RPV1T1TDEsSZDsN42JPehndA+p1KKTh3npvTadux0ZhCrytx9tvjpWNowKby3tM6A==", + "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.6.0" + "regexpu-core": "^4.7.0" } }, "@babel/helper-define-map": { @@ -219,14 +125,14 @@ } }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.8.3", "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.9.5" } }, "@babel/helper-get-function-arity": { @@ -266,9 +172,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz", - "integrity": "sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.8.3", @@ -276,7 +182,7 @@ "@babel/helper-simple-access": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", "@babel/template": "^7.8.6", - "@babel/types": "^7.8.6", + "@babel/types": "^7.9.0", "lodash": "^4.17.13" } }, @@ -348,6 +254,12 @@ "@babel/types": "^7.8.3" } }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, "@babel/helper-wrap-function": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", @@ -361,31 +273,31 @@ } }, "@babel/helpers": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", - "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", + "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", "dev": true, "requires": { "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0" } }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.7.tgz", - "integrity": "sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A==", + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -429,14 +341,25 @@ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, - "@babel/plugin-proposal-object-rest-spread": { + "@babel/plugin-proposal-numeric-separator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz", + "integrity": "sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.9.5" } }, "@babel/plugin-proposal-optional-catch-binding": { @@ -450,9 +373,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", - "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3", @@ -460,12 +383,12 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", - "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", + "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.3", + "@babel/helper-create-regexp-features-plugin": "^7.8.8", "@babel/helper-plugin-utils": "^7.8.3" } }, @@ -505,6 +428,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@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", @@ -581,14 +513,14 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz", - "integrity": "sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz", + "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.8.3", "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-optimise-call-expression": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-replace-supers": "^7.8.6", @@ -606,9 +538,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", - "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz", + "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -644,9 +576,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz", - "integrity": "sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -681,47 +613,47 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", - "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", + "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", - "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", + "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", - "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", + "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", - "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", + "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3" } }, @@ -754,12 +686,11 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.7.tgz", - "integrity": "sha512-brYWaEPTRimOctz2NDA3jnBbDi7SVN2T4wYuu0aqSzxC3nozFZngGaw29CJ9ZPweB7k+iFmZuoG3IVPIcXmD2g==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz", + "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.8.7", "@babel/helper-get-function-arity": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3" } @@ -849,12 +780,12 @@ } }, "@babel/preset-env": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.7.tgz", - "integrity": "sha512-BYftCVOdAYJk5ASsznKAUl53EMhfBbr8CJ1X+AJLfGPscQkwJFiaV/Wn9DPH/7fzm2v6iRYJKYHSqyynTGw0nw==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.5.tgz", + "integrity": "sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.6", + "@babel/compat-data": "^7.9.0", "@babel/helper-compilation-targets": "^7.8.7", "@babel/helper-module-imports": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", @@ -862,14 +793,16 @@ "@babel/plugin-proposal-dynamic-import": "^7.8.3", "@babel/plugin-proposal-json-strings": "^7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-numeric-separator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.5", "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", "@babel/plugin-syntax-async-generators": "^7.8.0", "@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.8.0", "@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", @@ -878,24 +811,24 @@ "@babel/plugin-transform-async-to-generator": "^7.8.3", "@babel/plugin-transform-block-scoped-functions": "^7.8.3", "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.8.6", + "@babel/plugin-transform-classes": "^7.9.5", "@babel/plugin-transform-computed-properties": "^7.8.3", - "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.9.5", "@babel/plugin-transform-dotall-regex": "^7.8.3", "@babel/plugin-transform-duplicate-keys": "^7.8.3", "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.8.6", + "@babel/plugin-transform-for-of": "^7.9.0", "@babel/plugin-transform-function-name": "^7.8.3", "@babel/plugin-transform-literals": "^7.8.3", "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.8.3", - "@babel/plugin-transform-modules-commonjs": "^7.8.3", - "@babel/plugin-transform-modules-systemjs": "^7.8.3", - "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.9.0", + "@babel/plugin-transform-modules-commonjs": "^7.9.0", + "@babel/plugin-transform-modules-systemjs": "^7.9.0", + "@babel/plugin-transform-modules-umd": "^7.9.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", "@babel/plugin-transform-new-target": "^7.8.3", "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.8.7", + "@babel/plugin-transform-parameters": "^7.9.5", "@babel/plugin-transform-property-literals": "^7.8.3", "@babel/plugin-transform-regenerator": "^7.8.7", "@babel/plugin-transform-reserved-words": "^7.8.3", @@ -905,71 +838,35 @@ "@babel/plugin-transform-template-literals": "^7.8.3", "@babel/plugin-transform-typeof-symbol": "^7.8.4", "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/types": "^7.8.7", - "browserslist": "^4.8.5", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.9.5", + "browserslist": "^4.9.1", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", "levenary": "^1.1.1", "semver": "^5.5.0" - }, - "dependencies": { - "browserslist": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", - "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001030", - "electron-to-chromium": "^1.3.363", - "node-releases": "^1.1.50" - } - }, - "caniuse-lite": { - "version": "1.0.30001035", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", - "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.376", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz", - "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==", - "dev": true - }, - "node-releases": { - "version": "1.1.51", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.51.tgz", - "integrity": "sha512-1eQEs6HFYY1kMXQPOLzCf7HdjReErmvn85tZESMczdCNVWP3Y7URYLBAyYynuI7yef1zj4HN5q+oB2x67QU0lw==", - "dev": true, - "requires": { - "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/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.8.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", - "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz", - "integrity": "sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==", - "dev": true - } } }, "@babel/template": { @@ -984,29 +881,29 @@ } }, "@babel/traverse": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz", - "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz", + "integrity": "sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.6", - "@babel/helper-function-name": "^7.8.3", + "@babel/generator": "^7.9.5", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6", + "@babel/parser": "^7.9.0", + "@babel/types": "^7.9.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz", - "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz", + "integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==", "dev": true, "requires": { - "esutils": "^2.0.2", + "@babel/helper-validator-identifier": "^7.9.5", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" } @@ -1061,9 +958,9 @@ "dev": true }, "@types/node": { - "version": "12.12.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.20.tgz", - "integrity": "sha512-VAe+DiwpnC/g448uN+/3gRl4th0BTdrR9gSLIOHA+SUQskaYZQDOHG7xmjiE7JUhjbXnbXytf6Ih+/pA6CtMFQ==", + "version": "13.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.2.tgz", + "integrity": "sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==", "dev": true }, "@types/q": { @@ -1073,178 +970,177 @@ "dev": true }, "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", - "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", - "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.8.5" + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", - "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" + "@webassemblyjs/ast": "1.9.0" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", - "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" } }, "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", - "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", - "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", - "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/helper-wasm-section": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-opt": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "@webassemblyjs/wast-printer": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", - "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", - "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" } }, "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", - "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", - "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/floating-point-hex-parser": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-code-frame": "1.8.5", - "@webassemblyjs/helper-fsm": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", - "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", "@xtuc/long": "4.2.2" } }, @@ -1299,12 +1195,12 @@ } }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -1688,52 +1584,18 @@ "dev": true }, "autoprefixer": { - "version": "9.7.4", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", - "integrity": "sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g==", + "version": "9.7.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.6.tgz", + "integrity": "sha512-F7cYpbN7uVVhACZTeeIeealwdGM6wMtfWARVLTy5xmKtgVdBNJvbDRoCK3YO1orcs7gv/KwYlb3iXwu9Ug9BkQ==", "dev": true, "requires": { - "browserslist": "^4.8.3", - "caniuse-lite": "^1.0.30001020", + "browserslist": "^4.11.1", + "caniuse-lite": "^1.0.30001039", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.26", - "postcss-value-parser": "^4.0.2" - }, - "dependencies": { - "browserslist": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.3.tgz", - "integrity": "sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001017", - "electron-to-chromium": "^1.3.322", - "node-releases": "^1.1.44" - } - }, - "caniuse-lite": { - "version": "1.0.30001021", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001021.tgz", - "integrity": "sha512-wuMhT7/hwkgd8gldgp2jcrUjOU9RXJ4XxGumQeOsUr91l3WwmM68Cpa/ymCnWEDqakwFXhuDQbaKNHXBPgeE9g==", - "dev": true - }, - "node-releases": { - "version": "1.1.45", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.45.tgz", - "integrity": "sha512-cXvGSfhITKI8qsV116u2FTzH5EWZJfgG7d4cpqwF8I8+1tWpD6AsvvGRKq2onR0DNj1jfqsjkXZsm14JMS7Cyg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "postcss": "^7.0.27", + "postcss-value-parser": "^4.0.3" } }, "aws-sign2": { @@ -1767,21 +1629,22 @@ } }, "babel-loader": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.6.tgz", - "integrity": "sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", "dev": true, "requires": { - "find-cache-dir": "^2.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "pify": "^4.0.1" + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" } }, "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "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" @@ -1802,6 +1665,12 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true } } }, @@ -2181,14 +2050,15 @@ } }, "browserslist": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.2.tgz", - "integrity": "sha512-+M4oeaTplPm/f1pXDw84YohEv7B1i/2Aisei8s4s6k3QsoSHa7i5sz8u/cGQkkatCPxMASKxPualR4wwYgVboA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", + "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001015", - "electron-to-chromium": "^1.3.322", - "node-releases": "^1.1.42" + "caniuse-lite": "^1.0.30001043", + "electron-to-chromium": "^1.3.413", + "node-releases": "^1.1.53", + "pkg-up": "^2.0.0" } }, "bs-recipes": { @@ -2251,9 +2121,9 @@ "dev": true }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", "dev": true, "requires": { "bluebird": "^3.5.5", @@ -2365,9 +2235,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001016", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001016.tgz", - "integrity": "sha512-yYQ2QfotceRiH4U+h1Us86WJXtVHDmy3nEKIdYPsZCYnOV5/tMgGbmoIlrMzmh2VXlproqYtVaKeGDBkMZifFA==", + "version": "1.0.30001045", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001045.tgz", + "integrity": "sha512-Y8o2Iz1KPcD6FjySbk1sPpvJqchgxk/iow0DABpGyzA1UeQAuxh63Xh0Enj5/BrsYbXtCN32JmR4ZxQTCQ6E6A==", "dev": true }, "caseless": { @@ -2408,9 +2278,9 @@ } }, "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "chrome-trace-event": { @@ -2769,64 +2639,52 @@ "schema-utils": "^1.0.0", "serialize-javascript": "^2.1.2", "webpack-log": "^2.0.0" - } - }, - "core-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", - "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==", - "dev": true - }, - "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": { - "browserslist": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", - "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001030", - "electron-to-chromium": "^1.3.363", - "node-releases": "^1.1.50" + "p-try": "^2.0.0" } }, - "caniuse-lite": { - "version": "1.0.30001035", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", - "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.376", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.376.tgz", - "integrity": "sha512-cv/PYVz5szeMz192ngilmezyPNFkUjuynuL2vNdiqIrio440nfTDdc0JJU0TS2KHLSVCs9gBbt4CFqM+HcBnjw==", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "node-releases": { - "version": "1.1.51", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.51.tgz", - "integrity": "sha512-1eQEs6HFYY1kMXQPOLzCf7HdjReErmvn85tZESMczdCNVWP3Y7URYLBAyYynuI7yef1zj4HN5q+oB2x67QU0lw==", + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "dev": true, "requires": { - "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 - } + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" } - }, + } + } + }, + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "dev": true + }, + "core-js-compat": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", + "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "dev": true, + "requires": { + "browserslist": "^4.8.5", + "semver": "7.0.0" + }, + "dependencies": { "semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", @@ -3020,9 +2878,9 @@ } }, "css-loader": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz", - "integrity": "sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.5.3.tgz", + "integrity": "sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw==", "dev": true, "requires": { "camelcase": "^5.3.1", @@ -3030,13 +2888,14 @@ "icss-utils": "^4.1.1", "loader-utils": "^1.2.3", "normalize-path": "^3.0.0", - "postcss": "^7.0.23", + "postcss": "^7.0.27", "postcss-modules-extract-imports": "^2.0.0", "postcss-modules-local-by-default": "^3.0.2", - "postcss-modules-scope": "^2.1.1", + "postcss-modules-scope": "^2.2.0", "postcss-modules-values": "^3.0.0", - "postcss-value-parser": "^4.0.2", - "schema-utils": "^2.6.0" + "postcss-value-parser": "^4.0.3", + "schema-utils": "^2.6.6", + "semver": "^6.3.0" }, "dependencies": { "camelcase": { @@ -3045,15 +2904,11 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "schema-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.2.tgz", - "integrity": "sha512-sazKNMBX/jwrXRkOI7N6dtiTVYqzSckzol8SGuHt0lE/v3xSW6cUkOqzu6Bq2tW+dlUzq3CWIqHU3ZKauliqdg==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -3189,12 +3044,36 @@ "dev": true }, "csso": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.2.tgz", - "integrity": "sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.37" + "css-tree": "1.0.0-alpha.39" + }, + "dependencies": { + "css-tree": { + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", + "dev": true, + "requires": { + "mdn-data": "2.0.6", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", + "dev": true + }, + "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 + } } }, "current-script-polyfill": { @@ -3367,9 +3246,9 @@ } }, "globby": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", - "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", "dev": true, "requires": { "@types/glob": "^7.1.1", @@ -3395,9 +3274,9 @@ "dev": true }, "rimraf": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", - "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -3531,9 +3410,9 @@ "dev": true }, "dompurify": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz", - "integrity": "sha512-vIOSyOXkMx81ghEalh4MLBtDHMx1bhKlaqHDMqM2yeitJ996SLOk5mGdDpI9ifJAgokred8Rmu219fX4OltqXw==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.10.tgz", + "integrity": "sha512-ok1dcSztsIuVxWG6Cx0ujyDIzNclz9W9OIU0cOb0IT+VAtSLrOelZF4miUvSm1U4PoCw8D7sIOLCnCQOaVpr3w==" }, "domutils": { "version": "1.7.0", @@ -3546,12 +3425,12 @@ } }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "duplexify": { @@ -3616,9 +3495,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.322", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz", - "integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==", + "version": "1.3.414", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.414.tgz", + "integrity": "sha512-UfxhIvED++qLwWrAq9uYVcqF8FdeV9sU2S7qhiHYFODxzXRrd1GZRl/PjITHsTEejgibcWDraD8TQqoHb1aCBQ==", "dev": true }, "elliptic": { @@ -3643,9 +3522,9 @@ "dev": true }, "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, "encodeurl": { @@ -3719,9 +3598,9 @@ } }, "engine.io-client": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.0.tgz", - "integrity": "sha512-a4J5QO2k99CM2a0b12IznnyQndoEvtA4UAldhGzKqnHf42I3Qs2W5SPnDvatZRcMaNZs4IevVicBPayxYt6FwA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.1.tgz", + "integrity": "sha512-RJNmA+A9Js+8Aoq815xpGAsgWH1VoSYM//2VgIiu9lNOaHFfLpTjH4tOzktBpjIs5lvOfiNY1dwf+NuU6D38Mw==", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -3798,22 +3677,22 @@ } }, "es-abstract": { - "version": "1.17.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0-next.1.tgz", - "integrity": "sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw==", + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", "object-inspect": "^1.7.0", "object-keys": "^1.1.1", "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" } }, "es-to-primitive": { @@ -4173,22 +4052,23 @@ } }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, "fast-glob": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz", - "integrity": "sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", - "micromatch": "^4.0.2" + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" }, "dependencies": { "braces": { @@ -4210,9 +4090,9 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -4252,64 +4132,39 @@ "dev": true }, "fastq": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz", - "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.7.0.tgz", + "integrity": "sha512-YOadQRnHd5q6PogvAR/x62BGituF2ufiEA6s8aavQANw5YKHERI4AREboX6KotzP8oX2klxYF2wcV/7bn1clfQ==", "dev": true, "requires": { - "reusify": "^1.0.0" + "reusify": "^1.0.4" } }, "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", "dev": true }, "file-loader": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-5.1.0.tgz", - "integrity": "sha512-u/VkLGskw3Ue59nyOwUwXI/6nuBCo7KBkniB/l7ICwr/7cPNGsL1WCXUp3GB0qgOOKU1TiP49bv4DZF/LJqprg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.0.0.tgz", + "integrity": "sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ==", "dev": true, "requires": { - "loader-utils": "^1.4.0", - "schema-utils": "^2.5.0" + "loader-utils": "^2.0.0", + "schema-utils": "^2.6.5" }, "dependencies": { - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } - }, - "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" + "json5": "^2.1.2" } } } @@ -4388,12 +4243,12 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^2.0.0" } }, "findup-sync": { @@ -4575,9 +4430,9 @@ "dev": true }, "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", + "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", "dev": true, "optional": true, "requires": { @@ -4631,7 +4486,7 @@ } }, "chownr": { - "version": "1.1.3", + "version": "1.1.4", "bundled": true, "dev": true, "optional": true @@ -4803,7 +4658,7 @@ } }, "minimist": { - "version": "0.0.8", + "version": "1.2.5", "bundled": true, "dev": true, "optional": true @@ -4828,12 +4683,12 @@ } }, "mkdirp": { - "version": "0.5.1", + "version": "0.5.3", "bundled": true, "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { @@ -4843,7 +4698,7 @@ "optional": true }, "needle": { - "version": "2.4.0", + "version": "2.3.3", "bundled": true, "dev": true, "optional": true, @@ -4872,7 +4727,7 @@ } }, "nopt": { - "version": "4.0.1", + "version": "4.0.3", "bundled": true, "dev": true, "optional": true, @@ -4897,13 +4752,14 @@ "optional": true }, "npm-packlist": { - "version": "1.4.7", + "version": "1.4.8", "bundled": true, "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npmlog": { @@ -4983,18 +4839,10 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } } }, "readable-stream": { - "version": "2.3.6", + "version": "2.3.7", "bundled": true, "dev": true, "optional": true, @@ -5337,13 +5185,13 @@ } }, "globule": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.0.tgz", - "integrity": "sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", + "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "~4.17.12", "minimatch": "~3.0.2" } }, @@ -5667,9 +5515,9 @@ } }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "hsl-regex": { @@ -5830,9 +5678,9 @@ "dev": true }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -5887,9 +5735,9 @@ "dev": true }, "intersection-observer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.7.0.tgz", - "integrity": "sha512-Id0Fij0HsB/vKWGeBe9PxeY45ttRiBmhFyyt/geBdDHBYNctMRTE3dC1U3ujzz3lap+hVXlEcVaB56kZP/eEUg==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.10.0.tgz", + "integrity": "sha512-fn4bQ0Xq8FTej09YC/jqKZwtijpvARlRp6wxL5WTA6yPe2YWSJ5RJh7Nm79rK2qB0wr6iDQzH60XGq5V/7u8YQ==" }, "invariant": { "version": "2.2.4", @@ -5964,9 +5812,9 @@ "dev": true }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "dev": true }, "is-color-stop": { @@ -6004,9 +5852,9 @@ } }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-descriptor": { @@ -6047,13 +5895,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -6109,9 +5954,9 @@ } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-path-cwd": { @@ -6258,9 +6103,9 @@ "dev": true }, "jest-worker": { - "version": "25.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz", - "integrity": "sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.5.0.tgz", + "integrity": "sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==", "dev": true, "requires": { "merge-stream": "^2.0.0", @@ -6285,9 +6130,9 @@ } }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", + "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", "dev": true }, "js-tokens": { @@ -6348,12 +6193,12 @@ "dev": true }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsonfile": { @@ -6378,9 +6223,9 @@ } }, "jszip": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz", - "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.4.0.tgz", + "integrity": "sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==", "requires": { "lie": "~3.3.0", "pako": "~1.0.2", @@ -6482,9 +6327,9 @@ } }, "limiter": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.4.tgz", - "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", "dev": true }, "load-json-file": { @@ -6515,13 +6360,13 @@ "dev": true }, "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "dev": true, "requires": { "big.js": "^5.2.2", - "emojis-list": "^2.0.0", + "emojis-list": "^3.0.0", "json5": "^1.0.1" }, "dependencies": { @@ -6572,12 +6417,12 @@ } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^3.0.0", + "p-locate": "^2.0.0", "path-exists": "^3.0.0" } }, @@ -6677,12 +6522,6 @@ "kind-of": "^6.0.2" } }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -6754,9 +6593,9 @@ "integrity": "sha512-5Hbj76A6xDPcDZEbM4oxTknhWuMwGWnAHVLLPCEq9eVlcHb0fn4koU9ZeyMy1wjARtDEPAHfd5ZdL2Re5hf0zQ==" }, "math-expression-evaluator": { - "version": "1.2.17", - "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", - "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "version": "1.2.22", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.22.tgz", + "integrity": "sha512-L0j0tFVZBQQLeEjmWOvDLoRciIY8gQGWahvkztXUal8jH8R5Rlqo9GCvgqvXcy9LQhEWdQCVvzqAbxgYNt4blQ==", "dev": true }, "md5.js": { @@ -6871,18 +6710,18 @@ "dev": true }, "mime-db": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", - "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", "dev": true }, "mime-types": { - "version": "2.1.25", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", - "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "dev": true, "requires": { - "mime-db": "1.42.0" + "mime-db": "1.43.0" } }, "mimic-fn": { @@ -6915,6 +6754,17 @@ "sort-keys": "^1.0.0" } }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, "sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", @@ -6948,9 +6798,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minipass": { @@ -7043,20 +6893,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "move-concurrently": { @@ -7086,9 +6928,9 @@ "dev": true }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", "dev": true }, "nanomatch": { @@ -7213,26 +7055,15 @@ "dev": true }, "node-releases": { - "version": "1.1.42", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.42.tgz", - "integrity": "sha512-OQ/ESmUqGawI2PRX+XIRao44qWYBBfN54ImQYdWVTQqUckuejOg76ysSqDBK8NG3zwySRVnX36JwDQ6x+9GxzA==", - "dev": true, - "requires": { - "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 - } - } + "version": "1.1.53", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.53.tgz", + "integrity": "sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==", + "dev": true }, "node-sass": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", - "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.0.tgz", + "integrity": "sha512-AxqU+DFpk0lEz95sI6jO0hU0Rwyw7BXVEv6o9OItoXLyeygPeaSpiV4rwQb10JiTghHaa0gZeD21sz+OsQluaw==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -7712,21 +7543,21 @@ "dev": true }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^2.0.0" + "p-try": "^1.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^1.1.0" } }, "p-map": { @@ -7739,15 +7570,15 @@ } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parallel-transform": { "version": "1.2.0", @@ -7926,15 +7757,15 @@ "dev": true }, "picomatch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", - "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, "pidtree": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz", - "integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", "dev": true }, "pify": { @@ -8005,6 +7836,60 @@ "dev": true, "requires": { "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" } }, "pleeease-filters": { @@ -8185,40 +8070,14 @@ } }, "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz", + "integrity": "sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ==", "dev": true, "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - }, - "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", - "dev": true - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "dev": true, - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" } }, "postcss-color-function": { @@ -8654,9 +8513,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.25", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.25.tgz", - "integrity": "sha512-NXXVvWq9icrm/TgQC0O6YVFi4StfJz46M1iNd/h6B26Nvh/HKI+q4YZtFN/EjcInZliEscO/WL10BXnc1E5nwg==", + "version": "7.0.27", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz", + "integrity": "sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -8966,6 +8825,19 @@ "postcss": "^7.0.0", "postcss-load-config": "^2.0.0", "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "postcss-media-minmax": { @@ -9037,12 +8909,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -9128,12 +9000,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -9162,9 +9034,9 @@ } }, "postcss-modules-scope": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.1.tgz", - "integrity": "sha512-OXRUPecnHCg8b9xWvldG/jUpRIGPNRka0r4D4j0ESUU2/5IOnpsjfPPmDprM3Ih8CgZ8FXjWqaniK5v4rWt3oQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", + "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", "dev": true, "requires": { "postcss": "^7.0.6", @@ -9632,9 +9504,9 @@ } }, "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", + "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", "dev": true }, "postcss-values-parser": { @@ -9696,9 +9568,9 @@ "dev": true }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "public-encrypt": { @@ -9868,9 +9740,9 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -9966,15 +9838,15 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", "dev": true }, "regenerator-transform": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.2.tgz", - "integrity": "sha512-V4+lGplCM/ikqi5/mkkpJ06e9Bujq1NFmNLvsCs56zg3ZbzrnUzAtizZ24TXxtRX/W2jcdScwQCnbL0CICTFkQ==", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", "dev": true, "requires": { "@babel/runtime": "^7.8.4", @@ -10094,9 +9966,9 @@ } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -10106,7 +9978,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -10116,7 +9988,7 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, @@ -10148,9 +10020,9 @@ "dev": true }, "resolve": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", - "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", + "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -10385,16 +10257,6 @@ "semver": "^6.3.0" }, "dependencies": { - "schema-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.2.tgz", - "integrity": "sha512-sazKNMBX/jwrXRkOI7N6dtiTVYqzSckzol8SGuHt0lE/v3xSW6cUkOqzu6Bq2tW+dlUzq3CWIqHU3ZKauliqdg==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -10410,14 +10272,13 @@ "dev": true }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.6.tgz", + "integrity": "sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" } }, "scss-tokenizer": { @@ -10697,9 +10558,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "simple-swizzle": { @@ -10726,9 +10587,9 @@ "dev": true }, "sml.js": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/sml.js/-/sml.js-1.0.25.tgz", - "integrity": "sha512-ED3F8rbNg1Aaa1R678F+xaiVygoVVMcJ02zxPXqeT9kxFMxq18tlNZMZOtru6vPM/NIlvquLTp3KuR4DF70wdQ==" + "version": "1.0.27", + "resolved": "https://registry.npmjs.org/sml.js/-/sml.js-1.0.27.tgz", + "integrity": "sha512-6+D1say979nfpTrRwa37y55x9keQc1bUrMrV9OtXK1SQbqAHxnd//xYbK5h9yLoujzKzqvNeLprNNEv3TqjlyQ==" }, "snapdragon": { "version": "0.8.2", @@ -11049,12 +10910,12 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -11062,9 +10923,9 @@ } }, "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.18.tgz", + "integrity": "sha512-9luZr/BZ2QeU6tO2uG8N2aZpVSli4TSAOAqFOyTO51AJcD9P99c0K1h6dD6r6qo5dyT44BR5exweOaLLeldTkQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -11102,9 +10963,9 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { @@ -11316,6 +11177,12 @@ "dev": true, "optional": true }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, "file-loader": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.8.5.tgz", @@ -11392,24 +11259,46 @@ "es-abstract": "^1.17.0-next.1" } }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" } }, "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "string_decoder": { @@ -11454,23 +11343,24 @@ } }, "style-loader": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.1.3.tgz", - "integrity": "sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.2.1.tgz", + "integrity": "sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg==", "dev": true, "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.6.4" + "loader-utils": "^2.0.0", + "schema-utils": "^2.6.6" }, "dependencies": { - "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "dev": true, "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" } } } @@ -11487,12 +11377,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -11563,9 +11453,9 @@ } }, "terser": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.3.tgz", - "integrity": "sha512-0ikKraVtRDKGzHrzkCv5rUNDzqlhmhowOBqC0XqUHFpW+vJ45+20/IFBcebwKfiS2Z9fJin6Eo+F1zLZsxi8RA==", + "version": "4.6.11", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.11.tgz", + "integrity": "sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA==", "dev": true, "requires": { "commander": "^2.20.0", @@ -11582,19 +11472,19 @@ } }, "terser-webpack-plugin": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz", - "integrity": "sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz", + "integrity": "sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg==", "dev": true, "requires": { "cacache": "^13.0.1", - "find-cache-dir": "^3.2.0", - "jest-worker": "^25.1.0", - "p-limit": "^2.2.2", - "schema-utils": "^2.6.4", - "serialize-javascript": "^2.1.2", + "find-cache-dir": "^3.3.1", + "jest-worker": "^25.4.0", + "p-limit": "^2.3.0", + "schema-utils": "^2.6.6", + "serialize-javascript": "^3.0.0", "source-map": "^0.6.1", - "terser": "^4.4.3", + "terser": "^4.6.12", "webpack-sources": "^1.4.3" }, "dependencies": { @@ -11625,13 +11515,13 @@ } }, "find-cache-dir": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", - "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^3.0.0", + "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" } }, @@ -11655,18 +11545,18 @@ } }, "make-dir": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", - "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" } }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -11681,6 +11571,12 @@ "p-limit": "^2.2.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -11696,22 +11592,18 @@ "find-up": "^4.0.0" } }, - "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -11727,6 +11619,17 @@ "figgy-pudding": "^3.5.1", "minipass": "^3.1.1" } + }, + "terser": { + "version": "4.6.12", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.12.tgz", + "integrity": "sha512-fnIwuaKjFPANG6MAixC/k1TDtnl1YlPLUlLVIxxGZUn1gfUx2+l3/zGNB72wya+lgsb50QBi2tUV75RiODwnww==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } } } }, @@ -11899,21 +11802,13 @@ "dev": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "trim-newlines": { @@ -12199,30 +12094,25 @@ } }, "url-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-3.0.0.tgz", - "integrity": "sha512-a84JJbIA5xTFTWyjjcPdnsu+41o/SNE8SpXMdUvXs6Q+LuhCD9E2+0VCiuDWqgo3GGXVlFHzArDmBpj9PgWn4A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.0.tgz", + "integrity": "sha512-IzgAAIC8wRrg6NYkFIJY09vtktQcsvU8V6HhtQj9PTefbYImzLB1hufqo4m+RyM5N3mLx5BqJKccgxJS+W3kqw==", "dev": true, "requires": { - "loader-utils": "^1.2.3", - "mime": "^2.4.4", - "schema-utils": "^2.5.0" + "loader-utils": "^2.0.0", + "mime-types": "^2.1.26", + "schema-utils": "^2.6.5" }, "dependencies": { - "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", - "dev": true - }, - "schema-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.1.tgz", - "integrity": "sha512-0WXHDs1VDJyo+Zqs9TKLKyD/h7yDpHUhEFsM2CzkICFdoX1av+GBq/J2xRTFfsQO5kBfhZzANf2VcIm84jqDbg==", + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "dev": true, "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" } } } @@ -12261,13 +12151,15 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" } }, "utils-merge": { @@ -12277,9 +12169,9 @@ "dev": true }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "v8-compile-cache": { @@ -12314,9 +12206,9 @@ "dev": true }, "vendors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", - "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", "dev": true }, "verror": { @@ -12408,27 +12300,27 @@ "dev": true }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", + "integrity": "sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^2.1.8", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" } }, "webpack": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz", - "integrity": "sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", + "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.2.1", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", @@ -12439,16 +12331,27 @@ "loader-utils": "^1.2.3", "memory-fs": "^0.4.1", "micromatch": "^3.1.10", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "neo-async": "^2.6.1", "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.0", + "watchpack": "^1.6.1", "webpack-sources": "^1.4.1" }, "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12529,6 +12432,12 @@ "which": "^1.2.9" } }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, "enhanced-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", @@ -12540,6 +12449,15 @@ "tapable": "^1.0.0" } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -12578,6 +12496,15 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -12587,6 +12514,27 @@ "invert-kv": "^2.0.0" } }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -12598,6 +12546,30 @@ "mem": "^4.0.0" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -12676,9 +12648,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 53a545da..55082a9a 100644 --- a/package.json +++ b/package.json @@ -38,34 +38,34 @@ "postinstall": "" }, "devDependencies": { - "@babel/core": "^7.8.7", - "@babel/preset-env": "^7.8.7", - "autoprefixer": "^9.7.4", - "babel-loader": "^8.0.6", + "@babel/core": "^7.9.0", + "@babel/preset-env": "^7.9.5", + "autoprefixer": "^9.7.6", + "babel-loader": "^8.1.0", "browser-sync": "^2.26.7", "browser-sync-webpack-plugin": "^2.2.2", "copy-webpack-plugin": "^5.1.1", - "core-js": "^3.6.4", - "css-loader": "^3.4.2", + "core-js": "^3.6.5", + "css-loader": "^3.5.3", "cssnano": "^4.1.10", "del": "^5.1.0", - "file-loader": "^5.1.0", + "file-loader": "^6.0.0", "gulp": "^4.0.2", "gulp-rename": "^2.0.0", "gulp-zip": "^5.0.1", "hard-source-webpack-plugin": "^0.13.1", "mini-css-extract-plugin": "^0.9.0", - "node-sass": "^4.13.1", + "node-sass": "^4.14.0", "npm-run-all": "^4.1.5", "postcss": "^7.0.27", "postcss-cssnext": "^3.1.0", "postcss-loader": "^3.0.0", "sass-loader": "^8.0.2", "string-replace-webpack-plugin": "^0.1.3", - "style-loader": "^1.1.3", - "terser-webpack-plugin": "^2.3.5", - "url-loader": "^3.0.0", - "webpack": "^4.42.0", + "style-loader": "^1.2.1", + "terser-webpack-plugin": "^2.3.6", + "url-loader": "^4.1.0", + "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-fix-style-only-entries": "^0.4.0" }, @@ -74,16 +74,16 @@ "classlist-polyfill": "^1.2.0", "current-script-polyfill": "^1.0.0", "custom-event-polyfill": "^1.0.7", - "dompurify": "^2.0.8", + "dompurify": "^2.0.10", "easing-js": "^1.1.2", - "intersection-observer": "^0.7.0", + "intersection-observer": "^0.10.0", "js-yaml": "^3.13.1", - "jszip": "^3.2.2", + "jszip": "^3.4.0", "jszip-utils": "0.1.0", "material-icons": "^0.3.1", "native-promise-only": "^0.8.1", "polyfill-array-includes": "^2.0.0", - "sml.js": "^1.0.25", + "sml.js": "^1.0.27", "string.padstart": "^0.1.1", "text-encoding-utf-8": "^1.0.2", "url-polyfill": "^1.1.8" diff --git a/webpack.config.js b/webpack.config.js index 6c6293e8..154f4f6b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,6 +7,7 @@ 'use strict'; const Webpack = require('webpack'); +const Path = require('path'), resolvePath = (..._) => Path.resolve(__dirname, _.join('/')); const Package = require('./package.json'); const Bibi = require('./bibi.info.js'); @@ -37,8 +38,8 @@ const Config = { optimization: { minimizer: [] }, output: { path: __dirname + '/' + (Bibi.ForPack ? Bibi.ARCHIVETMP : Bibi.DIST), filename: '[name].js' }, entry: ((Entries, PathListsA, PathListsB) => { - for(const SrcDir in PathListsA) PathListsA[SrcDir].forEach(P => Entries[P.replace(/\.js$/, '')] = __dirname + '/' + SrcDir + '/' + P.replace(/\.css$/, '.scss')); - for(const SrcDir in PathListsB) for(const P in PathListsB[SrcDir]) Entries[P.replace(/\.js$/, '')] = __dirname + '/' + SrcDir + '/' + PathListsB[SrcDir][P].replace(/\.css$/, '.scss') ; + for(const SrcDir in PathListsA) PathListsA[SrcDir].forEach(P => Entries[P.replace(/\.js$/, '')] = resolvePath(SrcDir, P.replace(/\.css$/, '.scss'))); + for(const SrcDir in PathListsB) for(const P in PathListsB[SrcDir]) Entries[P.replace(/\.js$/, '')] = resolvePath(SrcDir, PathListsB[SrcDir][P].replace(/\.css$/, '.scss')) ; return Entries; })({}, { [Bibi.SRC]: [ @@ -70,7 +71,7 @@ const Config = { for(const SrcDir in PathLists) { const Entries = []; PathLists[SrcDir].forEach(P => Entries.push({ from: P, to: '.' })); - RelativeCopySettings.push(new CopyPlugin(Entries, { context: SrcDir })); + RelativeCopySettings.push(new CopyPlugin(Entries, { context: resolvePath(SrcDir) })); } return RelativeCopySettings; })([], { @@ -97,7 +98,9 @@ const Config = { ]), module: { rules: [{ test: /\.m?js$/, - exclude: /\/on-the-fly\.bibi-zip-loader\.worker\.js$/, + exclude: [ + /bibi-zip-loader/ + ], use: [{ loader: 'babel-loader', options: { babelrc: false, @@ -110,7 +113,10 @@ const Config = { } }] }, { - test: /\/(bibi\.heart|jo)\.js$/, + include: [ + resolvePath(Bibi.SRC, 'bibi/and/jo.js'), + resolvePath(Bibi.SRC, 'bibi/resources/scripts/bibi.heart.js') + ], use: [ StringReplacePlugin.replace({ replacements: [{ pattern: /____Bibi-Version____/ig, @@ -144,7 +150,10 @@ const Config = { ]; Config.module.rules.push({ test: /\.scss$/, - exclude: /\/(bibi\.book|jo)\.scss$/, + exclude: [ + resolvePath(Bibi.SRC, 'bibi/resources/scripts/bibi.book.scss'), + resolvePath(Bibi.SRC, 'bibi/and/jo.scss') + ], use: [ MiniCSSExtractPlugin.loader, StringReplacePlugin.replace({ replacements: [{ @@ -154,13 +163,19 @@ const Config = { ].concat(CommonLoadersForCSS) }); Config.module.rules.push({ - test: /\/(bibi\.book|jo)\.scss$/, + include: [ + resolvePath(Bibi.SRC, 'bibi/resources/scripts/bibi.book.scss'), + resolvePath(Bibi.SRC, 'bibi/and/jo.scss') + ], use: [ { loader: 'style-loader' } ].concat(CommonLoadersForCSS) }); Config.module.rules.push({ - test: /\/MaterialIcons-Regular\.(eot|svg|ttf|wof|woff|woff2)$/, + test: /\.(eot|svg|ttf|wof|woff|woff2)$/, + include: [ + resolvePath('node_modules/material-icons/iconfont/MaterialIcons-Regular') + ], use: [ { loader: 'file-loader', options: { outputPath: 'bibi/resources/styles/fonts', @@ -179,7 +194,9 @@ const Config = { if(IsDev) { Config.module.rules.push({ - test: /\/bibi\.heart\.js$/, + include: [ + resolvePath(Bibi.SRC, 'bibi/resources/scripts/bibi.heart.js') + ], use: [ StringReplacePlugin.replace({ replacements: [{ pattern: /$/, @@ -189,7 +206,9 @@ if(IsDev) { }); } else { Config.module.rules.push({ - test: /bibi-zip-loader/, + include: [ + /bibi-zip-loader/ + ], use: [ StringReplacePlugin.replace({ replacements: [{ pattern: /# sourceURL=webpack:\/+/g, @@ -206,7 +225,7 @@ if(IsDev) { }]}) ] }); - for(const N in Bibi.Banners) if(N) Config.plugins.push(new Webpack.BannerPlugin({ test: new RegExp(N.replace(/([\/\.])/g, '\\$1') + '$'), banner: Bibi.Banners[N], raw: true })); + for(const B in Bibi.Banners) if(B && Bibi.Banners[B]) Config.plugins.push(new Webpack.BannerPlugin({ test: B, banner: Bibi.Banners[B], raw: true })); Config.optimization.minimizer.push(new TerserPlugin({ cache: true, parallel: true, From 89425fdf2cdb9f434e60209d7801df5b8a98cdde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Wed, 29 Apr 2020 13:06:22 +0900 Subject: [PATCH 38/43] Refactor. And edit button labelings for view mode changing. --- __src/bibi/presets/default.js | 2 +- __src/bibi/resources/scripts/bibi.heart.js | 73 +++++++++++----------- __src/bibi/resources/styles/_main.scss | 2 +- 3 files changed, 38 insertions(+), 39 deletions(-) diff --git a/__src/bibi/presets/default.js b/__src/bibi/presets/default.js index 8715ecec..80e51564 100644 --- a/__src/bibi/presets/default.js +++ b/__src/bibi/presets/default.js @@ -12,7 +12,7 @@ Bibi.preset({ //-- Behavior //---------------------------------------------------------------------------------------------------------------------------------------------- -"reader-view-mode" : "paged", // "paged" or "vertical" or "horizontal" ("paged" is for flipping, "vertical" and "horizontal" are for scrolling) +"reader-view-mode" : "paged", // "paged" or "horizontal" or "vertical" ("paged" is for flipping, "horizontal" and "vertical" are for scrolling) "full-breadth-layout-in-scroll" : "no", // "yes" or "no" or "desktop" or "mobile" "fix-reader-view-mode" : "no", // "yes" or "no" or "desktop" or "mobile" diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index c9a55cc5..3ff16d7b 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -78,14 +78,14 @@ Bibi.SettingTypes_PresetOnly = { 'bookshelf' ], 'integer': [ - 'max-history', - 'max-bookmarks' + 'max-bookmarks', + 'max-history' ], 'number': [ ], 'array': [ - 'extract-if-necessary', 'extensions', + 'extract-if-necessary', 'trustworthy-origins' ] }; @@ -118,35 +118,38 @@ Bibi.SettingTypes_UserOnly = { Bibi.verifySettingValue = (SettingType, _P, _V, Fill) => Bibi.verifySettingValue[SettingType](_P, _V, Fill); (Verifiers => { for(const SettingType in Verifiers) Bibi.verifySettingValue[SettingType] = Verifiers[SettingType]; })({ 'boolean': (_P, _V, Fill) => { if(typeof _V == 'boolean') return _V; - if(_V == 'true' || _V == '1' || _V == 1) return true; - if(_V == 'false' || _V == '0' || _V == 0) return false; + if(_V === 'true' || _V === '1' || _V === 1) return true; + if(_V === 'false' || _V === '0' || _V === 0) return false; if(Fill) return false; }, 'yes-no': (_P, _V, Fill) => { if(/^(yes|no|mobile|desktop)$/.test(_V)) return _V; - if(_V == 'true' || _V == '1' || _V == 1) return 'yes'; - if(_V == 'false' || _V == '0' || _V == 0) return 'no'; + if(_V === 'true' || _V === '1' || _V === 1) return 'yes'; + if(_V === 'false' || _V === '0' || _V === 0) return 'no'; if(Fill) return 'no'; }, 'string': (_P, _V, Fill) => { - if(typeof _V == 'string' && _V) { + if(typeof _V == 'string') { switch(_P) { - case 'book': return decodeURIComponent(_V).trim() || undefined; - case 'bibidi': return R.getBibiToDestination(_V) || undefined; - case 'reader-view-mode': return /^(paged|horizontal|vertical)$/.test(_V) ? _V : undefined; - case 'default-page-progression-direction': return /^(ltr|rtl)$/.test(_V) ? _V : undefined; - case 'pagination-method': return (_V == 'x') ? _V : undefined; + case 'bibidi' : return R.getBibiToDestination(_V) || undefined; + case 'book' : return decodeURIComponent(_V).trim() || undefined; + case 'default-page-progression-direction' : return /^(ltr|rtl)$/.test(_V) ? _V : 'ltr'; + case 'pagination-method' : return _V == 'x' ? _V : 'auto'; + case 'reader-view-mode' : return /^(paged|horizontal|vertical)$/.test(_V) ? _V : 'paged'; } return _V; } if(Fill) return ''; }, 'integer': (_P, _V, Fill) => { - if(typeof (_V *= 1) == 'number' && isFinite(_V) && _V >= 0) { + if(typeof (_V *= 1) == 'number' && isFinite(_V)) { + _V = Math.max(Math.round(_V), 0); switch(_P) { - case 'log': return _V > 9 ? 9 : Math.round(_V); + case 'log' : return Math.min(_V, 9); + case 'max-bookmarks' : return Math.min(_V, 9); + case 'max-history' : return Math.min(_V, 19); } - return Math.round(_V); + return _V; } if(Fill) return 0; }, @@ -155,12 +158,18 @@ Bibi.verifySettingValue = (SettingType, _P, _V, Fill) => Bibi.verifySettingValue if(Fill) return 0; }, 'array': (_P, _V, Fill) => { - if(_V instanceof Array) return _V; + if(_V instanceof Array) { + switch(_P) { + case 'extensions' : return _V.filter(_I => typeof _I['src'] == 'string' && (_I['src'] = _I['src'].trim())); + case 'extract-if-necessary' : return (_V = _V.map(_I => typeof _I == 'string' ? _I.trim().toLowerCase() : '')).includes('*') ? ['*'] : _V.filter(_I => /^(\.[\w\d]+)*$/.test(_I)); + case 'trustworthy-origins' : return _V.reduce((_VN, _I) => typeof _I == 'string' && /^https?:\/\/[^\/]+$/.test(_I = _I.trim().replace(/\/$/, '')) && !_VN.includes(_I) ? _VN.push(_I) && _VN : false, []); + } + return _V.filter(_I => typeof _I != 'function'); + } if(Fill) return []; } }); - Bibi.applyFilteredSettingsTo = (To, From, ListOfSettingTypes, Fill) => { ListOfSettingTypes.forEach(STs => { for(const ST in STs) { @@ -3295,20 +3304,20 @@ I.Menu = { create: () => { const Config = I.Menu.Config; const /* SpreadShapes */ SSs = (/* SpreadShape */ SS => SS + SS + SS)((/* ItemShape */ IS => `${ IS + IS }`)(``)); const Section = Config.ViewModeSection = Config.addSection({ - Labels: { default: { default: `View Mode`, ja: `表示モード` } }, + Labels: { default: { default: `View Mode`, ja: `閲覧モード` } }, ButtonGroups: [{ ButtonType: 'radio', Buttons: [{ Mode: 'paged', - Labels: { default: { default: `Paged (Flip with ${ O.TouchOS ? 'Tap/Swipe' : 'Click/Wheel' })`, ja: `ページ単位(${ O.TouchOS ? 'タップ/スワイプ' : 'クリック/ホイール' }で移動)` } }, + Labels: { default: { default: `Spread / Page`, ja: `見開き/ページ` } }, Icon: `${ SSs }` }, { Mode: 'horizontal', - Labels: { default: { default: `Horizontal Scroll`, ja: `横スクロール` } }, + Labels: { default: { default: `Horizontal Scroll`, ja: `横スクロール` } }, Icon: `${ SSs }` }, { Mode: 'vertical', - Labels: { default: { default: `Vertical Scroll`, ja: `縦スクロール` } }, + Labels: { default: { default: `Vertical Scroll`, ja: `縦スクロール` } }, Icon: `${ SSs }` }].map(Button => sML.edit(Button, { Notes: true, @@ -4289,8 +4298,8 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; }), Position: 'left', id: 'bibi-subpanel_bookmarks', - onopened: () => { E.add( 'bibi:scrolled', () => BookmarkManager.update()); BookmarkManager.update(); }, - onclosed: () => { E.remove('bibi:scrolled', () => BookmarkManager.update()); } + onopened: () => { E.add( 'bibi:scrolled', BookmarkManager.update); BookmarkManager.update(); }, + onclosed: () => { E.remove('bibi:scrolled', BookmarkManager.update); } }); BookmarkManager.ButtonGroup = BookmarkManager.Subpanel.addSection({ id: 'bibi-subpanel-section_bookmarks', @@ -4429,7 +4438,9 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; } } O.Biscuits.memorize('Book', { Bookmarks: BookmarkManager.Bookmarks }); - E.dispatch('bibi:updated-bookmarks', BookmarkManager.Bookmarks); + /**/ E.dispatch('bibi:updated-bookmarks', BookmarkManager.Bookmarks); + if(Opt.Added) E.dispatch( 'bibi:added-bookmark', BookmarkManager.Bookmarks); + if(Opt.Removed) E.dispatch('bibi:removed-bookmark', BookmarkManager.Bookmarks); }, }; BookmarkManager.initialize(); @@ -5091,18 +5102,6 @@ S.initialize = () => { // -------- if(typeof S['parent-bibi-index'] != 'number') delete S['parent-bibi-index']; // -------- - S['extract-if-necessary'] = (() => { - if(!S['extract-if-necessary'].length) return []; - if(S['extract-if-necessary'].includes('*')) return ['*']; - const UnzipIfNecessary = []; - for(let l = S['extract-if-necessary'].length, i = 0; i < l; i++) { - let Ext = S['extract-if-necessary'][i]; - if(typeof Ext != 'string' || !/^(\.[\w\d]+)*$/.test(Ext)) continue; - Ext = Ext.toLowerCase(); - if(!UnzipIfNecessary.includes(Ext)) UnzipIfNecessary.push(Ext); - } - return UnzipIfNecessary; - })(); if(S['book'] || !window.File) S['accept-local-file'] = false, S['accept-blob-converted-data'] = false, S['accept-base64-encoded-data'] = false; else S['accept-local-file'] = S['accept-local-file'] && (S['extract-if-necessary'].includes('*') || S['extract-if-necessary'].includes('.epub') || S['extract-if-necessary'].includes('.zip')) ? true : false; // -------- diff --git a/__src/bibi/resources/styles/_main.scss b/__src/bibi/resources/styles/_main.scss index 8ec15465..e4705d34 100644 --- a/__src/bibi/resources/styles/_main.scss +++ b/__src/bibi/resources/styles/_main.scss @@ -2,7 +2,6 @@ // + Main // -------------------------------------------------------------------------------- - main#bibi-main { & { overflow: hidden; @@ -84,6 +83,7 @@ main#bibi-main { // @____Bibi:Dress__('-') @include Main__SubpanelOpened(); } } + div#bibi-main-book { box-sizing: content-box;//box-sizing: border-box; display: flex; From a6844d2d961527fe84e0ed0345a0ad6f3b0e64bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Fri, 8 May 2020 20:24:11 +0900 Subject: [PATCH 39/43] Enhance support for touch/mouse/wheel/key operations. And make them customizable. --- __src/bibi/presets/default.js | 22 +- __src/bibi/resources/scripts/bibi.heart.js | 713 +++++++++++---------- __src/bibi/resources/styles/_stage.scss | 2 + 3 files changed, 408 insertions(+), 329 deletions(-) diff --git a/__src/bibi/presets/default.js b/__src/bibi/presets/default.js index 80e51564..003748b5 100644 --- a/__src/bibi/presets/default.js +++ b/__src/bibi/presets/default.js @@ -32,13 +32,12 @@ Bibi.preset({ "use-full-height" : "yes", // "yes" or "no" or "desktop" or "mobile". If "use-menubar" is interpreted as "no", "use-full-height" is always treated as "yes". "use-arrows" : "yes", // "yes" or "no" or "desktop" or "mobile" -"use-keys" : "yes", // "yes" or "no" or "desktop" or "mobile" -"accept-orthogonal-input" : "no", // "yes" or "no" or "desktop" or "mobile" "flipper-width" : 0.25, // Number of ratio (less than 1) or pixel (1 or greater) +"use-keys" : "yes", // "yes" or "no" or "desktop" or "mobile" + "use-slider" : "yes", // "yes" or "no" or "desktop" or "mobile" "slider-mode" : "auto", // "edgebar" or "bookmap" or "auto" -"zoom-out-for-utilities" : "yes", // "yes" or "no" or "desktop" or "mobile" "use-nombre" : "yes", // "yes" or "no" or "desktop" or "mobile" @@ -49,6 +48,7 @@ Bibi.preset({ "use-loupe" : "desktop", // "yes" or "no" or "desktop" or "mobile" (Note: Loupe buttons will not appear in touch-devices even if it is set "yes" or "mobile".) "loupe-max-scale" : 4, // Number of scale (greater than 1) "loupe-scale-per-step" : 1.6, // Number of scale (greater than 1, less than or equal to "loupe-max-scale") +"zoom-out-for-utilities" : "yes", // "yes" or "no" or "desktop" or "mobile" "use-history" : "yes", // "yes" or "no" or "desktop" or "mobile" "max-history" : 19, // Number (0-19). If larger than 19, treated as 19. If 0, "use-history" is treated as "no". @@ -70,6 +70,20 @@ Bibi.preset({ "fix-nav-ttb" : "no", // "yes" or "no" or "desktop" or "mobile" +"content-draggable" : [true, true], // [, ] +"orthogonal-arrow-keys" : ["move", "switch"], // [, ] +"orthogonal-edges" : ["utilities", "utilities"], // [, ] +"orthogonal-touch-moves" : ["move", "switch"], // [, ] +"orthogonal-wheelings" : ["move", "across"], // [, ] +// ^ Each item of the arrays corresponds to the view mode: +// * the first is for the "paged" view mode, and +// * the second is for the "horizontal"/"vertical" scroll view modes. +// ^ Types of the values: +// * : true or false +// * : "" (ignore) or "utilities" or "move" +// * : "" (ignore) or "utilities" or "move" or "switch" +// * : "" (ignore) or "utilities" or "move" or "switch" or "across" + //============================================================================================================================================== //-- Extensions @@ -186,4 +200,4 @@ Bibi.preset({ */ -"bibi": "EPUB Reader on your website." }); \ No newline at end of file +"bibi": "EPUB Reader on your website." }); diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index 3ff16d7b..f9f86688 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -16,7 +16,6 @@ Bibi.SettingTypes = { 'prioritise-fallbacks' ], 'yes-no': [ - 'accept-orthogonal-input', 'autostart', 'autostart-embedded', 'fix-nav-ttb', @@ -59,6 +58,11 @@ Bibi.SettingTypes = { 'orientation-border-ratio' ], 'array': [ + 'content-draggable', + 'orthogonal-edges', + 'orthogonal-arrow-keys', + 'orthogonal-touch-moves', + 'orthogonal-wheelings' ] }; @@ -160,9 +164,14 @@ Bibi.verifySettingValue = (SettingType, _P, _V, Fill) => Bibi.verifySettingValue 'array': (_P, _V, Fill) => { if(_V instanceof Array) { switch(_P) { - case 'extensions' : return _V.filter(_I => typeof _I['src'] == 'string' && (_I['src'] = _I['src'].trim())); - case 'extract-if-necessary' : return (_V = _V.map(_I => typeof _I == 'string' ? _I.trim().toLowerCase() : '')).includes('*') ? ['*'] : _V.filter(_I => /^(\.[\w\d]+)*$/.test(_I)); - case 'trustworthy-origins' : return _V.reduce((_VN, _I) => typeof _I == 'string' && /^https?:\/\/[^\/]+$/.test(_I = _I.trim().replace(/\/$/, '')) && !_VN.includes(_I) ? _VN.push(_I) && _VN : false, []); + case 'content-draggable' : _V.length = 2; for(let i = 0; i < 2; i++) _V[i] = _V[i] === false || _V[i] === 'false' || _V[i] === '0' || _V[i] === 0 ? false : true; return _V; + case 'extensions' : return _V.filter(_I => typeof _I['src'] == 'string' && (_I['src'] = _I['src'].trim())); + case 'extract-if-necessary' : return (_V = _V.map(_I => typeof _I == 'string' ? _I.trim().toLowerCase() : '')).includes('*') ? ['*'] : _V.filter(_I => /^(\.[\w\d]+)*$/.test(_I)); + case 'orthogonal-arrow-keys' : + case 'orthogonal-edges' : + case 'orthogonal-touch-moves' : + case 'orthogonal-wheelings' : _V.length = 2; for(let i = 0; i < 2; i++) _V[i] = typeof _V[i] == 'string' ? _V[i] : ''; return _V; + case 'trustworthy-origins' : return _V.reduce((_VN, _I) => typeof _I == 'string' && /^https?:\/\/[^\/]+$/.test(_I = _I.trim().replace(/\/$/, '')) && !_VN.includes(_I) ? _VN.push(_I) && _VN : false, []); } return _V.filter(_I => typeof _I != 'function'); } @@ -1272,10 +1281,6 @@ L.postprocessItem = (Item) => { } } }); - if(!O.TouchOS) { - if(!sML.UA.Gecko) Item.contentDocument.addEventListener('wheel', R.Main.listenWheel, E.Cpt1Psv0); - } - I.TouchObserver.activateHTML(Item.HTML); L.coordinateLinkages(Item.Path, Item.Body); const Lv1Eles = Item.contentDocument.querySelectorAll('body>*:not(script):not(style)'); if(Lv1Eles && Lv1Eles.length == 1) { @@ -1390,16 +1395,6 @@ R.initialize = () => { R.Main = O.Body.insertBefore(sML.create('main', { id: 'bibi-main' }), O.Body.firstElementChild); R.Main.Book = R.Main.appendChild(sML.create('div', { id: 'bibi-main-book' })); //R.Sub = O.Body.insertBefore(sML.create('div', { id: 'bibi-sub' }), R.Main.nextSibling); - R.Main.listenWheel = (Eve) => { - if(S.RVM == 'paged') return; - Eve.preventDefault(); - Eve.stopPropagation(); - R.Main.scrollLeft = R.Main.scrollLeft + Eve.deltaX; - R.Main.scrollTop = R.Main.scrollTop + Eve.deltaY; - }; - E.bind('bibi:readied', () => { - I.TouchObserver.activateHTML(O.HTML); - }); }; @@ -2264,9 +2259,10 @@ R.scrollBy = (Par) => new Promise((resolve, reject) => { case 'rtl': ScrollTarget.X = R.Main.scrollLeft + R.Stage.Width * Par.Distance * -1; break; } sML.scrollTo(ScrollTarget, { - ForceScroll: true, - Duration: typeof Par.Duration == 'number' ? Par.Duration : (S.RVM != 'paged' && S.SLA == S.ARA) ? 100 : 0 - }).then(() => { + Duration: typeof Par.Duration == 'number' ? Par.Duration : (S.RVM != 'paged' && S.SLA == S.ARA) ? 100 : 0, + ForceScroll: Par.Cancelable ? false : true, + ease: typeof Par.ease == 'function' ? Par.ease : null + }).catch(() => true).then(() => { R.Moving = false; resolve(); }); @@ -2289,6 +2285,7 @@ export const I = {}; // Bibi.UserInterfaces I.initialize = () => { + I.Utilities.create(); I.TouchObserver.create(); I.Notifier.create(); I.Veil.create(); @@ -2309,22 +2306,33 @@ I.initialize = () => { }); E.bind('bibi:prepared', () => { I.FlickObserver.create(); + I.WheelObserver.create(); I.PinchObserver.create(); I.KeyObserver.create(); + I.EdgeObserver.create(); I.Nombre.create(); I.Slider.create(); I.Turner.create(); I.Arrows.create(); + I.AxisSwitcher.create(); I.Spinner.create(); }); - I.Utilities = I.setToggleAction({}, { +}; + + +I.Utilities = { create: () => { + const Utilities = I.Utilities = I.setToggleAction({ + openGracefuly: () => R.Moving || R.Breaking || Utilities.UIState == 'active' ? false : Utilities.open(), + closeGracefuly: () => R.Moving || R.Breaking || Utilities.UIState == 'default' ? false : Utilities.close(), + toggleGracefuly: () => R.Moving || R.Breaking ? false : Utilities.toggle() + }, { onopened: () => E.dispatch('bibi:opens-utilities'), onclosed: () => E.dispatch('bibi:closes-utilities') }); E.add('bibi:commands:open-utilities', () => I.Utilities.open()); E.add('bibi:commands:close-utilities', () => I.Utilities.close()); - E.add('bibi:commands:toggle-utilities', () => I.Utilities.toggle()); -}; + E.add('bibi:commands:toggle-utilities', () => I.Utilities.toggleGracefuly()); +}}; I.ScrollObserver = { create: () => { @@ -2353,9 +2361,13 @@ I.ScrollObserver = { create: () => { }, observe: () => { R.Main.addEventListener('scroll', ScrollObserver.onScroll); + }, + breakCurrentScrolling: () => { + try { R.Breaking = true; sML.Scroller.Scrolling.cancel(); setTimeout(() => R.Breaking = false, 333); } catch(Err) { R.Breaking = false; } } } E.bind('bibi:opened', ScrollObserver.observe); + E.dispatch('bibi:created-scroll-observer'); }}; @@ -2531,6 +2543,7 @@ I.PageObserver = { create: () => { PageObserver.observeCurrent(); PageObserver.observePageMove(); }); + E.dispatch('bibi:created-page-observer'); }}; @@ -2571,6 +2584,7 @@ I.ResizeObserver = { create: () => { } }; E.bind('bibi:opened', ResizeObserver.observe); + E.dispatch('bibi:created-resize-observer'); }}; @@ -2668,15 +2682,15 @@ I.TouchObserver = { create: () => { }); return Ele; }, - PointerEventNames: O.TouchOS ? ['touchstart', 'touchend', 'touchmove'] : document.onpointermove !== undefined ? ['pointerdown', 'pointerup', 'pointermove'] : ['mousedown', 'mouseup', 'mousemove'], + PointerEventNames: O.TouchOS ? [['touchstart', 'mousedown'], ['touchend', 'mouseup'], ['touchmove', 'mousemove']] : document.onpointermove !== undefined ? ['pointerdown', 'pointerup', 'pointermove'] : ['mousedown', 'mouseup', 'mousemove'], PreviousPointerCoord: { X: 0, Y: 0 }, activateHTML: (HTML) => { TouchObserver.observeElementTap(HTML); const TOPENs = TouchObserver.PointerEventNames; E.add(HTML, 'bibi:tapped', Eve => E.dispatch('bibi:tapped', Eve)); E.add(HTML, 'bibi:doubletapped', Eve => E.dispatch('bibi:doubletapped', Eve)); //HTML.ownerDocument.addEventListener('dblclick', Eve => { Eve.preventDefault(); Eve.stopPropagation(); return false; }); - HTML.addEventListener(TOPENs[0], Eve => E.dispatch('bibi:downed-pointer', Eve), E.Cpt1Psv0); - HTML.addEventListener(TOPENs[1], Eve => E.dispatch('bibi:upped-pointer', Eve), E.Cpt1Psv0); - HTML.addEventListener(TOPENs[2], Eve => { + E.add(HTML, TOPENs[0], Eve => E.dispatch('bibi:downed-pointer', Eve), E.Cpt1Psv0); + E.add(HTML, TOPENs[1], Eve => E.dispatch('bibi:upped-pointer', Eve), E.Cpt1Psv0); + E.add(HTML, TOPENs[2], Eve => { const CC = O.getBibiEventCoord(Eve), PC = TouchObserver.PreviousPointerCoord; E.dispatch((PC.X != CC.X || PC.Y != CC.Y) ? 'bibi:moved-pointer' : 'bibi:stopped-pointer', Eve); TouchObserver.PreviousPointerCoord = CC; @@ -2690,35 +2704,37 @@ I.TouchObserver = { create: () => { case 'horizontal': if(BibiEvent.Coord.Y > window.innerHeight - O.Scrollbars.Height) return false; else break; case 'vertical': if(BibiEvent.Coord.X > window.innerWidth - O.Scrollbars.Width) return false; else break; } - if(BibiEvent.Target.tagName) { - if(I.Slider.UI && (I.Slider.contains(BibiEvent.Target) || BibiEvent.Target == I.Slider)) return false; + if(BibiEvent.Target.ownerDocument) { if(O.isPointableContent(BibiEvent.Target)) return false; + if(I.Slider.ownerDocument && (BibiEvent.Target == I.Slider || I.Slider.contains(BibiEvent.Target))) return false; } - if(I.OpenedSubpanel) { I.OpenedSubpanel.close(); return false; } return true; }; + E.bind('bibi:readied', ( ) => TouchObserver.activateHTML( O.HTML)); + E.bind('bibi:postprocessed-item', (Item) => TouchObserver.activateHTML(Item.HTML)); E.add('bibi:tapped', Eve => { if(I.isPointerStealth()) return false; + if(I.OpenedSubpanel) return I.OpenedSubpanel.close() && false; const BibiEvent = O.getBibiEvent(Eve); if(!checkTapAvailability(BibiEvent)) return false; return BibiEvent.Division.X == 'center' && BibiEvent.Division.Y == 'middle' ? E.dispatch('bibi:tapped-center', Eve) : E.dispatch('bibi:tapped-not-center', Eve); }); E.add('bibi:doubletapped', Eve => { if(I.isPointerStealth() || !L.Opened) return false; + if(I.OpenedSubpanel) return I.OpenedSubpanel.close() && false; const BibiEvent = O.getBibiEvent(Eve); if(!checkTapAvailability(BibiEvent)) return false; return BibiEvent.Division.X == 'center' && BibiEvent.Division.Y == 'middle' ? E.dispatch('bibi:doubletapped-center', Eve) : E.dispatch('bibi:doubletapped-not-center', Eve); }); - E.add('bibi:tapped-center', Eve => { - if(I.OpenedSubpanel) E.dispatch('bibi:commands:close-utilities', Eve); - else E.dispatch('bibi:commands:toggle-utilities', Eve); - }); + E.add('bibi:tapped-center', () => I.Utilities.toggleGracefuly()); + E.dispatch('bibi:created-touch-observer'); }}; I.FlickObserver = { create: () => { const FlickObserver = I.FlickObserver = { - FocusDurationIfScrollable: 333, - isScrollable: () => (S.ARA == S.SLA && I.Loupe.CurrentTransformation.Scale == 1) ? true : false, + Moving: 0, + getDegree: (_) => (Deg => Deg < 0 ? Deg + 360 : Deg)(Math.atan2(_.Y * -1, _.X) * 180 / Math.PI), onTouchStart: (Eve) => { + if(!L.Opened) return; //if(S.RVM != 'paged' && O.TouchOS) return; if(FlickObserver.LastEvent) return FlickObserver.onTouchEnd(); if(I.Loupe.Transforming) return; @@ -2727,183 +2743,257 @@ I.FlickObserver = { create: () => { FlickObserver.StartedOn = { X: EventCoord.X, Y: EventCoord.Y, - Item: Eve.srcElement.ownerDocument.body.Item || null, + Item: Eve.target.ownerDocument.body.Item || null, TimeStamp: Eve.timeStamp, ScrollLeft: R.Main.scrollLeft, + ScrollTop: R.Main.scrollTop, OriginList: I.PageObserver.updateCurrent().List }; //Eve.preventDefault(); E.add('bibi:moved-pointer', FlickObserver.onTouchMove); E.add('bibi:upped-pointer', FlickObserver.onTouchEnd); }, + cancel: () => { + delete FlickObserver.StartedOn; + delete FlickObserver.LastEvent; + E.remove('bibi:moved-pointer', FlickObserver.onTouchMove); + E.remove('bibi:upped-pointer', FlickObserver.onTouchEnd); + FlickObserver.Moving = 0; + }, onTouchMove: (Eve) => { //if(Eve.touches && Eve.touches.length == 1 && O.getViewportZooming() <= 1) Eve.preventDefault(); + I.ScrollObserver.breakCurrentScrolling(); if(FlickObserver.StartedOn) { - if(!FlickObserver.Moving && Eve.timeStamp - FlickObserver.StartedOn.TimeStamp > 222) { - delete FlickObserver.StartedOn; - delete FlickObserver.LastEvent; - E.remove('bibi:moved-pointer', FlickObserver.onTouchMove); - E.remove('bibi:upped-pointer', FlickObserver.onTouchEnd); - return; + if(!FlickObserver.Moving && Eve.timeStamp - FlickObserver.StartedOn.TimeStamp > 333) return FlickObserver.cancel(); + const EventCoord = O.getBibiEventCoord(Eve); + const Passage = { X: EventCoord.X - FlickObserver.StartedOn.X, Y: EventCoord.Y - FlickObserver.StartedOn.Y }; + if(++FlickObserver.Moving <= 3) { + const Deg = FlickObserver.getDegree(Passage); + FlickObserver.StartedOn.LaunchingAxis = (315 <= Deg || Deg <= 45) || (135 <= Deg && Deg <= 225) ? 'X' : + ( 45 < Deg && Deg < 135) || (225 < Deg && Deg < 315) ? 'Y' : ''; } - FlickObserver.LastEvent = Eve; - FlickObserver.Moving = true; + if(FlickObserver.StartedOn.LaunchingAxis == C.A_AXIS_B) { + // Orthogonal + } else { + // Natural + if(S.RVM != 'paged' && Eve.type == 'touchmove') return FlickObserver.cancel(); + if(S['content-draggable'][S.RVM == 'paged' ? 0 : 1] && I.isScrollable()) R.Main['scroll' + C.L_OOBL_L] = FlickObserver.StartedOn['Scroll' + C.L_OOBL_L] + Passage[C.L_AXIS_L] * -1; + } + Eve.preventDefault(); if(FlickObserver.StartedOn.Item) { FlickObserver.StartedOn.Item.HTML.classList.add('bibi-flick-hot'); FlickObserver.StartedOn.Item.contentWindow.getSelection().empty(); } - Eve.preventDefault(); - if(FlickObserver.isScrollable()) { - const EventCoord = O.getBibiEventCoord(Eve); - if(EventCoord.X <= 0 || EventCoord.X >= R.Stage.Width) return FlickObserver.onTouchEnd(Eve, { Swipe: true }); - const PassageX = EventCoord.X - FlickObserver.StartedOn.X; - //const PassageY = EventCoord.Y - FlickObserver.StartedOn.Y; - R.Main.scrollLeft = FlickObserver.StartedOn.ScrollLeft + PassageX * -1; - } + FlickObserver.LastEvent = Eve; + if(EventCoord[C.A_AXIS_L] <= 0 || EventCoord[C.A_AXIS_L] >= R.Stage[C.A_SIZE_L] || EventCoord[C.A_AXIS_B] <= 0 || EventCoord[C.A_AXIS_B] >= R.Stage[C.A_SIZE_B]) return FlickObserver.onTouchEnd(Eve, { Swipe: true }); } }, onTouchEnd: (Eve, Opt) => { if(!Eve) Eve = FlickObserver.LastEvent; E.remove('bibi:moved-pointer', FlickObserver.onTouchMove); E.remove('bibi:upped-pointer', FlickObserver.onTouchEnd); - FlickObserver.Moving = false; + FlickObserver.Moving = 0; let cb = undefined, Par = {}; if(FlickObserver.StartedOn) { - if(FlickObserver.StartedOn.Item) { - FlickObserver.StartedOn.Item.HTML.classList.remove('bibi-flick-hot'); - } + const EventCoord = O.getBibiEventCoord(Eve); + const Passage = { X: EventCoord.X - FlickObserver.StartedOn.X, Y: EventCoord.Y - FlickObserver.StartedOn.Y }; + if(FlickObserver.StartedOn.Item) FlickObserver.StartedOn.Item.HTML.classList.remove('bibi-flick-hot'); if(!I.Loupe.Transforming) { - const EventCoord = O.getBibiEventCoord(Eve); - const PassageX = EventCoord.X - FlickObserver.StartedOn.X; - const PassageY = EventCoord.Y - FlickObserver.StartedOn.Y; - if(Math.abs(PassageX) < 3 && Math.abs(PassageY) < 3) { // Not Moved (== Tap) - // [[[[ Do Nothing ]]]] (to avoid conflicts with other tap events on other UIs like Arrows.) - } else { // Moved (== not Tap) + if(FlickObserver.StartedOn.LaunchingAxis == C.A_AXIS_B && Math.abs(Passage[C.A_AXIS_B] / 100) >= 1) { + // Orthogonal Pan/Releace + cb = FlickObserver.switchAxis_or_toggleUtilities(); + } + if(!cb && Math.abs(Passage.X) >= 3 || Math.abs(Passage.Y) >= 3) { + // Moved (== not Tap) Eve.preventDefault(); - Par.Deg = Math.atan2(PassageY * -1, PassageX) * 180 / Math.PI; if(Par.Deg < 0) Par.Deg += 360; + Par.Speed = Math.sqrt(Math.pow(Passage.X, 2) + Math.pow(Passage.Y, 2)) / (Eve.timeStamp - FlickObserver.StartedOn.TimeStamp); + Par.Deg = FlickObserver.getDegree(Passage); if(O.getViewportZooming() <= 1 && (Eve.timeStamp - FlickObserver.StartedOn.TimeStamp) <= 300) { Par.OriginList = FlickObserver.StartedOn.OriginList; cb = (Opt && Opt.Swipe) ? FlickObserver.onSwipe : FlickObserver.onFlick; - } else if(FlickObserver.isScrollable()) { + } else if(I.isScrollable()) { cb = FlickObserver.onPanRelease; } + } else { + // Not Moved (== Tap) + // [[[[ Do Nothing ]]]] (to avoid conflicts with other tap events on other UIs like Arrows.) } } delete FlickObserver.StartedOn; } delete FlickObserver.LastEvent; - return cb ? cb(Eve, Par) : Promise.resolve(); + return (cb ? cb(Eve, Par) : Promise.resolve()); }, onFlick: (Eve, Par) => { - const Deg = Par.Deg || 0; + if(S.RVM != 'paged' && !S['content-draggable'][S.RVM == 'paged' ? 0 : 1]) return Promise.resolve(); + if(typeof Par.Deg != 'number') return Promise.resolve(); + const Deg = Par.Deg; const Dir = (330 <= Deg || Deg <= 30) ? 'left' /* to right */ : ( 60 <= Deg && Deg <= 120) ? 'bottom' /* to top */ : (150 <= Deg && Deg <= 210) ? 'right' /* to left */ : (240 <= Deg && Deg <= 300) ? 'top' /* to bottom */ : ''; - const Distance = (I.Turner[Dir] ? I.Turner[Dir].Distance : 0) || 0; - const PageIndex = (Distance >= 0 ? Par.OriginList.slice(-1)[0].Page.Index : Par.OriginList[0].Page.Index); - return R.focusOn({ Destination: { Page: R.Pages[PageIndex + Distance] ? R.Pages[PageIndex + Distance] : R.Pages[PageIndex] }, Duration: FlickObserver.isScrollable() ? FlickObserver.FocusDurationIfScrollable : 0 }); + const Dist = C.d2d(Dir, I.orthogonal('touch-moves') == 'move'); + if(!Dist) { + // Orthogonal (not for "move") + return new Promise(resolve => { + FlickObserver.switchAxis_or_toggleUtilities()(); + resolve(); + }); + } else if(S.RVM == 'paged' || S.RVM != (/^[lr]/.test(Dir) ? 'horizontal' : /^[tb]/.test(Dir) ? 'vertical' : '')) { + // Paged || Scrolling && Orthogonal + const PageIndex = (Dist > 0 ? Par.OriginList.slice(-1)[0].Page.Index : Par.OriginList[0].Page.Index); + return R.focusOn({ + Destination: { Page: R.Pages[PageIndex + Dist] ? R.Pages[PageIndex + Dist] : R.Pages[PageIndex] }, + Duration: !I.isScrollable() ? 0 : S.RVM != 'paged' || S['content-draggable'][0] ? 123 : 0 + }); + } else { + // Scrolling && Natural + return R.scrollBy({ + Distance: Dist * (Par.Speed ? sML.limitMinMax(Math.round(Par.Speed * 100) * 0.08, 0.33, 10) * 333 / (S.SLD == 'ttb' ? R.Stage.Height : R.Stage.Width) : 1), + Duration: 1234, + Cancelable: true, + ease: (_) => (Math.pow((_ - 1), 4) - 1) * -1 + }); + } }, onSwipe: (Eve, Par) => FlickObserver.onFlick(Eve, Par), onPanRelease: (Eve, Par) => { - if(S.RVM != 'paged') return Promise.resolve(); + if(S.RVM != 'paged' || !S['content-draggable'][0]) return Promise.resolve(); // Only for Paged View ==== const Deg = Par.Deg; - let Dir = (315 <= Deg ) ? ['left', 'top'] /* to right, bottom */ : - ( Deg == 0 ) ? ['left' ] /* to right (just) */ : - ( 0 < Deg && Deg <= 45) ? ['left', 'bottom'] /* to right, top */ : - ( 45 < Deg && Deg < 90) ? ['bottom', 'left'] /* to top, right */ : - ( Deg == 90 ) ? ['bottom' ] /* to top (just) */ : - ( 90 < Deg && Deg < 135) ? ['bottom', 'right'] /* to top, left */ : - (135 <= Deg && Deg < 180) ? ['right', 'bottom'] /* to left, top */ : - ( Deg == 180 ) ? ['right' ] /* to left (just) */ : - (180 < Deg && Deg <= 225) ? ['right', 'top'] /* to left, bottom */ : - (225 < Deg && Deg < 270) ? ['top', 'right'] /* to bottom, left */ : - ( Deg == 270 ) ? ['top' ] /* to bottom (just) */ : - (270 < Deg && Deg < 315) ? ['top', 'left'] /* to bottom, right */ : ['', '']; - Dir = S['accept-orthogonal-input'] ? Dir[0] : Dir.includes('left') ? 'left' : Dir.includes('right') ? 'right' : ''; - const Distance = (I.Turner[Dir] ? I.Turner[Dir].Distance : 0) || 0; + const Dir = (270 < Deg || Deg < 90) ? 'left' /* to right */ : + ( 90 < Deg && Deg < 270) ? 'right' /* to left */ : ''; + const Dist = C.d2d(Dir); const CurrentList = I.PageObserver.updateCurrent().List; - return R.focusOn({ Destination: { Page: (Distance >= 0 ? CurrentList.slice(-1)[0].Page : CurrentList[0].Page) }, Duration: FlickObserver.isScrollable() ? FlickObserver.FocusDurationIfScrollable : 0 }); - }, - onWheel: (Eve) => { - if(S.RVM != 'paged') return; - Eve.preventDefault(); - const WA /* WheelAxis */ = Math.abs(Eve.deltaX) > Math.abs(Eve.deltaY) ? 'X' : 'Y'; - if(!FlickObserver.PreviousWheels || (FlickObserver.PreviousWheels.length && FlickObserver.PreviousWheels[FlickObserver.PreviousWheels.length - 1].Axis != WA)) FlickObserver.PreviousWheels = []; - const /* CurrentWheel */ CW = {}, PWs = FlickObserver.PreviousWheels, PWl = PWs.length; - CW.Axis = WA; - CW.Distance = (Eve['delta' + WA] < 0 ? -1 : 1) * (WA == 'X' && S.ARD == 'rtl' ? -1 : 1); - CW.Delta = { X: 0, Y: 0 }, CW.Delta[WA] = Math.abs(Eve['delta' + WA]); - if(!PWs[PWl - 1]) { - CW.Accel = 1, CW.Wheeled = 'start'; - } else if(CW.Distance != PWs[PWl - 1].Distance) { - CW.Accel = 1; - if(PWl >= 3 && PWs[PWl - 2].Distance != CW.Distance && PWs[PWl - 3].Distance != CW.Distance) CW.Wheeled = 'reverse'; - } else if(CW.Delta[WA] > PWs[PWl - 1].Delta[WA]) { - CW.Accel = 1; - if(PWl >= 3 && PWs[PWl - 1].Accel == -1 && PWs[PWl - 2].Accel == -1 && PWs[PWl - 3].Accel == -1) CW.Wheeled = 'serial'; - } else if(CW.Delta[WA] < PWs[PWl - 1].Delta[WA]) { - CW.Accel = -1; - } else { - CW.Accel = PWs[PWl - 1].Accel; - } - if(CW.Wheeled && !FlickObserver.Hot) { - clearTimeout(FlickObserver.Timer_coolDown); - FlickObserver.Hot = true; - FlickObserver.Timer_coolDown = setTimeout(() => FlickObserver.Hot = false, 192); - R.moveBy({ Distance: CW.Distance, Duration: FlickObserver.isScrollable() ? FlickObserver.FocusDurationIfScrollable : 0 }); - } - if(PWl >= 3) PWs.shift(); - PWs.push(CW); - clearTimeout(FlickObserver.Timer_resetWheeling); - FlickObserver.Timer_resetWheeling = setTimeout(() => FlickObserver.PreviousWheels = [], 192); + return R.focusOn({ + Destination: { Page: (Dist >= 0 ? CurrentList.slice(-1)[0].Page : CurrentList[0].Page) }, + Duration: !I.isScrollable() ? 0 : S['content-draggable'][0] ? 123 : 0 + }); }, + switchAxis_or_toggleUtilities: () => { switch(I.orthogonal('touch-moves')) { + case 'switch': if(S.RVM != 'paged' && I.AxisSwitcher) return I.AxisSwitcher.switchAxis; break; + case 'utilities': return I.Utilities.toggleGracefuly; break; + } }, getCNPf: (Ele) => Ele.ownerDocument == document ? '' : 'bibi-', activateElement: (Ele) => { if(!Ele) return false; Ele.addEventListener(E['pointerdown'], FlickObserver.onTouchStart, E.Cpt1Psv0); const CNPf = FlickObserver.getCNPf(Ele); /**/ Ele.ownerDocument.documentElement.classList.add(CNPf + 'flick-active'); - if(FlickObserver.isScrollable()) Ele.ownerDocument.documentElement.classList.add(CNPf + 'flick-scrollable'); - Ele.addEventListener('wheel', FlickObserver.onWheel, E.Cpt1Psv0); + if(I.isScrollable()) Ele.ownerDocument.documentElement.classList.add(CNPf + 'flick-scrollable'); }, deactivateElement: (Ele) => { if(!Ele) return false; Ele.removeEventListener(E['pointerdown'], FlickObserver.onTouchStart, E.Cpt1Psv0); const CNPf = FlickObserver.getCNPf(Ele); Ele.ownerDocument.documentElement.classList.remove(CNPf + 'flick-active'); Ele.ownerDocument.documentElement.classList.remove(CNPf + 'flick-scrollable'); - Ele.removeEventListener('wheel', FlickObserver.onWheel, E.Cpt1Psv0); - }, - activate: () => { FlickObserver.activateElement( R.Main); R.Items.forEach(Item => FlickObserver.activateElement( Item.HTML)); }, - deactivate: () => { FlickObserver.deactivateElement(R.Main); R.Items.forEach(Item => FlickObserver.deactivateElement(Item.HTML)); }, - update: () => { - if(S.RVM != 'paged') return FlickObserver.close(); - return FlickObserver.open(); } }; - I.setToggleAction(FlickObserver, { - onopened: () => FlickObserver.activate(), - onclosed: () => FlickObserver.deactivate() - }); + FlickObserver.activateElement(R.Main); + E.add('bibi:loaded-item', Item => FlickObserver.activateElement(Item.HTML)); + E.dispatch('bibi:created-flick-observer'); +}}; + + +I.WheelObserver = { create: () => { + const WheelObserver = I.WheelObserver = { + TotalDelta: 0, + Turned: false, + Wheels: [], + reset: () => { + WheelObserver.TotalDelta = 0; + WheelObserver.Progress = 0; + WheelObserver.Turned = false; + WheelObserver.Wheels = []; + }, + reserveResetWith: (fn) => { + clearTimeout(WheelObserver.Timer_resetWheeling); + try { fn(); } catch(Err) {} + WheelObserver.Timer_resetWheeling = setTimeout(WheelObserver.reset, 234); + }, + careTurned: () => { + WheelObserver.reserveResetWith(() => WheelObserver.Turned = true); + }, + heat: () => { + clearTimeout(WheelObserver.Timer_coolDown); + WheelObserver.Hot = true; + WheelObserver.Timer_coolDown = setTimeout(() => WheelObserver.Hot = false, 234); + }, + onWheel: (Eve) => { + //if(WheelObserver.Turned) return WheelObserver.careTurned(); + const WA /* WheelAxis */ = Math.abs(Eve.deltaX) > Math.abs(Eve.deltaY) ? 'X' : 'Y'; + const CW /* CurrentWheel */ = {}, Ws = WheelObserver.Wheels, Wl = Ws.length; + //if(Wl && Ws[Wl - 1].Axis != WA) WheelObserver.Wheels = []; + CW.Axis = WA; + CW.Direction = WA == 'X' ? (Eve.deltaX < 0 ? 'left' : 'right') : (Eve.deltaY < 0 ? 'top' : 'bottom'); + CW.Distance = C.d2d(CW.Direction, 'Allow Orthogonal Direction'); + CW.Delta = Math.abs(Eve['delta' + WA]); + if(!Ws[Wl - 1]) CW.Accel = 1, CW.Wheeled = 'start'; + else if(CW.Axis != Ws[Wl - 1].Axis ) return WheelObserver.careTurned(); //////// + else if(CW.Distance != Ws[Wl - 1].Distance) CW.Accel = 1, CW.Wheeled = (Wl >= 3 && Ws[Wl - 2].Distance != CW.Distance && Ws[Wl - 3].Distance != CW.Distance) ? 'reverse' : ''; + else if(CW.Delta > Ws[Wl - 1].Delta ) CW.Accel = 1, CW.Wheeled = (Wl >= 3 && Ws[Wl - 1].Accel == -1 && Ws[Wl - 2].Accel == -1 && Ws[Wl - 3].Accel == -1 ) ? 'serial' : ''; + else if(CW.Delta < Ws[Wl - 1].Delta ) CW.Accel = -1, CW.Wheeled = ''; + else CW.Accel = Ws[Wl - 1].Accel, CW.Wheeled = ''; + WheelObserver.reserveResetWith(() => { + Ws.push(CW); if(Wl > 3) Ws.shift(); + WheelObserver.Progress = (WheelObserver.TotalDelta += Eve['delta' + WA]) / 3 / 100; + }); + const ToDo = WA != C.A_AXIS_L ? I.orthogonal('wheelings') : S.RVM == 'paged' ? 'move' : WheelObserver.OverlaidUIs.filter(OUI => OUI.contains(Eve.target)).length ? 'simulate' : ''; + if(!ToDo) return; + //Eve.preventDefault(); // Must not prevent. + //Eve.stopPropagation(); // No need to stop. + if(WheelObserver.Hot) return; + switch(ToDo) { + case 'simulate': return WheelObserver.scrollNatural(Eve, WA); + case 'across' : return WheelObserver.scrollAcross(Eve, WA); + case 'move': return WheelObserver.move(CW); + case 'utilities': return WheelObserver.toggleUtilities(CW); + case 'switch': return WheelObserver.switchAxis(CW); + } + }, + scrollNatural: (Eve, Axis) => { switch(Axis) { + case 'X': R.Main.scrollLeft += Eve.deltaX; break; + case 'Y': R.Main.scrollTop += Eve.deltaY; break; + } }, + scrollAcross: (Eve, Axis) => { switch(Axis) { + case 'X': R.Main.scrollTop += Eve.deltaX; break; + case 'Y': R.Main.scrollLeft += Eve.deltaY * (S.ARD == 'rtl' ? -1 : 1); break; + } }, + move: (CW) => { + if(!CW.Wheeled) return; + WheelObserver.heat(); + R.moveBy({ Distance: CW.Distance, Duration: I.isScrollable() && S['content-draggable'][0] ? 123 : 0 }); + }, + toggleUtilities: (CW) => { + if(!CW.Wheeled) return; + WheelObserver.heat(); + I.Utilities.toggleGracefuly(); + }, + switchAxis: () => { + if(!I.AxisSwitcher || Math.abs(WheelObserver.Progress) < 1) return; + WheelObserver.heat(); + I.AxisSwitcher.switchAxis(); + }, + OverlaidUIs: [] + }; + document.addEventListener('wheel', Eve => E.dispatch('bibi:is-wheeling', Eve), E.Cpt1Psv0); + E.add('bibi:loaded-item', Item => Item.contentDocument.addEventListener('wheel', Eve => E.dispatch('bibi:is-wheeling', Eve), E.Cpt1Psv0)); E.add('bibi:opened', () => { - FlickObserver.update(); - E.add('bibi:updated-settings', ( ) => FlickObserver.update()); - E.add('bibi:loaded-item', Item => { - if(S.RVM != 'paged') return FlickObserver.deactivateElement(Item.HTML); - return FlickObserver.activateElement(Item.HTML); + [I.Menu, I.Slider].forEach(UI => { + if(!UI.ownerDocument) return; + UI.addEventListener('wheel', Eve => { Eve.preventDefault(); Eve.stopPropagation(); }, E.Cpt1Psv0); + WheelObserver.OverlaidUIs.push(UI); }); + E.add('bibi:is-wheeling', WheelObserver.onWheel); + O.HTML.classList.add('wheel-active'); }); - E.add('bibi:commands:activate-flick', () => FlickObserver.open()); - E.add('bibi:commands:deactivate-flick', () => FlickObserver.close()); - E.add('bibi:commands:toggle-flick', () => FlickObserver.toggle()); - E.dispatch('bibi:created-flickobserver'); + E.dispatch('bibi:created-wheel-observer'); }}; I.PinchObserver = { create: () => { const PinchObserver = I.PinchObserver = { - MagicNumber: .5, + Pinching: 0, getEventCoords: (Eve) => { - const T0 = Eve.touches[0], T1 = Eve.touches[1], Doc = Eve.srcElement.ownerDocument; + const T0 = Eve.touches[0], T1 = Eve.touches[1], Doc = Eve.target.ownerDocument; const T0CoordInViewport = { X: T0.screenX, Y: T0.screenY }; const T1CoordInViewport = { X: T1.screenX, Y: T1.screenY }; return { @@ -2912,6 +3002,7 @@ I.PinchObserver = { create: () => { }; }, onTouchStart: (Eve) => { + if(!L.Opened) return; if(Eve.touches.length != 2) return; O.HTML.classList.add('pinching'); PinchObserver.Hot = true; @@ -2923,26 +3014,25 @@ I.PinchObserver = { create: () => { }, onTouchMove: (Eve) => { if(Eve.touches.length != 2 || !PinchObserver.PinchStart) return; + console.log(PinchObserver.Pinching++); Eve.preventDefault(); Eve.stopPropagation(); + const Ratio = PinchObserver.getEventCoords(Eve).Distance / PinchObserver.PinchStart.Coords.Distance; + if(PinchObserver.Pinching++ < 3 && PinchObserver.PinchStart.Scale == 1) switch(I.Utilities.UIState) { + case 'default': if(Ratio < 1) { PinchObserver.onTouchEnd(); I.Utilities.openGracefuly(); return; } break; + case 'active': if(Ratio > 1) { PinchObserver.onTouchEnd(); I.Utilities.closeGracefuly(); return; } break; + } clearTimeout(PinchObserver.Timer_TransitionRestore); sML.style(R.Main, { transition: 'none' }); - I.Loupe.scale( - sML.limitMax( - PinchObserver.PinchStart.Scale * ((PinchObserver.getEventCoords(Eve).Distance / PinchObserver.PinchStart.Coords.Distance - 1) * PinchObserver.MagicNumber + 1), - S['loupe-max-scale'] - ), - { Center: PinchObserver.PinchStart.Coords.Center } - ); + I.Loupe.scale(PinchObserver.PinchStart.Scale * Ratio, { Center: PinchObserver.PinchStart.Coords.Center, Stepless: true }); PinchObserver.Timer_TransitionRestore = setTimeout(() => sML.style(R.Main, { transition: '' }), 234); }, onTouchEnd: (Eve, Opt) => { + PinchObserver.Pinching = 0; delete PinchObserver.LastScale; delete PinchObserver.PinchStart; delete PinchObserver.Hot; O.HTML.classList.remove('pinching'); }, - //onPinchOut: (Eve, Par) => {}, - //onPinchIn: (Eve, Par) => {}, getCNPf: (Doc) => Doc == document ? '' : 'bibi-', activateElement: (Ele) => { if(!Ele) return false; Ele.addEventListener('touchstart', PinchObserver.onTouchStart, E.Cpt1Psv0); @@ -2955,30 +3045,11 @@ I.PinchObserver = { create: () => { Ele.removeEventListener('touchmove', PinchObserver.onTouchMove, E.Cpt1Psv0); Ele.removeEventListener('touchend', PinchObserver.onTouchEnd, E.Cpt1Psv0); Ele.ownerDocument.documentElement.classList.remove(PinchObserver.getCNPf(Ele) + 'pinch-active'); - }, - activate: () => { PinchObserver.activateElement( R.Main); R.Items.forEach(Item => PinchObserver.activateElement( Item.HTML)); }, - deactivate: () => { PinchObserver.deactivateElement(R.Main); R.Items.forEach(Item => PinchObserver.deactivateElement(Item.HTML)); }, - update: () => { - //if(S.RVM != 'paged') return PinchObserver.close(); - return PinchObserver.open(); } }; - I.setToggleAction(PinchObserver, { - onopened: () => PinchObserver.activate(), - onclosed: () => PinchObserver.deactivate() - }); - E.add('bibi:opened', () => { - PinchObserver.update(); - E.add('bibi:updated-settings', ( ) => PinchObserver.update()); - E.add('bibi:loaded-item', Item => { - //if(S.RVM != 'paged') return PinchObserver.deactivateElement(Item.HTML); - return PinchObserver.activateElement(Item.HTML); - }); - }); - E.add('bibi:commands:activate-pinch', () => PinchObserver.open()); - E.add('bibi:commands:deactivate-pinch', () => PinchObserver.close()); - E.add('bibi:commands:toggle-pinch', () => PinchObserver.toggle()); - E.dispatch('bibi:created-pinchobserver'); + PinchObserver.activateElement(R.Main); + E.add('bibi:loaded-item', Item => PinchObserver.activateElement(Item.HTML)); + E.dispatch('bibi:created-pinch-observer'); }}; @@ -2991,28 +3062,21 @@ I.KeyObserver = { create: () => { if(!S['use-keys']) return; if(typeof KeyCodesToUpdate == 'function') KeyCodesToUpdate = KeyCodesToUpdate(); EventTypes.forEach(EventType => KeyObserver.KeyCodes[EventType] = sML.edit(KeyObserver.KeyCodes[EventType], KeyCodesToUpdate)); }, - MovingParameters: {}, - initializeMovingParameters: () => { - let _ = {}; - if(S['accept-orthogonal-input']) switch(B.PPD) { - case 'ltr': _ = { 'Up Arrow': -1, 'Down Arrow': 1, 'Left Arrow': -1, 'Right Arrow': 1 }; break; - case 'rtl': _ = { 'Up Arrow': -1, 'Down Arrow': 1, 'Left Arrow': 1, 'Right Arrow': -1 }; break; - } - sML.applyRtL(_, { 'End': 'foot', 'Home': 'head' }); - for(const p in _) _[p.toUpperCase()] = _[p] == -1 ? 'head' : _[p] == 1 ? 'foot' : _[p] == 'head' ? 'foot' : _[p] == 'foot' ? 'head' : 0; - //sML.applyRtL(_, { 'Space': 1, 'SPACE': -1 }); // Space key is reserved for Loupe. - return KeyObserver.MovingParameters = _; + KeyParameters: {}, + initializeKeyParameters: () => { + let _ = { 'End': 'foot', 'Home': 'head' }; + for(const p in _) _[p.toUpperCase()] = _[p] == 'head' ? 'foot' : _[p] == 'foot' ? 'head' : _[p]; + //Object.assign(_, { 'Space': 1, 'SPACE': -1 }); // Space key is reserved for Loupe. + KeyObserver.KeyParameters = _; }, - updateMovingParameters: () => { - if(S['accept-orthogonal-input']) return; - let _ = {}; - switch(S.ARD) { - case 'ltr': _ = { 'Up Arrow': 0, 'Down Arrow': 0, 'Left Arrow': -1, 'Right Arrow': 1 }; break; - case 'rtl': _ = { 'Up Arrow': 0, 'Down Arrow': 0, 'Left Arrow': 1, 'Right Arrow': -1 }; break; - case 'ttb': _ = { 'Up Arrow': -1, 'Down Arrow': 1, 'Left Arrow': 0, 'Right Arrow': 0 }; break; - } - for(const p in _) _[p.toUpperCase()] = _[p] == -1 ? 'head' : _[p] == 1 ? 'foot' : 0; - sML.applyRtL(KeyObserver.MovingParameters, _); + updateKeyParameters: () => { + const _O = I.orthogonal('arrow-keys'); + const _ = (() => { switch(S.ARA) { + case 'horizontal': return Object.assign({ 'Left Arrow': C.d2d('left'), 'Right Arrow': C.d2d('right' ) }, _O == 'move' ? { 'Up Arrow': C.d2d('top' , 9), 'Down Arrow': C.d2d('bottom', 9) } : { 'Up Arrow': _O, 'Down Arrow': _O }); + case 'vertical': return Object.assign({ 'Up Arrow': C.d2d('top' ), 'Down Arrow': C.d2d('bottom') }, _O == 'move' ? { 'Left Arrow': C.d2d('left', 9), 'Right Arrow': C.d2d('right' , 9) } : { 'Left Arrow': _O, 'Right Arrow': _O }); + } })(); + for(const p in _) _[p.toUpperCase()] = _[p] == -1 ? 'head' : _[p] == 1 ? 'foot' : _[p]; + Object.assign(KeyObserver.KeyParameters, _); }, getBibiKeyName: (Eve) => { const KeyName = KeyObserver.KeyCodes[Eve.type][Eve.keyCode]; @@ -3060,19 +3124,25 @@ I.KeyObserver = { create: () => { if(!S['use-keys']) return; observe: (Doc) => { ['keydown', 'keyup', 'keypress'].forEach(EventName => Doc.addEventListener(EventName, KeyObserver['onKey' + sML.capitalise(EventName.replace('key', ''))], false)); }, - tryMoving: (Eve) => { + onKeyTouch: (Eve) => { if(!Eve.BibiKeyName) return false; - const MovingParameter = KeyObserver.MovingParameters[!Eve.shiftKey ? Eve.BibiKeyName : Eve.BibiKeyName.toUpperCase()]; - if(!MovingParameter) return false; + const KeyParameter = KeyObserver.KeyParameters[!Eve.shiftKey ? Eve.BibiKeyName : Eve.BibiKeyName.toUpperCase()]; + if(!KeyParameter) return false; Eve.preventDefault(); - if(typeof MovingParameter == 'string') return R.focusOn({ Destination: MovingParameter, Duration: 0 }); - if(typeof MovingParameter == 'number') { - if(I.Turner.isAbleToTurn({ Distance: MovingParameter })) { - const Turner = I.Turner[MovingParameter]; - const Arrow = Turner.Arrow; - E.dispatch(Arrow, 'bibi:tapped', Eve); - I.Turner.turn(Turner.Distance); - } + switch(typeof KeyParameter) { + case 'number': + if(I.Turner.isAbleToTurn(KeyParameter)) { + const Dist = KeyParameter; + const Arrow = I.Turner[Dist].Arrow; + E.dispatch(Arrow, 'bibi:tapped', Eve); + I.Turner.turn(Dist); + } break; + case 'string': + switch(KeyParameter) { + case 'head': case 'foot': return R.focusOn({ Destination: KeyParameter, Duration: 0 }); + case 'utilities': return I.Utilities.toggleGracefuly(); + case 'switch': return I.AxisSwitcher ? I.AxisSwitcher.switchAxis() : false; + } break; } } }; @@ -3086,11 +3156,63 @@ I.KeyObserver = { create: () => { if(!S['use-keys']) return; }); E.add('bibi:postprocessed-item', Item => Item.IsPlaceholder ? false : KeyObserver.observe(Item.contentDocument)); E.add('bibi:opened', () => { - KeyObserver.initializeMovingParameters(), KeyObserver.updateMovingParameters(), E.add('bibi:changed-view', () => KeyObserver.updateMovingParameters()); + KeyObserver.initializeKeyParameters(), KeyObserver.updateKeyParameters(), E.add('bibi:changed-view', () => KeyObserver.updateKeyParameters()); KeyObserver.observe(document); - E.add(['bibi:touched-key', 'bibi:is-holding-key'], Eve => KeyObserver.tryMoving(Eve)); + E.add(['bibi:touched-key', 'bibi:is-holding-key'], Eve => KeyObserver.onKeyTouch(Eve)); }); - E.dispatch('bibi:created-keylistener'); + E.dispatch('bibi:created-key-observer'); +}}; + + +I.EdgeObserver = { create: () => { + const EdgeObserver = I.EdgeObserver = {}; + E.add('bibi:opened', () => { + E.add(['bibi:tapped-not-center', 'bibi:doubletapped-not-center'], Eve => { + if(I.isPointerStealth()) return false; + const BibiEvent = O.getBibiEvent(Eve); + const Dir = I.Turner.getDirection(BibiEvent.Division), Ortho = I.orthogonal('edges'), Dist = C.d2d(Dir, Ortho == 'move'); + if(Dist) { + if(I.Arrows && I.Arrows.areAvailable(BibiEvent)) E.dispatch(I.Arrows[Dist], 'bibi:tapped', Eve); + if(I.Turner.isAbleToTurn(Dist)) I.Turner.turn(Dist); + } else if(typeof C.DDD[Dir] == 'string') switch(Ortho) { + case 'utilities': I.Utilities.toggleGracefuly(); break; + case 'switch': if(I.AxisSwitcher) I.AxisSwitcher.switchAxis(); break; + } + }); + if(!O.TouchOS) { + E.add('bibi:moved-pointer', Eve => { + if(I.isPointerStealth()) return false; + const BibiEvent = O.getBibiEvent(Eve); + if(I.Arrows.areAvailable(BibiEvent)) { + const Dir = I.Turner.getDirection(BibiEvent.Division), Ortho = I.orthogonal('edges'), Dist = C.d2d(Dir, Ortho == 'move'); + if(Dist && I.Turner.isAbleToTurn(Dist)) { + EdgeObserver.Hovering = true; + if(I.Arrows) { + const Arrow = I.Arrows[Dist]; + E.dispatch(Arrow, 'bibi:hovered', Eve); + E.dispatch(Arrow.Pair, 'bibi:unhovered', Eve); + } + const HoveringHTML = BibiEvent.Target.ownerDocument.documentElement; + if(EdgeObserver.HoveringHTML != HoveringHTML) { + if(EdgeObserver.HoveringHTML) EdgeObserver.HoveringHTML.removeAttribute('data-bibi-cursor'); + (EdgeObserver.HoveringHTML = HoveringHTML).setAttribute('data-bibi-cursor', Dir); + } + return; + } + } + if(EdgeObserver.Hovering) { + EdgeObserver.Hovering = false; + if(I.Arrows) E.dispatch([I.Arrows.Back, I.Arrows.Forward], 'bibi:unhovered', Eve); + if(EdgeObserver.HoveringHTML) EdgeObserver.HoveringHTML.removeAttribute('data-bibi-cursor'), EdgeObserver.HoveringHTML = null; + } + }); + sML.forEach(O.Body.querySelectorAll('img'))(Img => Img.addEventListener(E['pointerdown'], O.preventDefault)); + } + }); + if(!O.TouchOS) { + E.add('bibi:loaded-item', Item => sML.forEach(Item.Body.querySelectorAll('img'))(Img => Img.addEventListener(E['pointerdown'], O.preventDefault))); + } + E.dispatch('bibi:created-edge-observer'); }}; @@ -3206,6 +3328,7 @@ I.Catcher = { create: () => { if(B.Data || S['book'] || !S['accept-local-file']) }, 1); } Catcher.appendChild(I.getBookIcon()); + E.dispatch('bibi:created-catcher'); }}; @@ -3248,7 +3371,6 @@ I.Menu = { create: () => { Menu.Timer_close = setTimeout(() => E.dispatch(Menu, 'bibi:unhovered', Eve), 123); } }); - if(!sML.UA.Gecko) Menu.addEventListener('wheel', R.Main.listenWheel, E.Cpt1Psv0); }); Menu.L = Menu.appendChild(sML.create('div', { id: 'bibi-menu-l' })); Menu.R = Menu.appendChild(sML.create('div', { id: 'bibi-menu-r' })); @@ -3650,7 +3772,7 @@ I.Loupe = { create: () => { }; const Tfm = {}; if(S.ARA == 'horizontal') { - Tfm.Scale = (R.Main.offsetHeight - (BookMargin.Top + BookMargin.Bottom)) / (R.Main.offsetHeight - (S.ARA == S.SLA && (S.RVM != 'paged' || I.Slider.UI) ? O.Scrollbars.Height : 0)); + Tfm.Scale = (R.Main.offsetHeight - (BookMargin.Top + BookMargin.Bottom)) / (R.Main.offsetHeight - (S.ARA == S.SLA && (S.RVM != 'paged' || I.Slider.ownerDocument) ? O.Scrollbars.Height : 0)); Tfm.TranslateX = 0; } else { Tfm.Scale = Math.min( @@ -3734,7 +3856,7 @@ I.Loupe = { create: () => { }), scale: (Scl, Opt = {}) => { // Scl: Scale Scl = typeof Scl == 'number' ? sML.limitMinMax(Scl, 1, S['loupe-max-scale']) : 1; - Scl = Math.round(Scl * 100) / 100; + if(!Opt.Stepless) Scl = Math.round(Scl * 100) / 100; const CTfm = Loupe.CurrentTransformation; if(Scl == CTfm.Scale) return Promise.resolve(); E.dispatch('bibi:changes-scale', Scl); @@ -3756,8 +3878,6 @@ I.Loupe = { create: () => { Scale: Scl, TranslateX: TX, TranslateY: TY - }, { - }); }, BookStretchingEach: 0, @@ -3780,7 +3900,7 @@ I.Loupe = { create: () => { Loupe.BookStretchingEach = 0; }; } - return Loupe.transform(null, { Temporary: true }).then(cb).then(() => I.Slider.UI ? I.Slider.progress() : undefined); + return Loupe.transform(null, { Temporary: true }).then(cb).then(() => I.Slider.ownerDocument ? I.Slider.progress() : undefined); }, isAvailable: () => { if(!L.Opened) return false; @@ -3808,9 +3928,9 @@ I.Loupe = { create: () => { const BibiEvent = Loupe.checkAndGetBibiEventForTaps(Eve); if(!BibiEvent) return Promise.resolve(); if(BibiEvent.Division.X != 'center' || BibiEvent.Division.Y != 'middle') return Promise.resolve(); - //if(Eve.srcElement.ownerDocument == document) return Loupe.CurrentTransformation.Scale > 1 ? Loupe.scale(1) : Promise.resolve(); + //if(Eve.target.ownerDocument == document) return Loupe.CurrentTransformation.Scale > 1 ? Loupe.scale(1) : Promise.resolve(); Eve.preventDefault(); - try { Eve.srcElement.ownerDocument.body.Item.contentWindow.getSelection().empty(); } catch(Err) {} + try { Eve.target.ownerDocument.body.Item.contentWindow.getSelection().empty(); } catch(Err) {} if(Loupe.CurrentTransformation.Scale >= S['loupe-max-scale']) return Loupe.scale(1); return Loupe.scale(Loupe.CurrentTransformation.Scale * S['loupe-scale-per-step'], { Center: BibiEvent.Coord }); }, @@ -4267,9 +4387,6 @@ I.Slider = { create: () => { Slider.resetThumbAndRailSize(); Slider.progress(); }); - if(!O.TouchOS) { - if(!sML.UA.Gecko) Slider.addEventListener('wheel', R.Main.listenWheel, E.Cpt1Psv0); - } { // Optimize to Scrollbar Size const _S = 'div#bibi-slider', _TB = '-thumb:before'; const _HS = 'html.appearance-horizontal ' + _S, _HSTB = _HS + _TB, _SH = O.Scrollbars.Height, _STH = Math.ceil(_SH / 2); @@ -4451,53 +4568,20 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; I.Turner = { create: () => { const Turner = I.Turner = { Back: { Distance: -1 }, Forward: { Distance: 1 }, - initialize: () => { - Turner[-1] = Turner.Back, Turner[1] = Turner.Forward; - if(S['accept-orthogonal-input']) { - Turner['top'] = Turner.Back, Turner['bottom'] = Turner.Forward; - switch(B.PPD) { - case 'ltr': Turner['left'] = Turner.Back, Turner['right'] = Turner.Forward; break; - case 'rtl': Turner['right'] = Turner.Back, Turner['left'] = Turner.Forward; break; - } - } - }, - update: () => { - if(S['accept-orthogonal-input']) return; - switch(S.ARD) { - case 'ltr': Turner['left'] = Turner.Back, Turner['right'] = Turner.Forward, Turner['top'] = Turner['bottom'] = undefined; break; - case 'rtl': Turner['right'] = Turner.Back, Turner['left'] = Turner.Forward, Turner['top'] = Turner['bottom'] = undefined; break; - case 'ttb': Turner['top'] = Turner.Back, Turner['bottom'] = Turner.Forward, Turner['left'] = Turner['right'] = undefined; break; - } - }, - getDirection: (Division) => { - switch(S.ARA) { - case 'horizontal': return Division.X != 'center' ? Division.X : Division.Y; - case 'vertical' : return Division.Y != 'middle' ? Division.Y : Division.X; - } - }, - isAbleToTurn: (Par) => { - if(I.OpenedSubpanel) return false; - if(typeof Par.Distance != 'number' && typeof Par.Direction == 'string') { - if(Turner[Par.Direction]) Par.Distance = Turner[Par.Direction].Distance; - } - if(typeof Par.Distance == 'number') { + getDirection: (Division) => { switch(S.ARA) { + case 'horizontal': return Division.X != 'center' ? Division.X : Division.Y; + case 'vertical' : return Division.Y != 'middle' ? Division.Y : Division.X; } }, + isAbleToTurn: (Dist) => { + if(L.Opened && !I.OpenedSubpanel && typeof Dist == 'number' && Dist) { if(!I.PageObserver.Current.List.length) I.PageObserver.updateCurrent(); if(I.PageObserver.Current.List.length) { let CurrentEdge, BookEdgePage, Edged; - switch(Par.Distance) { + switch(Dist) { case -1: CurrentEdge = I.PageObserver.Current.List[ 0], BookEdgePage = R.Pages[ 0], Edged = 'Headed'; break; case 1: CurrentEdge = I.PageObserver.Current.List.slice(-1)[0], BookEdgePage = R.Pages.slice(-1)[0], Edged = 'Footed'; break; } - if(L.Opened && ( - CurrentEdge.Page != BookEdgePage - || (!CurrentEdge.PageIntersectionStatus.Contained && !CurrentEdge.PageIntersectionStatus[Edged]) - )) { - switch(Par.Direction) { - case 'left': case 'right': return S.ARA == 'horizontal' ? 1 : -1; - case 'top': case 'bottom': return S.ARA == 'vertical' ? 1 : -1; - } - return true; - } + if(CurrentEdge.Page != BookEdgePage) return true; + if(!CurrentEdge.PageIntersectionStatus.Contained && !CurrentEdge.PageIntersectionStatus[Edged]) return true; } } return false; @@ -4516,24 +4600,21 @@ I.Turner = { create: () => { return R.moveBy({ Distance: Distance, Duration: Opt.Duration }).then(Destination => I.History.add({ UI: Turner, SumUp: IsSameDirection, Destination: Destination })); } }; - E.add('bibi:opened', () => { - Turner.initialize(); - Turner.update(), E.add('bibi:changed-view', () => Turner.update()); - }); + Turner[-1] = Turner.Back, Turner[1] = Turner.Forward; }}; -I.Arrows = { create: () => { if(!S['use-arrows']) return; +I.Arrows = { create: () => { if(!S['use-arrows']) return I.Arrows = null; const Arrows = I.Arrows = { navigate: () => { setTimeout(() => { - [Arrows.Back, Arrows.Forward].forEach(Arrow => I.Turner.isAbleToTurn({ Distance: Arrow.Turner.Distance }) ? Arrow.classList.add('glowing') : false); + [Arrows.Back, Arrows.Forward].forEach(Arrow => I.Turner.isAbleToTurn(Arrow.Distance) ? Arrow.classList.add('glowing') : false); setTimeout(() => [Arrows.Back, Arrows.Forward].forEach(Arrow => Arrow.classList.remove('glowing')), 1234); }, 400); }, check: () => { [Arrows.Back, Arrows.Forward].forEach(Arrow => - I.Turner.isAbleToTurn({ Distance: Arrow.Turner.Distance }) + I.Turner.isAbleToTurn(Arrow.Distance) ? sML.replaceClass(Arrow, 'unavailable', 'available') : sML.replaceClass(Arrow, 'available', 'unavailable') ); @@ -4558,66 +4639,26 @@ I.Arrows = { create: () => { if(!S['use-arrows']) return; } }; O.HTML.classList.add('arrows-active'); - Arrows.Back = I.Turner.Back.Arrow = O.Body.appendChild(sML.create('div', { className: 'bibi-arrow', id: 'bibi-arrow-back', Labels: { default: { default: `Back`, ja: `戻る` } }, Turner: I.Turner.Back })); - Arrows.Forward = I.Turner.Forward.Arrow = O.Body.appendChild(sML.create('div', { className: 'bibi-arrow', id: 'bibi-arrow-forward', Labels: { default: { default: `Forward`, ja: `進む` } }, Turner: I.Turner.Forward })); - Arrows.Back.Pair = Arrows.Forward, Arrows.Forward.Pair = Arrows.Back; + Arrows.Back = O.Body.appendChild(sML.create('div', { className: 'bibi-arrow', id: 'bibi-arrow-back', Labels: { default: { default: `Back`, ja: `戻る` } }, Distance: -1 })); + Arrows.Forward = O.Body.appendChild(sML.create('div', { className: 'bibi-arrow', id: 'bibi-arrow-forward', Labels: { default: { default: `Forward`, ja: `進む` } }, Distance: 1 })); + Arrows[-1] = Arrows.Forward.Pair = I.Turner.Back.Arrow = Arrows.Back; + Arrows[ 1] = Arrows.Back.Pair = I.Turner.Forward.Arrow = Arrows.Forward; [Arrows.Back, Arrows.Forward].forEach(Arrow => { - //Arrow.isAvailable = () => I.Turner.isAbleToTurn(Arrow); I.setFeedback(Arrow); - const FunctionsToBeCanceled = [Arrow.showHelp, Arrow.hideHelp, Arrow.BibiTapObserver.onTap, Arrow.BibiTapObserver.onDoubleTap]; if(!O.TouchOS) FunctionsToBeCanceled.push(Arrow.BibiHoverObserver.onHover, Arrow.BibiHoverObserver.onUnHover); - FunctionsToBeCanceled.forEach(FunctionToBeCanceled => FunctionToBeCanceled = () => {}); - }); - if(!O.TouchOS) { - E.add('bibi:moved-pointer', Eve => { // try hovering - if(!L.Opened) return false; - if(I.isPointerStealth()) return false; - const BibiEvent = O.getBibiEvent(Eve); - if(Arrows.areAvailable(BibiEvent)) { - const Dir = I.Turner.getDirection(BibiEvent.Division);/* - const Dir = (S.RVM == 'vertical') ? BibiEvent.Division.Y : BibiEvent.Division.X;*/ - const Availability = I.Turner.isAbleToTurn({ Direction: Dir }); - if(Availability) { - const Arrow = I.Turner[Dir].Arrow; - //if(Availability != -1) { - E.dispatch(Arrow, 'bibi:hovered', Eve); - E.dispatch(Arrow.Pair, 'bibi:unhovered', Eve); - //} - BibiEvent.Target.ownerDocument.documentElement.setAttribute('data-bibi-cursor', Dir); - return; - } - } - E.dispatch([Arrows.Back, Arrows.Forward], 'bibi:unhovered', Eve); - R.Items.concat(O).forEach(Item => Item.HTML.removeAttribute('data-bibi-cursor')); - }); - E.add('bibi:opened', () => R.Items.concat(O).forEach(Item => sML.forEach(Item.Body.querySelectorAll('img'))(Img => Img.addEventListener(E['pointerdown'], O.preventDefault)))); - } - E.add(['bibi:tapped-not-center', 'bibi:doubletapped-not-center'], Eve => { // try moving - if(!L.Opened) return false; - if(I.isPointerStealth()) return false; - const BibiEvent = O.getBibiEvent(Eve); - //if(/^bibi-arrow-/.test(BibiEvent.Target.id)) return false; - if(!Arrows.areAvailable(BibiEvent)) return false; - const Dir = I.Turner.getDirection(BibiEvent.Division);/* - const Dir = (S.RVM == 'vertical') ? BibiEvent.Division.Y : BibiEvent.Division.X;*/ - if(I.Turner.isAbleToTurn({ Direction: Dir })) { - const Turner = I.Turner[Dir]; - const Arrow = Turner.Arrow; - E.dispatch(Arrow, 'bibi:tapped', Eve); - I.Turner.turn(Turner.Distance); - } + const FunctionsToBeCanceled = [Arrow.showHelp, Arrow.hideHelp, Arrow.BibiTapObserver.onTap, Arrow.BibiTapObserver.onDoubleTap]; + if(!O.TouchOS) FunctionsToBeCanceled.push(Arrow.BibiHoverObserver.onHover, Arrow.BibiHoverObserver.onUnHover); + FunctionsToBeCanceled.forEach(f2BC => f2BC = () => {}); }); E.add('bibi:commands:move-by', Par => { // indicate direction if(!L.Opened || !Par || typeof Par.Distance != 'number') return false; - const Distance = Math.round(Par.Distance); if(Distance == 0) return false; - return E.dispatch(Distance < 0 ? Arrows.Back : Arrows.Forward, 'bibi:tapped', null); + const Dist = Math.round(Par.Distance); + return Dist ? E.dispatch(Dist < 0 ? Arrows.Back : Arrows.Forward, 'bibi:tapped', null) : false; }); - E.add('bibi:loaded-item', Item => { - /* + E.add('bibi:loaded-item', Item => {/* sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor="left"]', 'cursor: w-resize;'); sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor="right"]', 'cursor: e-resize;'); sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor="top"]', 'cursor: n-resize;'); - sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor="bottom"]', 'cursor: s-resize;'); - */ + sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor="bottom"]', 'cursor: s-resize;');*/ sML.appendCSSRule(Item.contentDocument, 'html[data-bibi-cursor]', 'cursor: pointer;'); }); E.add('bibi:opened', () => setTimeout(() => { Arrows.check(); Arrows.navigate(); }, 123)); @@ -4636,6 +4677,19 @@ I.Arrows = { create: () => { if(!S['use-arrows']) return; }}; +I.AxisSwitcher = { create: () => { if(S['fix-reader-view-mode']) return I.AxisSwitcher = null; + const AxisSwitcher = I.AxisSwitcher = { + switchAxis: () => new Promise(resolve => { + if(S.RVM == 'paged') return resolve(); + const ViewMode = S.RVM == 'horizontal' ? 'vertical' : 'horizontal'; + I.Menu.Config.ViewModeSection.ButtonGroups[0].Buttons.filter(I => I.Mode == ViewMode)[0].BibiTapObserver.onTap(); + resolve(); + }) + }; + E.dispatch('bibi:created-axis-switcher'); +}}; + + I.Spinner = { create: () => { const Spinner = I.Spinner = O.Body.appendChild(sML.create('div', { id: 'bibi-spinner' })); for(let i = 1; i <= 12; i++) Spinner.appendChild(document.createElement('span')); @@ -4919,6 +4973,11 @@ I.distillLabels = (Labels) => { }; +I.orthogonal = (InputType) => S['orthogonal-' + InputType][S.RVM == 'paged' ? 0 : 1]; + +I.isScrollable = () => (S.ARA == S.SLA && I.Loupe.CurrentTransformation.Scale == 1) ? true : false; + + I.getBookIcon = () => sML.create('div', { className: 'book-icon', innerHTML: `` }); @@ -4943,7 +5002,6 @@ Bibi.preset = (Preset) => { P.initialize = () => { - if(!/^(horizontal|vertical|paged)$/.test(P['reader-view-mode'])) P['reader-view-mode'] = 'paged'; const DocHref = location.href.split('?')[0]; P['bookshelf'] = (() => { const Bookshelf_HTML = document.getElementById('bibi-preset').getAttribute('data-bibi-bookshelf'); @@ -5109,15 +5167,15 @@ S.initialize = () => { S['start-in-new-window'] = (window.parent != window && !S['autostart']) ? S['start-embedded-in-new-window'] : false; // -------- S['default-page-progression-direction'] = S['default-page-progression-direction'] == 'rtl' ? 'rtl' : 'ltr'; - const MaxOfHistoryAndBookmarks = { 'history': 19, 'bookmarks': 9 }; ['history', 'bookmarks'].forEach(_ => { - S['max-' + _] = !S['use-' + _] ? 0 : S['max-' + _] > MaxOfHistoryAndBookmarks[_] ? MaxOfHistoryAndBookmarks[_] : S['max-' + _]; - if(S['max-' + _] == 0) S['use-' + _] = false; + if( S['max-' + _] == 0) S['use-' + _] = false; + if(!S['use-' + _] ) S['max-' + _] = 0; }); if(!S['use-menubar']) S['use-full-height'] = true; // -------- - S['pagination-method'] = (sML.UA.Trident || sML.UA.EdgeHTML) ? 'auto' : S['pagination-method'] == 'x' ? 'x' : 'auto'; + if(sML.UA.Trident || sML.UA.EdgeHTML) S['pagination-method'] = 'auto'; // -------- + if(!S['reader-view-mode']) S['reader-view-mode'] = 'paged'; E.bind('bibi:initialized-book', () => { const BookBiscuits = O.Biscuits.remember('Book'); if(S['keep-settings']) { @@ -5197,6 +5255,10 @@ export const C = {}; C.update = () => { C.probe('L', S['spread-layout-axis'] ); // Rules in "L"ayout C.probe('A', S['apparent-reading-axis']); // Rules in "A"ppearance + C.DDD = (() => { switch(S.PPD) { // DDD: Direction-Distance Dictionary + case 'ltr': return S.ARD != 'ttb' ? { 'left': -1 , 'right': 1 , 'top': '-1', 'bottom': '1' } : { 'left': '-1', 'right': '1', 'top': -1 , 'bottom': 1 }; + case 'rtl': return S.ARD != 'ttb' ? { 'left': 1 , 'right': -1 , 'top': '-1', 'bottom': '1' } : { 'left': '1', 'right':'-1', 'top': -1 , 'bottom': 1 }; + } })(); }; C.probe = (L_A, AXIS) => { @@ -5223,6 +5285,7 @@ C.update = () => { C[[L_A, Gauge, sML.capitalise(Pro)].join('_')] = sML.capitalise(Par[Pro]); }; + C.d2d = (Dir, AOD) => { const Dist = C.DDD[Dir]; return AOD ? Dist * 1 : typeof Dist == 'number' ? Dist : 0; }; // d2d: Direction to Distance // AOD: Allow Orthogonal Direction diff --git a/__src/bibi/resources/styles/_stage.scss b/__src/bibi/resources/styles/_stage.scss index 77852af7..4962cac8 100644 --- a/__src/bibi/resources/styles/_stage.scss +++ b/__src/bibi/resources/styles/_stage.scss @@ -58,6 +58,8 @@ html { user-select: none; &.Blink { touch-action: none; } // @____Bibi:Dress__('-') background: $HTML_Background; + overscroll-behavior-x: none; + overscroll-behavior-y: none; } body { From 72cd75342725fde33dc14f7a1e1a3fde3e5ed668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20MATSUSHIMA=20=28=E2=84=A0=29?= Date: Fri, 8 May 2020 18:49:19 +0900 Subject: [PATCH 40/43] Enhance Slider UI. Optimize Nombre and Bookmark UI. --- __src/bibi/presets/default.js | 2 +- __src/bibi/resources/scripts/bibi.heart.js | 434 +++++++----------- __src/bibi/resources/styles/_nombre.scss | 99 ++-- __src/bibi/resources/styles/_slider.scss | 242 +++------- __src/bibi/wardrobe/_dress-codes/_nombre.scss | 18 +- __src/bibi/wardrobe/_dress-codes/_slider.scss | 72 +-- .../wardrobe/_dress-patterns/_nombre.scss | 47 +- .../wardrobe/_dress-patterns/_slider.scss | 123 ++--- 8 files changed, 365 insertions(+), 672 deletions(-) diff --git a/__src/bibi/presets/default.js b/__src/bibi/presets/default.js index 003748b5..5a3fed67 100644 --- a/__src/bibi/presets/default.js +++ b/__src/bibi/presets/default.js @@ -37,7 +37,7 @@ Bibi.preset({ "use-keys" : "yes", // "yes" or "no" or "desktop" or "mobile" "use-slider" : "yes", // "yes" or "no" or "desktop" or "mobile" -"slider-mode" : "auto", // "edgebar" or "bookmap" or "auto" +"flip-pages-during-sliding" : "yes", // "yes" or "no" or "desktop" or "mobile" "use-nombre" : "yes", // "yes" or "no" or "desktop" or "mobile" diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index f9f86688..5384e8a0 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -20,6 +20,7 @@ Bibi.SettingTypes = { 'autostart-embedded', 'fix-nav-ttb', 'fix-reader-view-mode', + 'flip-pages-during-sliding', 'full-breadth-layout-in-scroll', 'start-embedded-in-new-window', 'use-arrows', @@ -36,7 +37,6 @@ Bibi.SettingTypes = { ], 'string': [ 'book', - 'slider-mode', 'default-page-progression-direction', 'pagination-method', 'reader-view-mode' @@ -517,9 +517,8 @@ Bibi.openBook = (LayoutOption) => new Promise(resolve => { } if(S['allow-placeholders']) { R.turnSpreads({ Origin: LandingPage.Spread }); - setTimeout(() => { R.turnSpreads(); }, 123); - E.add('bibi:scrolled', () => setTimeout(() => R.turnSpreads(), 123)); - E.add('bibi:changed-intersection', () => !I.Slider.Touching ? R.turnSpreads() : false); + setTimeout(() => R.turnSpreads(), 123); + E.add(['bibi:scrolled', 'bibi:changed-intersection'], () => R.turnSpreads()); } if(S['resume-from-last-position']) E.add('bibi:changed-intersection', () => { try { const CurrentPage = I.PageObserver.Current.List[0].Page; @@ -1761,7 +1760,7 @@ R.getItemLayoutViewport = (Item) => Item.Viewport ? Item.Viewport : B.ICBViewpor R.turnSpreads = (Opt = {}) => new Promise(resolve => { - if(!S['allow-placeholders']) return resolve(); + if(R.DoNotTurn || !S['allow-placeholders']) return resolve(); const Range = [-1, 2]; const Direction = (I.ScrollObserver.History.length > 1) && (I.ScrollObserver.History[1] * C.L_AXIS_D > I.ScrollObserver.History[0] * C.L_AXIS_D) ? -1 : 1; const Origin = Opt.Origin || ( @@ -2364,6 +2363,10 @@ I.ScrollObserver = { create: () => { }, breakCurrentScrolling: () => { try { R.Breaking = true; sML.Scroller.Scrolling.cancel(); setTimeout(() => R.Breaking = false, 333); } catch(Err) { R.Breaking = false; } + }, + forceStopScrolling: () => { + ScrollObserver.breakCurrentScrolling(); + R.Main.style.overflow = 'hidden', R.Main.scrollLeft = R.Main.scrollLeft, R.Main.scrollTop = R.Main.scrollTop, R.Main.style.overflow = ''; } } E.bind('bibi:opened', ScrollObserver.observe); @@ -4032,20 +4035,23 @@ I.Loupe = { create: () => { I.Nombre = { create: () => { if(!S['use-nombre']) return; const Nombre = I.Nombre = O.Body.appendChild(sML.create('div', { id: 'bibi-nombre', - show: () => { + clearTimers: () => { clearTimeout(Nombre.Timer_hot); clearTimeout(Nombre.Timer_vanish); + clearTimeout(Nombre.Timer_autohide); + }, + show: () => { + Nombre.clearTimers(); Nombre.classList.add('active'); Nombre.Timer_hot = setTimeout(() => Nombre.classList.add('hot'), 10); }, hide: () => { - clearTimeout(Nombre.Timer_hot); - clearTimeout(Nombre.Timer_vanish); + Nombre.clearTimers(); Nombre.classList.remove('hot'); Nombre.Timer_vanish = setTimeout(() => Nombre.classList.remove('active'), 255); }, progress: (PageInfo) => { - clearTimeout(Nombre.Timer_hide); + Nombre.clearTimers(); if(!PageInfo) PageInfo = I.PageObserver.Current; if(!PageInfo.List.length) return; //////// const StartPageNumber = PageInfo.List[ 0].Page.Index + 1; @@ -4059,19 +4065,18 @@ I.Nombre = { create: () => { if(!S['use-nombre']) return; Nombre.Total.innerHTML = R.Pages.length; Nombre.Percent.innerHTML = `(${ Percent }%)`; Nombre.show(); - Nombre.Timer_hide = setTimeout(Nombre.hide, 1234); + if(I.Slider.UIState != 'active') Nombre.Timer_autohide = setTimeout(Nombre.hide, 1234); } })); - Nombre.Current = Nombre.appendChild(sML.create('span', { id: 'bibi-nombre-current' })); - Nombre.Delimiter = Nombre.appendChild(sML.create('span', { id: 'bibi-nombre-delimiter' })); - Nombre.Total = Nombre.appendChild(sML.create('span', { id: 'bibi-nombre-total' })); - Nombre.Percent = Nombre.appendChild(sML.create('span', { id: 'bibi-nombre-percent' })); - E.add('bibi:opened' , () => { - setTimeout(() => { - Nombre.progress(); - E.add('bibi:changed-intersection', () => Nombre.progress()); - }, 321); - }); + Nombre.Current = Nombre.appendChild(sML.create('span', { className: 'bibi-nombre-current' })); + Nombre.Delimiter = Nombre.appendChild(sML.create('span', { className: 'bibi-nombre-delimiter' })); + Nombre.Total = Nombre.appendChild(sML.create('span', { className: 'bibi-nombre-total' })); + Nombre.Percent = Nombre.appendChild(sML.create('span', { className: 'bibi-nombre-percent' })); + E.add('bibi:opened' , () => setTimeout(() => { + Nombre.progress(); + E.add(['bibi:is-scrolling', 'bibi:opened-slider'], () => Nombre.progress()); + E.add('bibi:closed-slider', Nombre.hide); + }, 321)); sML.appendCSSRule('html.view-paged div#bibi-nombre', 'bottom: ' + (O.Scrollbars.Height + 2) + 'px;'); sML.appendCSSRule('html.view-horizontal div#bibi-nombre', 'bottom: ' + (O.Scrollbars.Height + 2) + 'px;'); sML.appendCSSRule('html.view-vertical div#bibi-nombre', 'right: ' + (O.Scrollbars.Height + 2) + 'px;'); @@ -4110,262 +4115,149 @@ I.History = { I.Slider = { create: () => { if(!S['use-slider']) return false; const Slider = I.Slider = O.Body.appendChild(sML.create('div', { id: 'bibi-slider', + RailProgressMode: 'end', // or 'center' Size: I.Slider.Size, initialize: () => { - //if(!/^(edgebar|bookmap)$/.test(S['slider-mode'])) S['slider-mode'] = (O.TouchOS || R.Stage.Width / R.Items.length < 20) ? 'edgebar' : 'bookmap'; - if(S['slider-mode'] != 'bookmap') S['slider-mode'] = 'edgebar'; - Slider.UI = (S['slider-mode'] == 'edgebar' ? Slider.Edgebar : Slider.Bookmap).create().initialize(); - const UIBox = Slider.appendChild(Slider.UI.Box); - Slider.Rail = UIBox.appendChild(sML.create('div', { id: 'bibi-slider-rail' })); - Slider.Rail.Progress = Slider.Rail.appendChild(sML.create('div', { id: 'bibi-slider-rail-progress' })); - Slider.Thumb = UIBox.appendChild(sML.create('div', { id: 'bibi-slider-thumb', Labels: { default: { default: `Slider Thumb`, ja: `スライダー上の好きな位置からドラッグを始められます` } } })); I.setFeedback(Slider.Thumb); - if(!S['use-history']) return; - Slider.classList.add('bibi-slider-with-history'); - Slider.History = Slider.appendChild(sML.create('div', { id: 'bibi-slider-history' })); - Slider.History.add = (Destination) => I.History.add({ UI: Slider, SumUp: false, Destination: Destination }) - Slider.History.Button = Slider.History.appendChild(I.createButtonGroup()).addButton({ id: 'bibi-slider-history-button', - Type: 'normal', - Labels: { default: { default: `History Back`, ja: `移動履歴を戻る` } }, - Help: false, - Icon: ``, - action: () => I.History.back(), - update: function() { - this.Icon.style.transform = `rotate(${ 360 * (I.History.List.length - 1) }deg)`; - if(I.History.List.length <= 1) I.setUIState(this, 'disabled'); - else if(this.UIState == 'disabled') I.setUIState(this, 'default'); - } - }); - I.History.Updaters.push(() => Slider.History.Button.update()); - }, - resetThumbAndRailSize: () => { - let ScrollLength = R.Main['scroll' + C.L_SIZE_L]; - if(S.ARA == S.SLA) ScrollLength -= I.Loupe.BookStretchingEach * (S.SLA == 'horizontal' ? 2 : 3); - const ThumbLengthPercent = R.Stage[C.L_SIZE_L]/*R.Main['offset' + C.L_SIZE_L]*/ / ScrollLength * 100; - Slider.Thumb.style[C.A_SIZE_l] = ( ThumbLengthPercent) + '%'; - Slider.Rail.style[ C.A_SIZE_l] = (100 - ThumbLengthPercent) + '%'; - Slider.Thumb.style[C.A_SIZE_b] = Slider.Rail.style[C.A_SIZE_b] = ''; - Slider.resetRailCoords(); - }, - resetRailCoords: () => { - Slider.Rail.Coords = [O.getElementCoord(Slider.Rail)[C.A_AXIS_L]]; - Slider.Rail.Coords.push(Slider.Rail.Coords[0] + Slider.Rail['offset' + C.A_SIZE_L]); - //console.log(Slider.Rail.Coords); + const EdgebarBox = Slider.appendChild(sML.create('div', { id: 'bibi-slider-edgebar-box' })); + Slider.Edgebar = EdgebarBox.appendChild(sML.create('div', { id: 'bibi-slider-edgebar' })); + Slider.Rail = EdgebarBox.appendChild(sML.create('div', { id: 'bibi-slider-rail' })); + Slider.RailGroove = Slider.Rail.appendChild(sML.create('div', { id: 'bibi-slider-rail-groove' })); + Slider.RailProgress = Slider.RailGroove.appendChild(sML.create('div', { id: 'bibi-slider-rail-progress' })); + Slider.Thumb = EdgebarBox.appendChild(sML.create('div', { id: 'bibi-slider-thumb', Labels: { default: { default: `Slider Thumb`, ja: `スライダー上の好きな位置からドラッグを始められます` } } })); I.setFeedback(Slider.Thumb); + if(S['use-history']) { + Slider.classList.add('bibi-slider-with-history'); + Slider.History = Slider.appendChild(sML.create('div', { id: 'bibi-slider-history' })); + Slider.History.add = (Destination) => I.History.add({ UI: Slider, SumUp: false, Destination: Destination }) + Slider.History.Button = Slider.History.appendChild(I.createButtonGroup()).addButton({ id: 'bibi-slider-history-button', + Type: 'normal', + Labels: { default: { default: `History Back`, ja: `移動履歴を戻る` } }, + Help: false, + Icon: ``, + action: () => I.History.back(), + update: function() { + this.Icon.style.transform = `rotate(${ 360 * (I.History.List.length - 1) }deg)`; + if(I.History.List.length <= 1) I.setUIState(this, 'disabled'); + else if(this.UIState == 'disabled') I.setUIState(this, 'default'); + } + }); + I.History.Updaters.push(() => Slider.History.Button.update()); + } + if(S['use-nombre']) { + E.add(Slider.Edgebar, ['mouseover', 'mousemove'], Eve => { if(!Slider.Touching) I.Nombre.progress({ List: [{ Page: Slider.getPointedPage(O.getBibiEventCoord(Eve)[C.A_AXIS_L]) }] }); }); + E.add(Slider.Edgebar, 'mouseout', Eve => { if(!Slider.Touching) I.Nombre.progress(); }); + } + if(!S['flip-pages-during-sliding']) Slider.flipPagesDuringSliding = () => false; }, - progress: () => { - if(Slider.Touching) return; - Slider.Thumb.style.top = Slider.Thumb.style.right = Slider.Thumb.style.bottom = Slider.Thumb.style.left = ''; - let Scrolled = Math.ceil(R.Main['scroll' + C.L_OOBL_L]); // Android Chrome returns scrollLeft/Top value of an element with slightly less float than actual. - let ScrollLength = R.Main['scroll' + C.L_SIZE_L]; - if(S.ARA == S.SLA) ScrollLength -= I.Loupe.BookStretchingEach * (S.SLA == 'horizontal' ? 2 : 3); - else if(S.ARD == 'rtl') Scrolled = ScrollLength - Scrolled - R.Stage.Height; // <- Paged (HorizontalAppearance) && VerticalText - Slider.Thumb.style[C.A_OOBL_l] = (Scrolled / ScrollLength * 100) + '%'; - Slider.Rail.Progress.style.width = Slider.Rail.Progress.style.height = ''; - let Progress = O.getElementCoord(Slider.Thumb)[C.A_AXIS_L] + Slider.Thumb['offset' + C.A_SIZE_L] / 2 - O.getElementCoord(Slider.Rail)[C.A_AXIS_L]; - if(S.ARD == 'rtl') Progress = Slider.Rail['offset' + C.A_SIZE_L] - Progress; - Slider.Rail.Progress.style[C.A_SIZE_l] = (Progress / Slider.Rail['offset' + C.A_SIZE_L] * 100) + '%'; + resetUISize: () => { + Slider.MainLength = R.Main['scroll' + C.L_SIZE_L]; + const ThumbLengthPercent = R.Main['offset' + C.L_SIZE_L] / Slider.MainLength * 100; + Slider.RailGroove.style[C.A_SIZE_b] = Slider.Thumb.style[C.A_SIZE_b] = ''; + Slider.RailGroove.style[C.A_SIZE_l] = (100 - (Slider.RailProgressMode == 'center' ? ThumbLengthPercent : 0)) + '%'; + Slider.Thumb.style[C.A_SIZE_l] = ThumbLengthPercent + '%'; + setTimeout(() => Slider.Thumb.classList.toggle('min', (STACS => STACS.width == STACS.height)(getComputedStyle(Slider.Thumb, '::after'))), 0); + Slider.Edgebar.Before = O.getElementCoord(Slider.Edgebar)[C.A_AXIS_L]; + Slider.Edgebar.Length = Slider.Edgebar['offset' + C.A_SIZE_L]; + Slider.Edgebar.After = Slider.Edgebar.Before + Slider.Edgebar.Length; + Slider.RailGroove.Before = O.getElementCoord(Slider.RailGroove)[C.A_AXIS_L]; + Slider.RailGroove.Length = Slider.RailGroove['offset' + C.A_SIZE_L]; + Slider.RailGroove.After = Slider.RailGroove.Before + Slider.RailGroove.Length; + Slider.Thumb.Length = Slider.Thumb['offset' + C.A_SIZE_L]; }, - onTouchStart: (Eve) => { // console.log(Eve); - //if(!Eve.target || (!Slider.contains(Eve.target) && Eve.target != Slider)) return; + onTouchStart: (Eve) => { + I.ScrollObserver.forceStopScrolling(); Eve.preventDefault(); - //R.Main.style.overflow = 'hidden'; // ← ↓ to stop momentum scrolling - //setTimeout(() => R.Main.style.overflow = '', 1); if(Slider.History) Slider.History.add({ Page: I.PageObserver.Current.List[0].Page }); Slider.Touching = true; - Slider.TouchStartThumbCenterCoord = O.getElementCoord(Slider.Thumb)[C.A_AXIS_L] + Slider.Thumb['offset' + C.A_SIZE_L] / 2; - Slider.TouchStartCoord = Slider.TouchingCoord = Slider.getTouchStartCoord(Eve); + Slider.StartedOn = { + ThumbBefore: O.getElementCoord(Slider.Thumb)[C.A_AXIS_L], + RailProgressLength: Slider.RailProgress['offset' + C.A_SIZE_L], + MainScrollBefore: Math.ceil(R.Main['scroll' + C.L_OOBL_L]) // Android Chrome returns scrollLeft/Top value of an element with slightly less float than actual. + }; + Slider.StartedOn.Coord = Eve.target == Slider.Thumb ? O.getBibiEventCoord(Eve)[C.A_AXIS_L] : Slider.StartedOn.ThumbBefore + Slider.Thumb.Length / 2; // ← ? : clearTimeout(Slider.Timer_onTouchEnd); O.HTML.classList.add('slider-sliding'); E.add('bibi:moved-pointer', Slider.onTouchMove); }, - getTouchStartCoord: (Eve) => { - return (Eve.target == Slider.Thumb) ? - O.getBibiEventCoord(Eve)[C.A_AXIS_L] : // ← Move Thumb naturally. // ↓ Bring Thumb's center to the touched coord at the next pointer moving. - O.getElementCoord(Slider.Thumb)[C.A_AXIS_L] + Slider.Thumb['offset' + C.A_SIZE_L] / 2; - }, onTouchMove: (Eve) => { - Slider.TouchingCoord = O.getBibiEventCoord(Eve)[C.A_AXIS_L]; - Slider.flip(Eve); + clearTimeout(Slider.Timer_move); + const TouchMoveCoord = O.getBibiEventCoord(Eve)[C.A_AXIS_L]; + const Translation = sML.limitMinMax(TouchMoveCoord - Slider.StartedOn.Coord, + Slider.Edgebar.Before - Slider.StartedOn.ThumbBefore, + Slider.Edgebar.After - (Slider.StartedOn.ThumbBefore + Slider.Thumb.Length) + ); + sML.style(Slider.Thumb, { transform: 'translate' + C.A_AXIS_L + '(' + Translation + 'px)' }); + sML.style(Slider.RailProgress, { [C.A_SIZE_l]: (Slider.StartedOn.RailProgressLength + Translation * (S.ARD == 'rtl' ? -1 : 1)) + 'px' }); + Slider.flipPagesDuringSliding(TouchMoveCoord); + }, // ⇅ If S['flip-pages-during-sliding'] is false, Slider.flipPagesDuringSliding is `() => false`. + flipPagesDuringSliding: (TouchMoveCoord) => { + R.DoNotTurn = true; Slider.flip(TouchMoveCoord); + Slider.Timer_move = setTimeout(() => { R.DoNotTurn = false; Slider.flip(TouchMoveCoord); }, 123); }, onTouchEnd: (Eve) => { if(!Slider.Touching) return; + clearTimeout(Slider.Timer_move); Slider.Touching = false; E.remove('bibi:moved-pointer', Slider.onTouchMove); - Slider.onTouchMove(Eve); - Slider.Timer_onTouchEnd = setTimeout(() => O.HTML.classList.remove('slider-sliding'), 125); - }, - flip: (Eve) => { - if(Slider.Touching) { - let Translation = Slider.TouchingCoord - Slider.TouchStartCoord; - const TranslatedThumbCenterCoord = Slider.TouchStartThumbCenterCoord + Translation; - if(TranslatedThumbCenterCoord < Slider.Rail.Coords[0]) Translation = Slider.Rail.Coords[0] - Slider.TouchStartThumbCenterCoord; - else if(TranslatedThumbCenterCoord > Slider.Rail.Coords[1]) Translation = Slider.Rail.Coords[1] - Slider.TouchStartThumbCenterCoord; - let ProgressLength = Slider.Thumb['offset' + C.A_OOBL_L] + Translation; - if(S.ARD == 'rtl') ProgressLength = Slider.Rail['offset' + C.A_SIZE_L] - ProgressLength; - sML.style(Slider.Thumb, { transform: 'translate' + C.A_AXIS_L + '(' + Translation + 'px)' }); - sML.style(Slider.Rail.Progress, { [C.A_SIZE_l]: ProgressLength + 'px' }); - setTimeout(() => Slider.focus(Eve, { Turn: false, History: false }), 9); - } else Slider.focus(Eve).then(Destination => { - sML.style(Slider.Thumb, { transform: '' }); - sML.style(Slider.Rail.Progress, { [C.A_SIZE_l]: '' }); + const TouchEndCoord = O.getBibiEventCoord(Eve)[C.A_AXIS_L]; + if(TouchEndCoord == Slider.StartedOn.Coord) Slider.StartedOn.Coord = Slider.StartedOn.ThumbBefore + Slider.Thumb.Length / 2; + R.DoNotTurn = false; + Slider.flip(TouchEndCoord).then(Destination => { + sML.style(Slider.Thumb, { transform: '' }); + sML.style(Slider.RailProgress, { [C.A_SIZE_l]: '' }); Slider.progress(); if(Slider.History) Slider.History.add(Destination); }); + delete Slider.StartedOn; + Slider.Timer_onTouchEnd = setTimeout(() => O.HTML.classList.remove('slider-sliding'), 123); }, - focus: (Eve, Par = {}) => { - const TargetPage = Slider.UI.identifyPage(Eve) - Par.Destination = TargetPage; - for(let l = I.PageObserver.Current.List.length, i = 0; i < l; i++) if(I.PageObserver.Current.List[i].Page == TargetPage) return Promise.resolve(); - Par.Duration = 0; - return R.focusOn(Par); - }, - getTouchEndCoord: () => { - const TouchEndCoord = {}; - TouchEndCoord[C.A_AXIS_L] = sML.limitMinMax(Slider.TouchingCoord, Slider.Rail.Coords[0], Slider.Rail.Coords[1]); - TouchEndCoord[C.A_AXIS_B] = O.getElementCoord(Slider)[C.A_AXIS_B] + Slider['offset' + C.A_SIZE_B] / 2; - return TouchEndCoord; - } - })); - Slider.Edgebar = { create: () => sML.create('div', { id: 'bibi-slider-edgebar', - initialize: function() { - (this.Box = sML.create('div', { id: 'bibi-slider-edgebar-box' })).appendChild(this);//.addEventListener(E['pointerover'], Eve => this.PointedPage = this.getPointedPage()); - if(!O.TouchOS) this.addEventListener(E['pointermove'], Eve => I.Nombre.progress({ List: [{ Page: this.getPointedPage({ X: Eve.offsetX, Y: Eve.offsetY }) }] })); - return Slider.Edgebar = this; + flip: (TouchedCoord) => { switch(S.RVM) { + case 'paged': + const TargetPage = Slider.getPointedPage(TouchedCoord); + return I.PageObserver.Current.Pages.includes(TargetPage) ? Promise.resolve() : R.focusOn({ Destination: TargetPage, Duration: 0 }); + default: + R.Main['scroll' + C.L_OOBL_L] = Slider.StartedOn.MainScrollBefore + (TouchedCoord - Slider.StartedOn.Coord) * (Slider.MainLength / Slider.Edgebar.Length); + return Promise.resolve(); + } }, + progress: () => { + if(Slider.Touching) return; + Slider.Thumb.style.top = Slider.Thumb.style.right = Slider.Thumb.style.bottom = Slider.Thumb.style.left = ''; + let MainScrollBefore = Math.ceil(R.Main['scroll' + C.L_OOBL_L]); // Android Chrome returns scrollLeft/Top value of an element with slightly less float than actual. + if(S.ARA != S.SLA && S.ARD == 'rtl') MainScrollBefore = Slider.MainLength - MainScrollBefore - R.Main.offsetHeight; // <- Paged (HorizontalAppearance) && VerticalText + Slider.Thumb.style[C.A_OOBL_l] = (MainScrollBefore / Slider.MainLength * 100) + '%'; + Slider.RailProgress.style.width = Slider.RailProgress.style.height = ''; + const ThumbBeforeInRailGroove = O.getElementCoord(Slider.Thumb)[C.A_AXIS_L] - Slider.RailGroove.Before; + Slider.RailProgress.style[C.A_SIZE_l] = (Slider.RailProgressMode == 'center' ? + (S.ARD != 'rtl' ? ThumbBeforeInRailGroove + Slider.Thumb.Length / 2 : + Slider.RailGroove.Length - (ThumbBeforeInRailGroove + Slider.Thumb.Length / 2) ) : + (S.ARD != 'rtl' ? ThumbBeforeInRailGroove + Slider.Thumb.Length : + Slider.RailGroove.Length - (ThumbBeforeInRailGroove) ) ) / Slider.RailGroove.Length * 100 + '%'; }, - getPointedPage: (Coord) => { - //const START = Date.now(); - //const log = (OPI, FPI, SUPER) => console.log(Date.now() - START, '[Method02' + (SUPER ? '★' : '') + '] - O:' + OPI + ' F:' + FPI + ' G:' + (FPI - OPI)); - let Ratio = Coord[C.A_AXIS_L] / Slider.Edgebar['offset' + C.A_SIZE_L]; - const CoordInBook = R.Main.Book['offset' + C.L_SIZE_L] * (S.ARD != 'rtl' || S.SLD != 'ttb' ? Ratio : 1 - Ratio); - const OriginPageIndex = Math.max(Math.round(R.Pages.length * (S.ARD != 'rtl' ? Ratio : 1 - Ratio)) - 1, 0); - let ThePage = R.Pages[OriginPageIndex]; - let MinimumDistance = CoordInBook - O.getElementCoord(ThePage, R.Main.Book)[C.L_AXIS_L] + ThePage['offset' + C.L_SIZE_L] * 0.5; - if(Math.abs(MinimumDistance) < window['inner' + C.L_SIZE_L] / 4) return ThePage; - const Dir = (S.SLD == 'rtl' ? -1 : 1) * MinimumDistance < 0 ? -1 : 1; - MinimumDistance = Math.abs(MinimumDistance); - for(let i = OriginPageIndex + Dir; R.Pages[i]; i += Dir) { - const Page = R.Pages[i]; - const PageDistance = Math.abs(CoordInBook - O.getElementCoord(Page, R.Main.Book)[C.L_AXIS_L] + Page['offset' + C.L_SIZE_L] * 0.5); - if(PageDistance < MinimumDistance) MinimumDistance = PageDistance, ThePage = Page; else break; - } + getPointedPage: (PointedCoord) => { + let RatioInSlider = (PointedCoord - Slider.Edgebar.Before) / Slider.Edgebar['offset' + C.A_SIZE_L]; + const OriginPageIndex = sML.limitMinMax(Math.round(R.Pages.length * (S.ARD == 'rtl' ? 1 - RatioInSlider : RatioInSlider)), 0, R.Pages.length - 1); + const PointedCoordInBook = R.Main['scroll' + C.L_SIZE_L] * (S.ARD == 'rtl' && S.SLD == 'ttb' ? 1 - RatioInSlider : RatioInSlider); + let ThePage = R.Pages[OriginPageIndex], MinDist = Slider.getPageDistanceFromPoint(ThePage, PointedCoordInBook); + [-1, 1].forEach(PM => { for(let i = OriginPageIndex + PM; R.Pages[i]; i += PM) { + const Page = R.Pages[i], Dist = Slider.getPageDistanceFromPoint(Page, PointedCoordInBook); + if(Dist < MinDist) ThePage = Page, MinDist = Dist; else break; + } }); return ThePage; }, - identifyPage: () => { - const Coord = Slider.getTouchEndCoord(); - Coord[C.A_AXIS_L] -= Slider.Edgebar.Box['offset' + C.A_OOBL_L]; - return Slider.Edgebar.getPointedPage(Coord); - } - }) }; - Slider.Bookmap = { create: () => sML.create('div', { id: 'bibi-slider-bookmap', - initialize: function() { - this.Box = sML.create('div', { id: 'bibi-slider-bookmap-box' }); - R.Spreads.forEach(Spread => { - Spread.BookmapSpread = sML.create('div', { className: 'bookmap-spread', Box: this.appendChild(document.createElement('div')) }); - Spread.Items.forEach(Item => Item.BookmapItem = { Box: Spread.BookmapSpread.appendChild(document.createElement('div')) }); - Spread.BookmapSpread.Box.appendChild(Spread.BookmapSpread); - }); - return Slider.Bookmap = this; - }, - putAway: (Lock) => { - clearTimeout(Slider.Bookmap.Timer_putIn); - if(Slider.Bookmap.Locked) return false; - Slider.Bookmap.Locked = Lock; - return Slider.Bookmap.parentElement - ? Slider.Bookmap.Box.removeChild(Slider.Bookmap) - : false; - }, - putIn: (Unlock) => { - if(Unlock) Slider.Bookmap.Locked = false; - if(Slider.Bookmap.Locked) return false; - return !Slider.Bookmap.parentElement - ? (Slider.Bookmap.Timer_putIn = setTimeout(() => { Slider.Bookmap.Box.appendChild(Slider.Bookmap); Slider.resetThumbAndRailSize(); }, Unlock ? 0 : 456)) - : false; - }, - reset: () => setTimeout(() => { - Slider.Bookmap.putAway('Lock'); - R.Spreads.forEach(Spread => setTimeout(Slider.Bookmap.resetSpread, 0, Spread)); - Slider.Bookmap.putIn('Unlock'); - }, 456), - resetSpread: (Spread) => { - Slider.Bookmap.putAway(); - const SpreadBox = Spread.Box, BmSpread = Spread.BookmapSpread, BmSpreadBox = BmSpread.Box; - sML.forEach(BmSpread.querySelectorAll('span.bookmap-page'))(OldBmPage => OldBmPage.parentElement.removeChild(OldBmPage)); - BmSpreadBox.className = 'bookmap-spread-box'; sML.forEach(SpreadBox.classList)(ClassName => { if(ClassName != 'spread-box') BmSpreadBox.classList.add(ClassName); }); - BmSpreadBox.style[C.A_SIZE_b] = BmSpread.style[C.A_SIZE_b] = ''; - BmSpreadBox.style[C.A_SIZE_l] = (SpreadBox['offset' + C.L_SIZE_L] / R.Main[ 'scroll' + C.L_SIZE_L] * 100) + '%'; - BmSpread.style[ C.A_SIZE_l] = (Spread[ 'offset' + C.L_SIZE_L] / SpreadBox['offset' + C.L_SIZE_L] * 100) + '%'; - Spread.Items.forEach(Item => { - const ItemBox = Item.Box, BmItemBox = Item.BookmapItem.Box; - BmItemBox.className = 'bookmap-item-box'; sML.forEach(ItemBox.classList)(ClassName => { if(ClassName != 'item-box') BmItemBox.classList.add(ClassName); }); - BmItemBox.style[C.A_SIZE_b] = (ItemBox['offset' + C.L_SIZE_B] / Spread['offset' + C.L_SIZE_B] * 100) + '%'; - BmItemBox.style[C.A_SIZE_l] = (ItemBox['offset' + C.L_SIZE_L] / Spread['offset' + C.L_SIZE_L] * 100) + '%'; - Item.Pages.forEach(Page => { - const BmPage = Page.BookmapPage = sML.create('span', { className: 'bookmap-page', Page: Page }); - BmPage.style[C.A_SIZE_l] = (1 / Item.Pages.length * 100) + '%'; - if(I.Nombre.progress) { - BmPage.addEventListener(E['pointerover'], () => { - if(Slider.Touching) return; - clearTimeout(Slider.Timer_BookmapPagePointerOut); - I.Nombre.progress({ List: [{ Page: Page }] }); - }); - BmPage.addEventListener(E['pointerout'], () => { - if(Slider.Touching) return; - Slider.Timer_BookmapPagePointerOut = setTimeout(() => { - clearTimeout(I.Nombre.Timer_hide); - I.Nombre.hide(); - }, 200); - }); - } - //BmPage.Labels = { default: { default: `P.${ Page.Index + 1 }` } }; - I.setFeedback(BmPage); - if(Item.SpreadPair && Item.Ref['rendition:layout'] == 'pre-paginated' && Item.SpreadPair.Ref['rendition:layout'] == 'pre-paginated') { - E.add(BmPage, 'bibi:hovered', function(Eve) { this.Page.Item.SpreadPair.Pages[0].BookmapPage.classList.add( 'hover'); }); - E.add(BmPage, 'bibi:unhovered', function(Eve) { this.Page.Item.SpreadPair.Pages[0].BookmapPage.classList.remove('hover'); }); - } - BmItemBox.appendChild(BmPage); - }); - }); - Slider.Bookmap.putIn(); - }, - identifyPage: (Eve) => { - let TouchEndElement; - if(!O.TouchOS && (Eve.target == Slider.Bookmap || Slider.Bookmap.contains(Eve.target))) { - TouchEndElement = Eve.target; - } else { - const TouchEndCoord = Slider.getTouchEndCoord(); - TouchEndElement = document.elementFromPoint(TouchEndCoord.X, TouchEndCoord.Y); - } - return Slider.Bookmap.narrowDownToPage(TouchEndElement); - }, - narrowDownToPage: (Ele) => { - if(Ele.classList.contains('bookmap-page')) return Ele.Page; - const Ones = (Ele.classList.contains('bookmap-item') || Ele.classList.contains('bookmap-spread')) ? Ele.querySelectorAll('span.bookmap-page') : Slider.Bookmap.querySelectorAll('div.bookmap-spread'); - const TouchingCoord = Slider.TouchingCoord * C.A_AXIS_D; - let TheOne = Ones[Ones.length - 1], PrevOne = null, PrevOneFootCoord = 0; - for(let l = Ones.length, i = 0; i < l; i++) { - const One = Ones[i], OneCoord = O.getElementCoord(One)[C.A_AXIS_L], OneFootCoord = (OneCoord + (S.ARD != 'rtl' ? One['offset' + C.A_SIZE_L] : 0)) * C.A_AXIS_D; - if(OneFootCoord < TouchingCoord) { - PrevOne = One, PrevOneFootCoord = OneFootCoord; - continue; - } - const OneHeadCoord = (OneCoord + (S.ARD == 'rtl' ? One['offset' + C.A_SIZE_L] : 0)) * C.A_AXIS_D; - TheOne = (TouchingCoord < OneHeadCoord && PrevOne && TouchingCoord - PrevOneFootCoord < OneHeadCoord - TouchingCoord) ? PrevOne : One; - } - return Slider.Bookmap.narrowDownToPage(TheOne); + getPageDistanceFromPoint: (Page, PointedCoordInBook) => { + return Math.abs(PointedCoordInBook - (O.getElementCoord(Page, R.Main)[C.L_AXIS_L] + Page['offset' + C.L_SIZE_L] * 0.5)); } - }) }; + })); Slider.initialize(); I.setToggleAction(Slider, { onopened: () => { O.HTML.classList.add('slider-opened'); - setTimeout(Slider.resetRailCoords, 0); + setTimeout(Slider.resetUISize, 0); E.dispatch('bibi:opened-slider'); }, onclosed: () => { - new Promise(resolve => setTimeout(resolve, S['zoom-out-for-utilities'] ? 111 : 0)).then(() => { - if(Slider.UI.reset) Slider.UI.reset(); - }); + new Promise(resolve => setTimeout(resolve, S['zoom-out-for-utilities'] ? 111 : 0)); O.HTML.classList.remove('slider-opened'); - setTimeout(Slider.resetRailCoords, 0); + setTimeout(Slider.resetUISize, 0); E.dispatch('bibi:closed-slider'); } }); @@ -4376,15 +4268,15 @@ I.Slider = { create: () => { E.add('bibi:closes-utilities', Opt => E.dispatch('bibi:commands:close-slider', Opt)); E.add('bibi:loaded-item', Item => Item.HTML.addEventListener(E['pointerup'], Slider.onTouchEnd)); E.add('bibi:opened', () => { - Slider.UI.addEventListener(E['pointerdown'], Slider.onTouchStart); + Slider.Edgebar.addEventListener(E['pointerdown'], Slider.onTouchStart); Slider.Thumb.addEventListener(E['pointerdown'], Slider.onTouchStart); O.HTML.addEventListener(E['pointerup'], Slider.onTouchEnd); - E.add('bibi:changed-intersection', () => Slider.progress()); + if(Slider.History) Slider.History.Button.addEventListener(E['pointerup'], Slider.onTouchEnd); + E.add('bibi:is-scrolling', Slider.progress); Slider.progress(); }); - if(Slider.UI.reset) E.add(['bibi:opened', 'bibi:changed-view'], Slider.UI.reset); - E.add('bibi:laid-out', () => { - Slider.resetThumbAndRailSize(); + E.add(['bibi:opened-slider', 'bibi:closed-slider', 'bibi:laid-out'], () => { + Slider.resetUISize(); Slider.progress(); }); { // Optimize to Scrollbar Size @@ -4415,8 +4307,9 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; }), Position: 'left', id: 'bibi-subpanel_bookmarks', - onopened: () => { E.add( 'bibi:scrolled', BookmarkManager.update); BookmarkManager.update(); }, - onclosed: () => { E.remove('bibi:scrolled', BookmarkManager.update); } + updateBookmarks: () => BookmarkManager.update(), + onopened: () => { E.add( 'bibi:scrolled', BookmarkManager.Subpanel.updateBookmarks); BookmarkManager.Subpanel.updateBookmarks (); }, + onclosed: () => { E.remove('bibi:scrolled', BookmarkManager.Subpanel.updateBookmarks); } }); BookmarkManager.ButtonGroup = BookmarkManager.Subpanel.addSection({ id: 'bibi-subpanel-section_bookmarks', @@ -4432,12 +4325,10 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; return null; }, add: (Bookmark) => { - const ExistingBookmark = BookmarkManager.exists(Bookmark); - if(!ExistingBookmark) { - Bookmark.IsHot = true; - BookmarkManager.Bookmarks.push(Bookmark); - BookmarkManager.update({ Added: Bookmark }); - } else BookmarkManager.update(); + if(BookmarkManager.exists(Bookmark)) return BookmarkManager.update(); + Bookmark.IsHot = true; + BookmarkManager.Bookmarks.push(Bookmark); + BookmarkManager.update({ Added: Bookmark }); }, remove: (Bookmark) => { BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => Bmk.IIPP != Bookmark.IIPP); @@ -4450,16 +4341,15 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; BookmarkManager.ButtonGroup.innerHTML = ''; } //BookmarkManager.Bookmarks = BookmarkManager.Bookmarks.filter(Bmk => typeof Bmk.IIPP == 'number' && typeof Bmk['%'] == 'number'); - let Bookmark = null, ExistingBookmark = null; + let Bookmarks = [], ExistingBookmarks = []; if(typeof Opt.Bookmarks == 'object' && Opt.Bookmarks.map) BookmarkManager.Bookmarks = Opt.Bookmarks; - if(Opt.Added) Bookmark = Opt.Added; + if(Opt.Added) Bookmarks = [Opt.Added]; else if(L.Opened) { I.PageObserver.updateCurrent(); - const Page = I.PageObserver.Current.List[0].Page; - Bookmark = { + Bookmarks = I.PageObserver.Current.Pages.map(Page => ({ IIPP: Page.Item.Index + Page.IndexInItem / Page.Item.Pages.length, '%': Math.floor((Page.Index + 1) / R.Pages.length * 100) // only for showing percentage in waiting status - }; + })); } if(BookmarkManager.Bookmarks.length) { const UpdatedBookmarks = [] @@ -4495,8 +4385,8 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; else Label += `` + `${ Bmk['%'] }%` + ``; } const Labels = Label ? { default: { default: Label, ja: Label } } : { default: { default: `Bookmark #${ UpdatedBookmarks.length + 1 }`, ja: `しおり #${ UpdatedBookmarks.length + 1 }` } }; - if(Bookmark && Bmk.IIPP == Bookmark.IIPP) { - ExistingBookmark = Bmk; + if(Bookmarks.reduce((Exists, Bookmark) => Exists = Bmk.IIPP == Bookmark.IIPP ? true : Exists, false)) { + ExistingBookmarks.push(Bmk); ClassName = `bibi-button-bookmark-is-current`; Labels.default.default += ` `; Labels.default.ja += ` `; @@ -4522,18 +4412,10 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; Remover.addEventListener(E['pointer-over'], Eve => Eve.stopPropagation()); if(Bmk.IsHot) { delete Bmk.IsHot; - I.setUIState(Button, 'active'); setTimeout(() => { I.setUIState(Button, ExistingBookmark == Bmk ? 'disabled' : 'default'); }, 234);/* - Button.classList.add('bibi-button-bookmark-is-hot'); - setTimeout(() => { - Button.classList.remove('bibi-button-bookmark-is-hot'); - Button.classList.add('bibi-button-bookmark-is-cold'); - setTimeout(() => { - Button.classList.remove('bibi-button-bookmark-is-cold'); - }, 234); - }, 234);*/ + I.setUIState(Button, 'active'); setTimeout(() => I.setUIState(Button, ExistingBookmarks.includes(Bmk) ? 'disabled' : 'default'), 234); } - else if(ExistingBookmark == Bmk) I.setUIState(Button, 'disabled'); - else I.setUIState(Button, 'default'); + else if(ExistingBookmarks.includes(Bmk)) I.setUIState(Button, 'disabled'); + else I.setUIState(Button, 'default'); const UpdatedBookmark = { IIPP: Bmk.IIPP }; if(Bmk['%']) UpdatedBookmark['%'] = Bmk['%']; UpdatedBookmarks.push(UpdatedBookmark); @@ -4548,9 +4430,9 @@ I.BookmarkManager = { create: () => { if(!S['use-bookmarks']) return; Type: 'normal', Labels: { default: { default: `Add a Bookmark to Current Page`, ja: `現在のページにしおりを挟む` } }, Icon: ``, - action: () => Bookmark ? BookmarkManager.add(Bookmark) : false + action: () => Bookmarks.length ? BookmarkManager.add(Bookmarks[0]) : false }); - if(!Bookmark || ExistingBookmark) { + if(!Bookmarks.length || ExistingBookmarks.length) { I.setUIState(BookmarkManager.AddButton, 'disabled'); } } diff --git a/__src/bibi/resources/styles/_nombre.scss b/__src/bibi/resources/styles/_nombre.scss index c44b4766..6d384306 100644 --- a/__src/bibi/resources/styles/_nombre.scss +++ b/__src/bibi/resources/styles/_nombre.scss @@ -2,25 +2,33 @@ // + Nombre // -------------------------------------------------------------------------------- - div#bibi-nombre { - box-sizing: border-box; - overflow: hidden; - position: absolute; - z-index: $INVARIABLE__Nombre_ZIndex; - margin: auto; - // @____Bibi:Dress__('-') border-radius: $Nombre_Height * 0.5; - // @____Bibi:Dress__('-') @include size($Nombre_Width, $Nombre_Height); - // @____Bibi:Dress__('-') line-height: $Nombre_Height; - font-size: 12px; - text-align: center; - // @____Bibi:Dress__('-') color: $Nombre_Color; - // @____Bibi:Dress__('-') background: $Nombre_BackgroundColor; - opacity: 0; - transition: 0.125s ease-out; + & { + display: none; + pointer-events: none; + box-sizing: border-box; + overflow: hidden; + position: absolute; + z-index: $INVARIABLE__Nombre_ZIndex; + margin: auto; + // @____Bibi:Dress__('-') border-radius: $Nombre_Height * 0.5; + // @____Bibi:Dress__('-') @include size($Nombre_Width, $Nombre_Height); + // @____Bibi:Dress__('-') line-height: $Nombre_Height; + font-size: 10px; + text-align: center; + // @____Bibi:Dress__('-') background: $Nombre_BackgroundColor; + // @____Bibi:Dress__('-') html.slider-opened & { background: $Nombre_BackgroundColor__SliderOpened; } + opacity: 0; + transition: .125s ease-out; + } + html.busy & { display: none !important; } + &.active { display: block; } + &.hot { opacity: 1; } html.view-paged &, html.view-horizontal & { - @include offset(auto, -100%); + top: auto; + right: -100%; + left: -100%; } html.view-paged & { bottom: 2px; @@ -35,34 +43,35 @@ div#bibi-nombre { left: auto; // @____Bibi:Dress__('-') transform: rotate(90deg) translateY(($Nombre_Width - $Nombre_Height) * -0.5); } - html.slider-opened.appearance-horizontal & { - // @____Bibi:Dress__('-') bottom: $Slider_Size + 2px !important; - } - html.slider-opened.appearance-vertical & { - // @____Bibi:Dress__('-') right: $Slider_Size + 2px !important; - } - & { display: none; } - &.active { display: block; } - &.hot { opacity: 1; transition: 0.125s ease-out; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-horizontal & { bottom: $Slider_PaddingEnd__SliderOpened !important; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-vertical & { right: $Slider_PaddingEnd__SliderOpened !important; } span { - display: inline-block; - } -} - span#bibi-nombre-current { - font-size: 1.2em; - font-weight: bold; - // @____Bibi:Dress__('-') color: $Nombre-Current_Color; - } - span#bibi-nombre-delimiter { - margin: 0 0.1em 0 0.2em; - } - span#bibi-nombre-total { - } - span#bibi-nombre-percent { - margin-left: .25em; - // @____Bibi:Dress__('-') color: $Nombre-Percent_Color; - span.unit { - margin-left: .125em; - font-size: .75em; + & { + display: inline-block; + } + &.bibi-nombre-current { + font-size: 1.2em; + font-weight: bold; + // @____Bibi:Dress__('-') color: $Nombre-Current_Color; + // @____Bibi:Dress__('-') html.slider-opened & { color: $Nombre-Current_Color__SliderOpened; } + } + &.bibi-nombre-delimiter { + margin: 0 0.1em 0 0.2em; + // @____Bibi:Dress__('-') color: $Nombre-Delimiter_Color; + // @____Bibi:Dress__('-') html.slider-opened & { color: $Nombre-Delimiter_Color__SliderOpened; } } - } \ No newline at end of file + &.bibi-nombre-total { + // @____Bibi:Dress__('-') color: $Nombre-Total_Color; + // @____Bibi:Dress__('-') html.slider-opened & { color: $Nombre-Total_Color__SliderOpened; } + } + &.bibi-nombre-percent { + margin-left: .25em; + // @____Bibi:Dress__('-') color: $Nombre-Percent_Color; + // @____Bibi:Dress__('-') html.slider-opened & { color: $Nombre-Percent_Color__SliderOpened; } + span.unit { + margin-left: .125em; + font-size: .75em; + } + } + } +} \ No newline at end of file diff --git a/__src/bibi/resources/styles/_slider.scss b/__src/bibi/resources/styles/_slider.scss index 9765dccf..68c46128 100644 --- a/__src/bibi/resources/styles/_slider.scss +++ b/__src/bibi/resources/styles/_slider.scss @@ -64,6 +64,8 @@ div#bibi-slider { html.waiting &, html.busy &, html.panel-opened & { display: none; } + overscroll-behavior-x: none; + overscroll-behavior-y: none; } @@ -160,69 +162,90 @@ div#bibi-slider-thumb { // @____Bibi:Dress__('-') html:not(.slider-opened):not(.touch) &:hover:before { background-color: $Slider-Thumb_BackgroundColor__Hover; } // @____Bibi:Dress__('-') html:not(.slider-opened):not(.touch) &:active:before { background-color: $Slider-Thumb_BackgroundColor__Active; } &:after { - // @____Bibi:Dress__('-') @include offset($Slider-Thumb-Circle_Size * -1); - // @____Bibi:Dress__('-') @include size($Slider-Thumb-Circle_Size); - border-style: solid; - // @____Bibi:Dress__('-') border-width: $Slider-Thumb-Circle_BorderWidth; - // @____Bibi:Dress__('-') border-color: $Slider-Thumb-Circle_BorderColor; - border-radius: 50%; - // @____Bibi:Dress__('-') background: $Slider-Thumb-Circle_BackgroundColor; - // @____Bibi:Dress__('-') box-shadow: 0 0 0 $Slider-Thumb-Circle-Halo_Width $Slider-Thumb-Circle-Halo_Color; + // @____Bibi:Dress__('-') @include offset($Slider-Thumb_Size__SliderOpened * -1); + // @____Bibi:Dress__('-') html.appearance-horizontal & { @include size(100%, $Slider-Thumb_Size__SliderOpened); } + // @____Bibi:Dress__('-') html.appearance-vertical & { @include size($Slider-Thumb_Size__SliderOpened, 100%); } + // @____Bibi:Dress__('-') @include min-size($Slider-Thumb_Size__SliderOpened); + // @____Bibi:Dress__('-') border-radius: $Slider-Thumb_Size__SliderOpened * .5; + // @____Bibi:Dress__('-') border: $Slider-Thumb_Border__SliderOpened; + // @____Bibi:Dress__('-') background: $Slider-Thumb_BackgroundColor__SliderOpened; + // @____Bibi:Dress__('-') box-shadow: 0 0 0 $Slider-Thumb-Halo_Width__SliderOpened $Slider-Thumb-Halo_Color__SliderOpened; html:not(.slider-opened) & { transform: scale(0); opacity: 0; } } + &.min:after { + // @____Bibi:Dress__('-') border: $Slider-Thumb_Border__SliderOpened__Min; + // @____Bibi:Dress__('-') background: $Slider-Thumb_BackgroundColor__SliderOpened__Min; + } } // - . Rail // -------------------------------------------------------------------------------- -div#bibi-slider-rail { +div#bibi-slider-rail, +div#bibi-slider-rail-groove, +div#bibi-slider-rail-progress { & { - content: ""; - //overflow: hidden; - // display: none; // DO NOT SET `none` !! box-sizing: border-box; position: absolute; + pointer-events: none; + transition: background-color linear .33s; + } +} + +div#bibi-slider-rail { + & { z-index: 10000; - //@include offset(-100vh, -100vw); @include offset(0); margin: auto; - // @____Bibi:Dress__('-') background: $Slider-Rail_Color; - pointer-events: none; - transition: background-color linear .33s; + // @____Bibi:Dress__('-') background: $Slider-Rail-FullLength_Color__SliderOpened; } - html.appearance-horizontal & { height: 0; } - html.appearance-vertical & { width: 0; } - // @____Bibi:Dress__('-') html.slider-opened & { border-radius: $Slider-Rail_Width__SliderOpened / 2; } - // @____Bibi:Dress__('-') html.slider-opened.appearance-horizontal & { height: $Slider-Rail_Width__SliderOpened; } - // @____Bibi:Dress__('-') html.slider-opened.appearance-vertical & { width: $Slider-Rail_Width__SliderOpened; } - // @____Bibi:Dress__('-') div#bibi-slider:hover & { background: $Slider-Rail_Color__Hover; } + html.appearance-horizontal & { @include size(100%, 0); } + html.appearance-vertical & { @include size(0, 100%); } + // @____Bibi:Dress__('-') html.slider-opened.appearance-horizontal & { height: $Slider-Rail-FullLength_Width__SliderOpened; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-vertical & { width: $Slider-Rail-FullLength_Width__SliderOpened; } + // @____Bibi:Dress__('-') div#bibi-slider:hover & { background: $Slider-Rail-FullLength_Color__SliderOpened__Hover; } } +div#bibi-slider-rail-groove, div#bibi-slider-rail-progress { & { - position: absolute; @include size(0); - // @____Bibi:Dress__('-') background: $Slider-Rail-Progress_Color; - transition: background-color linear .33s; - will-change: transform; } - html.appearance-horizontal & { top: -100%; bottom: -100%; margin: auto 0; } - html.appearance-rtl & { right: 0; transform-origin: 100% 50%; } - html.appearance-ltr & { left: 0; transform-origin: 0 50%; } - html.appearance-vertical & { left: -100%; right: -100%; margin: 0 auto; top: 0; transform-origin: 50% 0 ; } - // @____Bibi:Dress__('-') html.slider-opened & {} +} + +div#bibi-slider-rail-groove { + & { + // @____Bibi:Dress__('-') border-top-color: $Slider-Rail-Groove_Color__SliderOpened; + } + html.appearance-horizontal & { @include offset(-100%); margin: auto; } + html.appearance-vertical & { @include offset(-100%); margin: auto; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-horizontal & { border-top: $Slider-Rail-Groove_Width__SliderOpened; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-vertical & { width: $Slider-Rail-Groove_Width__SliderOpened; } + // @____Bibi:Dress__('-') div#bibi-slider:hover & { background: $Slider-Rail-Groove_Color__SliderOpened__Hover; } +} + +div#bibi-slider-rail-progress { + & { + // @____Bibi:Dress__('-') background: $Slider-Rail-Progress_Color__SliderOpened; + will-change: width, height; + } + html.appearance-rtl & { @include offset(-100%, 0, -100%, auto); margin: auto 0; transform-origin: 100% 50%; } + html.appearance-ltr & { @include offset(-100%, auto, -100%, 0); margin: auto 0; transform-origin: 0 50%; } + html.appearance-ttb & { @include offset(0, -100%, auto, -100%); margin: 0 auto; transform-origin: 50% 0 ; } // @____Bibi:Dress__('-') html.slider-opened.appearance-horizontal & { height: $Slider-Rail-Progress_Width__SliderOpened; } // @____Bibi:Dress__('-') html.slider-opened.appearance-vertical & { width: $Slider-Rail-Progress_Width__SliderOpened; } - // @____Bibi:Dress__('-') div#bibi-slider:hover & { background: $Slider-Rail-Progress_Color__Hover; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-ltr & { border-radius: 0 ($Slider-Rail-Progress_Width__SliderOpened * .5) ($Slider-Rail-Progress_Width__SliderOpened * .5) 0; } + // @____Bibi:Dress__('-') html.slider-opened.appearance-rtl & { border-radius: ($Slider-Rail-Progress_Width__SliderOpened * .5) 0 0 ($Slider-Rail-Progress_Width__SliderOpened * .5); } + // @____Bibi:Dress__('-') html.slider-opened.appearance-ttb & { border-radius: 0 0 ($Slider-Rail-Progress_Width__SliderOpened * .5) ($Slider-Rail-Progress_Width__SliderOpened * .5); } + // @____Bibi:Dress__('-') div#bibi-slider:hover & { background: $Slider-Rail-Progress_Color__SliderOpened__Hover; } } -// - UI Box (Edgebar Box, Bookmap Box) +// - Edgebar Box // -------------------------------------------------------------------------------- -div#bibi-slider-edgebar-box, -div#bibi-slider-bookmap-box { +div#bibi-slider-edgebar-box { & { box-sizing: border-box; position: absolute; @@ -292,11 +315,10 @@ div#bibi-slider-bookmap-box { } -// - Edgebar, Bookmap +// - Edgebar // -------------------------------------------------------------------------------- -div#bibi-slider-edgebar, -div#bibi-slider-bookmap { +div#bibi-slider-edgebar { box-sizing: border-box; position: absolute; z-index: 10; @@ -315,150 +337,6 @@ div#bibi-slider-edgebar { } -// - Bookmap -// -------------------------------------------------------------------------------- - -div#bibi-slider-bookmap { - display: flex; - flex-wrap: nowrap; - justify-content: space-between; - html.appearance-ltr & { flex-direction: row; } - html.appearance-rtl & { flex-direction: row-reverse; } - html.appearance-ttb & { flex-direction: column; } - box-sizing: border-box; - position: absolute; - z-index: 10; - @include offset(0); - @include size(100%); - margin: auto; -} - - div.bookmap-spread-box, - div.bookmap-spread, - div.bookmap-item-box, - span.bookmap-item, - span.bookmap-page { - html.appearance-horizontal & { height: 100%; } - html.appearance-vertical & { width: 100%; } - } - - -// - . Bookmap > Spread Box -// -------------------------------------------------------------------------------- - -div.bookmap-spread-box { - box-sizing: border-box; - flex-shrink: 0; - position: relative; - // @____Bibi:Dress__('-') background: $Slider-Bookmap-SpreadBox_Color; - &.hover { - //background: $Slider-Bookmap-SpreadBox_Color__Hover; - } -} - - -// - . Bookmap > Spread Box > Spread -// -------------------------------------------------------------------------------- - -div.bookmap-spread { - box-sizing: border-box; - position: absolute; - z-index: 1; - @include offset(0); - margin: auto; - display: flex; - flex-wrap: nowrap; - justify-content: center; - html.page-ltr & { flex-direction: row; } - html.page-rtl & { flex-direction: row-reverse; } - html.view-vertical div.bookmap-spread-box:not(.spreaded) & { flex-direction: column; } - div.bookmap-spread-box.single-item-spread-before & { justify-content: flex-start; } - div.bookmap-spread-box.single-item-spread-after & { justify-content: flex-end; } - align-items: center; - // @____Bibi:Dress__('-') background: $Slider-Bookmap-Spread_Background; -} - - -// - . Bookmap > Spread Box > Spread > Item Box -// -------------------------------------------------------------------------------- - -div.bookmap-item-box { - box-sizing: border-box; - flex-shrink: 0; - position: relative; - &.reflowable { - display: flex; - html.appearance-ltr & { flex-direction: row; } - html.appearance-rtl & { flex-direction: row-reverse; } - html.appearance-ttb & { flex-direction: column; } - flex-wrap: nowrap; - justify-content: flex-start; - align-items: center; - &:before { - content: ""; - display: block; - position: absolute; - // @____Bibi:Dress__('-') background: $Slider-Bookmap-ItemBox_BorderColor__ForReflowable; - html.book-reflowable.appearance-horizontal & { @include size(1px, calc(100% + 2px)); top: -1px; bottom: -1px; margin: auto 0; } - html.book-reflowable.appearance-vertical & { @include size(calc(100% + 2px), 1px); left: -1px; right: -1px; margin: 0 auto; } - html.book-reflowable.appearance-rtl & { right: -1px; left: auto; } - html.book-reflowable.appearance-ltr & { left: -1px; right: auto; } - html.book-reflowable.appearance-ttb & { top: -1px; bottom: auto; } - html:not(.slider-opened) & { display: none; } - } - } -} - - -// - . Bookmap > Spread Box > Spread > Item Box > Item -// -------------------------------------------------------------------------------- - -span.bookmap-item { - /* - box-sizing: content-box; - display: block; - position: absolute; - z-index: 1; - @include offset(0); - margin: 0; - padding: 0; - @include size(100%); - border: none 0; - line-height: 1; - vertical-align: top; - */ - display: none; -} - - -// - . Bookmap > Spread Box > Spread > Item Box > Page -// -------------------------------------------------------------------------------- - -span.bookmap-page { - box-sizing: border-box; - display: block; - z-index: 10; - div.bookmap-item-box.reflowable & { - position: relative; - flex-shrink: 0; - } - div.bookmap-item-box.pre-paginated & { - position: absolute; - @include offset(0);//trbl(-1px); - margin: auto; - @include size(100%); - } - background: transparent; - html.slider-opened & { - // @____Bibi:Dress__('-') background-color: $Slider-Bookmap-Page_Color__SliderOpened; - } - html.slider-opened &.hover { - // @____Bibi:Dress__('-') background-color: $Slider-Bookmap-Page_Color__SliderOpened__Hover; - // @____Bibi:Dress__('-') border: solid 1px $Slider-Bookmap-Page_BorderColor__SliderOpened__Hover; - } -} - - // - . History // -------------------------------------------------------------------------------- diff --git a/__src/bibi/wardrobe/_dress-codes/_nombre.scss b/__src/bibi/wardrobe/_dress-codes/_nombre.scss index 2e26ddf6..5b081217 100644 --- a/__src/bibi/wardrobe/_dress-codes/_nombre.scss +++ b/__src/bibi/wardrobe/_dress-codes/_nombre.scss @@ -5,9 +5,17 @@ $Nombre_Width: 140px; $Nombre_Height: 20px; -$Nombre_Color: rgb(64,64,64); -$Nombre-Current_Color: darken($Nombre_Color, 25%); -$Nombre-Percent_Color: lighten($Nombre_Color, 25%); +$Nombre_KeyColor: rgb(48,48,48); -$Nombre_BackgroundColor: rgba(240,240,240,0.9); -$Nombre_BackgroundColor: rgb(240,240,240); \ No newline at end of file +$Nombre-Current_Color: $Nombre_KeyColor; +$Nombre-Delimiter_Color: lighten($Nombre_KeyColor, 20%); +$Nombre-Total_Color: lighten($Nombre_KeyColor, 10%); +$Nombre-Percent_Color: lighten($Nombre_KeyColor, 20%); +$Nombre_BackgroundColor: rgba(lighten($Nombre_KeyColor, 77%), .9); + +$Nombre_KeyColor__SliderOpened: $Slider_KeyColor; +$Nombre-Current_Color__SliderOpened: $Nombre_KeyColor__SliderOpened; +$Nombre-Delimiter_Color__SliderOpened: lighten($Nombre_KeyColor__SliderOpened, 20%); +$Nombre-Total_Color__SliderOpened: lighten($Nombre_KeyColor__SliderOpened, 10%); +$Nombre-Percent_Color__SliderOpened: lighten($Nombre_KeyColor__SliderOpened, 20%); +$Nombre_BackgroundColor__SliderOpened: transparent; \ No newline at end of file diff --git a/__src/bibi/wardrobe/_dress-codes/_slider.scss b/__src/bibi/wardrobe/_dress-codes/_slider.scss index da8e706f..65ebc45e 100644 --- a/__src/bibi/wardrobe/_dress-codes/_slider.scss +++ b/__src/bibi/wardrobe/_dress-codes/_slider.scss @@ -5,9 +5,9 @@ $Slider_Size: 64px; $Slider_PaddingStart__SliderOpened: 8px; -$Slider_PaddingEnd__SliderOpened: 8px; +$Slider_PaddingEnd__SliderOpened: 8px; $Slider_PaddingBefore__SliderOpened: 8px; $Slider_PaddingBefore__SliderOpened__WithHistory: 48px; -$Slider_PaddingAfter__SliderOpened: 8px; +$Slider_PaddingAfter__SliderOpened: 8px; $Slider_Transition__Open: .01s ease; $Slider_Transition__Close: .1s ease; @@ -41,32 +41,35 @@ $Slider-Thumb_BackgroundColor__Active: rgb(160,160,160); $Slider-Thumb_BorderColor: transparent;//rgb(32,32,32); // [ja] └ 画面中央タップ以前の細い状態(スクロールバーを模した状態)の Slider の、現在位置表示となるサムの色(Slider 以外のスクロールバーは WebKit/Blink 系のみに適用されます) -$Slider-Thumb-Circle_Size: 16px; -$Slider-Thumb-Circle_BackgroundColor: $Slider_KeyColor; +$Slider-Thumb_Size__SliderOpened: 11px; -$Slider-Thumb-Circle_BorderColor: $Slider-Thumb-Circle_BackgroundColor; -$Slider-Thumb-Circle_BorderWidth: 0; +$Slider-Thumb_Border__SliderOpened: none 0 transparent;//solid 1px rgba($Slider_KeyColor, .1); +$Slider-Thumb_BackgroundColor__SliderOpened: rgba($Slider_KeyColor, .5);//linear-gradient(to left, $Slider_KeyColor 0, $Slider_KeyColor $Slider-Thumb_Size__SliderOpened, rgba($Slider_KeyColor, .25) $Slider-Thumb_Size__SliderOpened, rgba($Slider_KeyColor, .25) 100%); -$Slider-Thumb-Circle-Halo_Width: 1px; -$Slider-Thumb-Circle-Halo_Color: rgba(white, .5); +$Slider-Thumb_Border__SliderOpened__Min: $Slider-Thumb_Border__SliderOpened;//none 0 transparent; +$Slider-Thumb_BackgroundColor__SliderOpened__Min: $Slider-Thumb_BackgroundColor__SliderOpened;//$Slider_KeyColor; + +$Slider-Thumb-Halo_Width__SliderOpened: 0;//1px; +$Slider-Thumb-Halo_Color__SliderOpened: transparent;//rgba(white, .625); // - . Rail // -------------------------------------------------------------------------------- -$Slider-Rail_Width__SliderOpened: 1px; -$Slider-Rail-Progress_Width__SliderOpened: 2px; -$Slider-Rail_Color: rgb(192,192,192);//rgba(gray, 0.250); -$Slider-Rail_Color__Hover: $Slider-Rail_Color; -$Slider-Rail-Progress_Color: $Slider_KeyColor; -$Slider-Rail-Progress_Color__Hover: $Slider_KeyColor; +$Slider-Rail-FullLength_Width__SliderOpened: 1px; +$Slider-Rail-FullLength_Color__SliderOpened: rgb(216,216,216); +$Slider-Rail-FullLength_Color__SliderOpened__Hover: $Slider-Rail-FullLength_Color__SliderOpened; +$Slider-Rail-Groove_Width__SliderOpened: 1px; +$Slider-Rail-Groove_Color__SliderOpened: rgb(216,216,216); +$Slider-Rail-Groove_Color__SliderOpened__Hover: $Slider-Rail-Groove_Color__SliderOpened; -// - UI Box (Edgebar Box, Bookmap Box) -// -------------------------------------------------------------------------------- +$Slider-Rail-Progress_Width__SliderOpened: 3px; +$Slider-Rail-Progress_Color__SliderOpened: $Slider_KeyColor; +$Slider-Rail-Progress_Color__SliderOpened__Hover: $Slider_KeyColor; -// - Edgebar, Bookmap +// - Edgebar Box // -------------------------------------------------------------------------------- @@ -77,41 +80,6 @@ $Slider-Edgebar_BorderRadius: 2px;//($Slider_Size - $Slider_PaddingStart__Slider $Slider-Edgebar_Background: white; -// - Bookmap -// -------------------------------------------------------------------------------- - - -// - . Bookmap > Spread Box -// -------------------------------------------------------------------------------- - -$Slider-Bookmap-SpreadBox_Color: transparent; -$Slider-Bookmap-SpreadBox_Color__Hover: rgba($Slider_KeyColor, .33); - - -// - . Bookmap > Spread Box > Spread -// -------------------------------------------------------------------------------- - -$Slider-Bookmap-Spread_Background: rgba(white, .5); - - -// - . Bookmap > Spread Box > Spread > Item Box -// -------------------------------------------------------------------------------- - -$Slider-Bookmap-ItemBox_BorderColor__ForReflowable: rgb(216,216,216); - - -// - . Bookmap > Spread Box > Spread > Item Box > Item -// -------------------------------------------------------------------------------- - - -// - . Bookmap > Spread Box > Spread > Item Box > Page -// -------------------------------------------------------------------------------- - -$Slider-Bookmap-Page_Color__SliderOpened: white; -$Slider-Bookmap-Page_Color__SliderOpened__Hover: lighten($Slider_KeyColor, 33%); -$Slider-Bookmap-Page_BorderColor__SliderOpened__Hover: $Slider-Bookmap-Page_Color__SliderOpened__Hover; - - // ================================================================================ diff --git a/__src/bibi/wardrobe/_dress-patterns/_nombre.scss b/__src/bibi/wardrobe/_dress-patterns/_nombre.scss index ddb351a7..ea7f7a42 100644 --- a/__src/bibi/wardrobe/_dress-patterns/_nombre.scss +++ b/__src/bibi/wardrobe/_dress-patterns/_nombre.scss @@ -2,26 +2,33 @@ // + Nombre // -------------------------------------------------------------------------------- - div#bibi-nombre { - border-radius: $Nombre_Height * 0.5; - @include size($Nombre_Width, $Nombre_Height); - line-height: $Nombre_Height; - color: $Nombre_Color; - background: $Nombre_BackgroundColor; - html.view-vertical & { - transform: rotate(90deg) translateY(($Nombre_Width - $Nombre_Height) * -0.5); - } - html.slider-opened.appearance-horizontal & { - bottom: $Slider_Size + 2px !important; - } - html.slider-opened.appearance-vertical & { - right: $Slider_Size + 2px !important; + & { + border-radius: $Nombre_Height * 0.5; + @include size($Nombre_Width, $Nombre_Height); + line-height: $Nombre_Height; + background: $Nombre_BackgroundColor; } -} - span#bibi-nombre-current { - color: $Nombre-Current_Color; + html.slider-opened & { background: $Nombre_BackgroundColor__SliderOpened; } + html.view-vertical & { transform: rotate(90deg) translateY(($Nombre_Width - $Nombre_Height) * -0.5); } + html.slider-opened.appearance-horizontal & { bottom: $Slider_PaddingEnd__SliderOpened !important; } + html.slider-opened.appearance-vertical & { right: $Slider_PaddingEnd__SliderOpened !important; } + span { + &.bibi-nombre-current { + color: $Nombre-Current_Color; + html.slider-opened & { color: $Nombre-Current_Color__SliderOpened; } + } + &.bibi-nombre-delimiter { + color: $Nombre-Delimiter_Color; + html.slider-opened & { color: $Nombre-Delimiter_Color__SliderOpened; } + } + &.bibi-nombre-total { + color: $Nombre-Total_Color; + html.slider-opened & { color: $Nombre-Total_Color__SliderOpened; } + } + &.bibi-nombre-percent { + color: $Nombre-Percent_Color; + html.slider-opened & { color: $Nombre-Percent_Color__SliderOpened; } + } } - span#bibi-nombre-percent { - color: $Nombre-Percent_Color; - } \ No newline at end of file +} \ No newline at end of file diff --git a/__src/bibi/wardrobe/_dress-patterns/_slider.scss b/__src/bibi/wardrobe/_dress-patterns/_slider.scss index 05031474..a9bc2ec7 100644 --- a/__src/bibi/wardrobe/_dress-patterns/_slider.scss +++ b/__src/bibi/wardrobe/_dress-patterns/_slider.scss @@ -59,12 +59,18 @@ div#bibi-slider-thumb { html:not(.slider-opened):not(.touch) &:hover:before { background-color: $Slider-Thumb_BackgroundColor__Hover; } html:not(.slider-opened):not(.touch) &:active:before { background-color: $Slider-Thumb_BackgroundColor__Active; } &:after { - @include offset($Slider-Thumb-Circle_Size * -1); - @include size($Slider-Thumb-Circle_Size); - border-width: $Slider-Thumb-Circle_BorderWidth; - border-color: $Slider-Thumb-Circle_BorderColor; - background: $Slider-Thumb-Circle_BackgroundColor; - box-shadow: 0 0 0 $Slider-Thumb-Circle-Halo_Width $Slider-Thumb-Circle-Halo_Color; + @include offset($Slider-Thumb_Size__SliderOpened * -1); + @include min-size($Slider-Thumb_Size__SliderOpened); + html.appearance-horizontal & { @include size(100%, $Slider-Thumb_Size__SliderOpened); } + html.appearance-vertical & { @include size($Slider-Thumb_Size__SliderOpened, 100%); } + border-radius: $Slider-Thumb_Size__SliderOpened * .5; + border: $Slider-Thumb_Border__SliderOpened; + background: $Slider-Thumb_BackgroundColor__SliderOpened; + box-shadow: 0 0 0 $Slider-Thumb-Halo_Width__SliderOpened $Slider-Thumb-Halo_Color__SliderOpened; + } + &.min:after { + border: $Slider-Thumb_Border__SliderOpened__Min; + background: $Slider-Thumb_BackgroundColor__SliderOpened__Min; } } @@ -74,30 +80,39 @@ div#bibi-slider-thumb { div#bibi-slider-rail { & { - background: $Slider-Rail_Color; + background: $Slider-Rail-FullLength_Color__SliderOpened; } - html.slider-opened & { border-radius: $Slider-Rail_Width__SliderOpened / 2; } - html.slider-opened.appearance-horizontal & { height: $Slider-Rail_Width__SliderOpened; } - html.slider-opened.appearance-vertical & { width: $Slider-Rail_Width__SliderOpened; } - div#bibi-slider:hover & { background: $Slider-Rail_Color__Hover; } + html.slider-opened.appearance-horizontal & { height: $Slider-Rail-FullLength_Width__SliderOpened; } + html.slider-opened.appearance-vertical & { width: $Slider-Rail-FullLength_Width__SliderOpened; } + div#bibi-slider:hover & { background: $Slider-Rail-FullLength_Color__SliderOpened__Hover; } +} + +div#bibi-slider-rail-groove { + & { + background: $Slider-Rail-Groove_Color__SliderOpened; + } + html.slider-opened.appearance-horizontal & { height: $Slider-Rail-Groove_Width__SliderOpened; } + html.slider-opened.appearance-vertical & { width: $Slider-Rail-Groove_Width__SliderOpened; } + div#bibi-slider:hover & { background: $Slider-Rail-Groove_Color__SliderOpened__Hover; } } div#bibi-slider-rail-progress { & { - background: $Slider-Rail-Progress_Color; + background: $Slider-Rail-Progress_Color__SliderOpened; } - html.slider-opened & {} html.slider-opened.appearance-horizontal & { height: $Slider-Rail-Progress_Width__SliderOpened; } html.slider-opened.appearance-vertical & { width: $Slider-Rail-Progress_Width__SliderOpened; } - div#bibi-slider:hover & { background: $Slider-Rail-Progress_Color__Hover; } + html.slider-opened.appearance-ltr & { border-radius: 0 ($Slider-Rail-Progress_Width__SliderOpened * .5) ($Slider-Rail-Progress_Width__SliderOpened * .5) 0; } + html.slider-opened.appearance-rtl & { border-radius: ($Slider-Rail-Progress_Width__SliderOpened * .5) 0 0 ($Slider-Rail-Progress_Width__SliderOpened * .5); } + html.slider-opened.appearance-ttb & { border-radius: 0 0 ($Slider-Rail-Progress_Width__SliderOpened * .5) ($Slider-Rail-Progress_Width__SliderOpened * .5); } + div#bibi-slider:hover & { background: $Slider-Rail-Progress_Color__SliderOpened__Hover; } } -// - UI Box (Edgebar Box, Bookmap Box) +// - Edgebar Box // -------------------------------------------------------------------------------- -div#bibi-slider-edgebar-box, -div#bibi-slider-bookmap-box { +div#bibi-slider-edgebar-box { & { html.slider-opened.appearance-horizontal & { top: 1px + $Slider_PaddingStart__SliderOpened; @@ -141,84 +156,10 @@ div#bibi-slider-bookmap-box { } -// - Edgebar, Bookmap -// -------------------------------------------------------------------------------- - -div#bibi-slider-edgebar, -div#bibi-slider-bookmap { -} - - // - Edgebar // -------------------------------------------------------------------------------- div#bibi-slider-edgebar { border-radius: $Slider-Edgebar_BorderRadius; background: $Slider-Edgebar_Background; -} - - -// - Bookmap -// -------------------------------------------------------------------------------- - -div#bibi-slider-bookmap { -} - - div.bookmap-spread-box, - div.bookmap-spread, - div.bookmap-item-box, - span.bookmap-item, - span.bookmap-page { - } - - -// - . Bookmap > Spread Box -// -------------------------------------------------------------------------------- - -div.bookmap-spread-box { - background: $Slider-Bookmap-SpreadBox_Color; - &.hover { - //background: $Slider-Bookmap-SpreadBox_Color__Hover; - } -} - - -// - . Bookmap > Spread Box > Spread -// -------------------------------------------------------------------------------- - -div.bookmap-spread { - background: $Slider-Bookmap-Spread_Background; -} - - -// - . Bookmap > Spread Box > Spread > Item Box -// -------------------------------------------------------------------------------- - -div.bookmap-item-box { - &.reflowable { - &:before { - background: $Slider-Bookmap-ItemBox_BorderColor__ForReflowable; - } - } -} - - -// - . Bookmap > Spread Box > Spread > Item Box > Item -// -------------------------------------------------------------------------------- - -span.bookmap-item { -} - - -// - . Bookmap > Spread Box > Spread > Item Box > Page -// -------------------------------------------------------------------------------- - -span.bookmap-page { - html.slider-opened & { - background-color: $Slider-Bookmap-Page_Color__SliderOpened; - } - html.slider-opened &.hover { - background-color: $Slider-Bookmap-Page_Color__SliderOpened__Hover; - border: solid 1px $Slider-Bookmap-Page_BorderColor__SliderOpened__Hover; - } } \ No newline at end of file From 45b17d0c524e1826675d6172ba45239a31f960c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20Matsushima=20=28=E2=84=A0=29?= Date: Sun, 10 May 2020 17:06:59 +0900 Subject: [PATCH 41/43] Update/add libraries. --- README.md | 1 + .../resources/scripts/polyfills/bundle.js | 1 + bibi.info.js | 1 + package-lock.json | 1260 +++++++---------- package.json | 15 +- 5 files changed, 517 insertions(+), 761 deletions(-) diff --git a/README.md b/README.md index 83d8c736..4029ba76 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,7 @@ License - [document.currentScript Polyfill](https://github.com/amiller-gh/currentScript-polyfill) : © Adam Miller / Licensed under [the MIT License](https://github.com/amiller-gh/currentScript-polyfill/blob/master/LICENSE) - [custom-event-polyfill](https://github.com/kumarharsh/custom-event-polyfill) : © Evan Krambuhl / Licensed under [the MIT License](https://github.com/kumarharsh/custom-event-polyfill/blob/master/LICENSE) - [Native Promise Only (NPO)](https://github.com/getify/native-promise-only) : © Kyle Simpson / Licensed under [the MIT License](http://getify.mit-license.org/) + - [ES6 Object.assign()](https://github.com/rubennorte/es6-object-assign) : © Rubén Norte / Licensed under [the MIT License](https://github.com/rubennorte/es6-object-assign/blob/master/LICENSE) - [Polyfill Array.prototype.includes](https://github.com/latusinski/polyfill-array-includes) : © Kevin Latusinski / Licensed under [the MIT License](https://www.npmjs.com/package/polyfill-array-includes) - [String.prototype.padStart](https://github.com/KhaledElAnsari/String.prototype.padStart) : © Khaled Al-Ansari / Licensed under [the MIT License](https://github.com/KhaledElAnsari/String.prototype.padStart/blob/master/LICENSE) - [url-polyfill](https://github.com/lifaon74/url-polyfill) : © Valentin Richard / Licensed under [the MIT License](https://github.com/lifaon74/url-polyfill/blob/master/LICENSE) diff --git a/__src/bibi/resources/scripts/polyfills/bundle.js b/__src/bibi/resources/scripts/polyfills/bundle.js index f1052d13..e358c5ff 100644 --- a/__src/bibi/resources/scripts/polyfills/bundle.js +++ b/__src/bibi/resources/scripts/polyfills/bundle.js @@ -6,6 +6,7 @@ import 'intersection-observer'; import 'current-script-polyfill'; import 'custom-event-polyfill'; import 'native-promise-only'; +import 'es6-object-assign/auto'; import 'polyfill-array-includes'; import 'string.padstart'; import 'url-polyfill'; \ No newline at end of file diff --git a/bibi.info.js b/bibi.info.js index 8b1efa99..fd26ccf5 100644 --- a/bibi.info.js +++ b/bibi.info.js @@ -72,6 +72,7 @@ Bibi.Banners = Object.assign({ * - document.currentScript Polyfill : © Adam Miller - https://github.com/amiller-gh/currentScript-polyfill / Licensed under the MIT License - https://github.com/amiller-gh/currentScript-polyfill/blob/master/LICENSE * - custom-event-polyfill : © Evan Krambuhl - https://github.com/kumarharsh/custom-event-polyfill / Licensed under the MIT License - https://github.com/kumarharsh/custom-event-polyfill/blob/master/LICENSE * - Native Promise Only (NPO) : © Kyle Simpson - https://github.com/getify/native-promise-only / Licensed under the MIT License - https://getify.mit-license.org/ + * - ES6 Object.assign() : © Rubén Norte - https://github.com/rubennorte/es6-object-assign / Licensed under the MIT License - https://github.com/rubennorte/es6-object-assign/blob/master/LICENSE * - Polyfill Array.prototype.includes : © Kevin Latusinski - https://github.com/latusinski/polyfill-array-includes / Licensed under the MIT License - https://github.com/kevlatus/polyfill-array-includes/blob/master/LICENSE * - String.prototype.padStart : © Khaled Al-Ansari - https://github.com/KhaledElAnsari/String.prototype.padStart / Licensed under the MIT License - https://github.com/KhaledElAnsari/String.prototype.padStart/blob/master/LICENSE * - url-polyfill : © Valentin Richard - https://github.com/lifaon74/url-polyfill / Licensed under the MIT License - https://github.com/lifaon74/url-polyfill/blob/master/LICENSE diff --git a/package-lock.json b/package-lock.json index dcbc208d..4453c471 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,30 +14,30 @@ } }, "@babel/compat-data": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", - "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.6.tgz", + "integrity": "sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g==", "dev": true, "requires": { - "browserslist": "^4.9.1", + "browserslist": "^4.11.1", "invariant": "^2.2.4", "semver": "^5.5.0" } }, "@babel/core": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", - "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", + "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", + "@babel/generator": "^7.9.6", "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.0", - "@babel/parser": "^7.9.0", + "@babel/helpers": "^7.9.6", + "@babel/parser": "^7.9.6", "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -49,12 +49,12 @@ } }, "@babel/generator": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz", - "integrity": "sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", "dev": true, "requires": { - "@babel/types": "^7.9.5", + "@babel/types": "^7.9.6", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -80,13 +80,13 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", - "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz", + "integrity": "sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.6", - "browserslist": "^4.9.1", + "@babel/compat-data": "^7.9.6", + "browserslist": "^4.11.1", "invariant": "^2.2.4", "levenary": "^1.1.1", "semver": "^5.5.0" @@ -224,15 +224,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", - "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", + "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.6", - "@babel/types": "^7.8.6" + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" } }, "@babel/helper-simple-access": { @@ -273,14 +273,14 @@ } }, "@babel/helpers": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", - "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", + "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", "dev": true, "requires": { "@babel/template": "^7.8.3", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0" + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" } }, "@babel/highlight": { @@ -295,9 +295,9 @@ } }, "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -352,9 +352,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz", - "integrity": "sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz", + "integrity": "sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3", @@ -613,38 +613,38 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", - "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz", + "integrity": "sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", - "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz", + "integrity": "sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-simple-access": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", - "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz", + "integrity": "sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.8.3", "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { @@ -780,13 +780,13 @@ } }, "@babel/preset-env": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.5.tgz", - "integrity": "sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.6.tgz", + "integrity": "sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.9.0", - "@babel/helper-compilation-targets": "^7.8.7", + "@babel/compat-data": "^7.9.6", + "@babel/helper-compilation-targets": "^7.9.6", "@babel/helper-module-imports": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-proposal-async-generator-functions": "^7.8.3", @@ -794,7 +794,7 @@ "@babel/plugin-proposal-json-strings": "^7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-proposal-numeric-separator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.5", + "@babel/plugin-proposal-object-rest-spread": "^7.9.6", "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", "@babel/plugin-proposal-optional-chaining": "^7.9.0", "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", @@ -821,9 +821,9 @@ "@babel/plugin-transform-function-name": "^7.8.3", "@babel/plugin-transform-literals": "^7.8.3", "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.9.0", - "@babel/plugin-transform-modules-commonjs": "^7.9.0", - "@babel/plugin-transform-modules-systemjs": "^7.9.0", + "@babel/plugin-transform-modules-amd": "^7.9.6", + "@babel/plugin-transform-modules-commonjs": "^7.9.6", + "@babel/plugin-transform-modules-systemjs": "^7.9.6", "@babel/plugin-transform-modules-umd": "^7.9.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", "@babel/plugin-transform-new-target": "^7.8.3", @@ -839,8 +839,8 @@ "@babel/plugin-transform-typeof-symbol": "^7.8.4", "@babel/plugin-transform-unicode-regex": "^7.8.3", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.9.5", - "browserslist": "^4.9.1", + "@babel/types": "^7.9.6", + "browserslist": "^4.11.1", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", "levenary": "^1.1.1", @@ -861,9 +861,9 @@ } }, "@babel/runtime": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", + "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -881,26 +881,26 @@ } }, "@babel/traverse": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz", - "integrity": "sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.5", + "@babel/generator": "^7.9.6", "@babel/helper-function-name": "^7.9.5", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.0", - "@babel/types": "^7.9.5", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz", - "integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.9.5", @@ -958,9 +958,9 @@ "dev": true }, "@types/node": { - "version": "13.13.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.2.tgz", - "integrity": "sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==", + "version": "13.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", + "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==", "dev": true }, "@types/q": { @@ -1479,6 +1479,14 @@ "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "assert": { @@ -1849,9 +1857,9 @@ "dev": true }, "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==", "dev": true }, "boolbase": { @@ -2023,21 +2031,43 @@ "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.1.0.tgz", + "integrity": "sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg==", "dev": true, "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.2", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "browserify-zlib": { @@ -2235,9 +2265,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001045", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001045.tgz", - "integrity": "sha512-Y8o2Iz1KPcD6FjySbk1sPpvJqchgxk/iow0DABpGyzA1UeQAuxh63Xh0Enj5/BrsYbXtCN32JmR4ZxQTCQ6E6A==", + "version": "1.0.30001054", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001054.tgz", + "integrity": "sha512-jiKlTI6Ur8Kjfj8z0muGrV6FscpRvefcQVPSuMuXnvRCfExU7zlVLNjmOz1TnurWgUrAY7MMmjyy+uTgIl1XHw==", "dev": true }, "caseless": { @@ -2730,6 +2760,14 @@ "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "create-hash": { @@ -3351,6 +3389,14 @@ "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "dir-glob": { @@ -3410,9 +3456,9 @@ "dev": true }, "dompurify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.10.tgz", - "integrity": "sha512-ok1dcSztsIuVxWG6Cx0ujyDIzNclz9W9OIU0cOb0IT+VAtSLrOelZF4miUvSm1U4PoCw8D7sIOLCnCQOaVpr3w==" + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.11.tgz", + "integrity": "sha512-qVoGPjIW9IqxRij7klDQQ2j6nSe4UNWANBhZNLnsS7ScTtLb+3YdxkRY8brNTpkUiTtcXsCJO+jS0UCDfenLuA==" }, "domutils": { "version": "1.7.0", @@ -3495,9 +3541,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.414", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.414.tgz", - "integrity": "sha512-UfxhIvED++qLwWrAq9uYVcqF8FdeV9sU2S7qhiHYFODxzXRrd1GZRl/PjITHsTEejgibcWDraD8TQqoHb1aCBQ==", + "version": "1.3.432", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.432.tgz", + "integrity": "sha512-/GdNhXyLP5Yl2322CUX/+Xi8NhdHBqL6lD9VJVKjH6CjoPGakvwZ5CpKgj/oOlbzuWWjOvMjDw1bBuAIRCNTlw==", "dev": true }, "elliptic": { @@ -3513,6 +3559,14 @@ "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "emoji-regex": { @@ -3653,9 +3707,9 @@ } }, "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", + "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==", "dev": true }, "errno": { @@ -3728,6 +3782,11 @@ "es6-symbol": "^3.1.1" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=" + }, "es6-symbol": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", @@ -4427,557 +4486,17 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", - "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" } }, "fstream": { @@ -5205,9 +4724,9 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, "gulp": { @@ -5469,13 +4988,33 @@ } }, "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + } } }, "hash.js": { @@ -6103,9 +5642,9 @@ "dev": true }, "jest-worker": { - "version": "25.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.5.0.tgz", - "integrity": "sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.0.0.tgz", + "integrity": "sha512-pPaYa2+JnwmiZjK9x7p9BoZht+47ecFCDFA/CJxspHzeDvQcfVBLWzCiWyo+EGrSiQMWZtCFo9iSvMZnAAo8vw==", "dev": true, "requires": { "merge-stream": "^2.0.0", @@ -6701,6 +6240,14 @@ "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "mime": { @@ -6710,18 +6257,18 @@ "dev": true }, "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "dev": true }, "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "dev": true, "requires": { - "mime-db": "1.43.0" + "mime-db": "1.44.0" } }, "mimic-fn": { @@ -6847,6 +6394,24 @@ "minipass": "^3.0.0" } }, + "minizlib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.0.tgz", + "integrity": "sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -6915,6 +6480,23 @@ "run-queue": "^1.0.3" } }, + "move-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/move-file/-/move-file-2.0.0.tgz", + "integrity": "sha512-cdkdhNCgbP5dvS4tlGxZbD+nloio9GIimP57EjqFhwLcMjnU+XJKAZzlmg/TN/AK1LuNAdTSvm3CPPP4Xkv0iQ==", + "dev": true, + "requires": { + "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -7055,15 +6637,15 @@ "dev": true }, "node-releases": { - "version": "1.1.53", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.53.tgz", - "integrity": "sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==", + "version": "1.1.55", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.55.tgz", + "integrity": "sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==", "dev": true }, "node-sass": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.0.tgz", - "integrity": "sha512-AxqU+DFpk0lEz95sI6jO0hU0Rwyw7BXVEv6o9OItoXLyeygPeaSpiV4rwQb10JiTghHaa0gZeD21sz+OsQluaw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -7080,7 +6662,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -7966,9 +7548,9 @@ "dev": true }, "postcss": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz", - "integrity": "sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==", + "version": "7.0.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.29.tgz", + "integrity": "sha512-ba0ApvR3LxGvRMMiUa9n0WR4HjzcYm7tS+ht4/2Nd0NLtHpPIH77fuB9Xh1/yJVz9O/E/95Y/dn8ygWsyffXtw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -8513,9 +8095,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz", - "integrity": "sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==", + "version": "7.0.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.29.tgz", + "integrity": "sha512-ba0ApvR3LxGvRMMiUa9n0WR4HjzcYm7tS+ht4/2Nd0NLtHpPIH77fuB9Xh1/yJVz9O/E/95Y/dn8ygWsyffXtw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -9504,9 +9086,9 @@ } }, "postcss-value-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", - "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, "postcss-values-parser": { @@ -9585,6 +9167,14 @@ "parse-asn1": "^5.0.0", "randombytes": "^2.0.1", "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "pump": { @@ -9949,9 +9539,9 @@ } }, "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", "dev": true }, "replace-homedir": { @@ -10020,9 +9610,9 @@ "dev": true }, "resolve": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", - "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -10201,45 +9791,170 @@ "dev": true }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -10587,9 +10302,9 @@ "dev": true }, "sml.js": { - "version": "1.0.27", - "resolved": "https://registry.npmjs.org/sml.js/-/sml.js-1.0.27.tgz", - "integrity": "sha512-6+D1say979nfpTrRwa37y55x9keQc1bUrMrV9OtXK1SQbqAHxnd//xYbK5h9yLoujzKzqvNeLprNNEv3TqjlyQ==" + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/sml.js/-/sml.js-1.0.28.tgz", + "integrity": "sha512-dgUesMdO+X7jiPRbzZnyuQCj8yp1X6LMaXOiIm7XDDxCZxSmHUwaUp2EXocxrCJPeTkqap7SoE6RAS4Dn0VxXg==" }, "snapdragon": { "version": "0.8.2", @@ -10923,9 +10638,9 @@ } }, "source-map-support": { - "version": "0.5.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.18.tgz", - "integrity": "sha512-9luZr/BZ2QeU6tO2uG8N2aZpVSli4TSAOAqFOyTO51AJcD9P99c0K1h6dD6r6qo5dyT44BR5exweOaLLeldTkQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -11453,9 +11168,9 @@ } }, "terser": { - "version": "4.6.11", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.11.tgz", - "integrity": "sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA==", + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.13.tgz", + "integrity": "sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw==", "dev": true, "requires": { "commander": "^2.20.0", @@ -11472,48 +11187,53 @@ } }, "terser-webpack-plugin": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz", - "integrity": "sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.0.1.tgz", + "integrity": "sha512-eFDtq8qPUEa9hXcUzTwKXTnugIVtlqc1Z/ZVhG8LmRT3lgRY13+pQTnFLY2N7ATB6TKCHuW/IGjoAnZz9wOIqw==", "dev": true, "requires": { - "cacache": "^13.0.1", + "cacache": "^15.0.3", "find-cache-dir": "^3.3.1", - "jest-worker": "^25.4.0", + "jest-worker": "^26.0.0", "p-limit": "^2.3.0", "schema-utils": "^2.6.6", "serialize-javascript": "^3.0.0", "source-map": "^0.6.1", - "terser": "^4.6.12", + "terser": "^4.6.13", "webpack-sources": "^1.4.3" }, "dependencies": { "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", - "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.3.tgz", + "integrity": "sha512-bc3jKYjqv7k4pWh7I/ixIjfcjPul4V4jme/WbjvwGS5LzoPL/GzXr4C5EgPNLO/QEZl9Oi61iGitYEdwcrwLCQ==", "dev": true, "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", + "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "glob": "^7.1.4", - "graceful-fs": "^4.2.2", "infer-owner": "^1.0.4", "lru-cache": "^5.1.1", - "minipass": "^3.0.0", + "minipass": "^3.1.1", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", + "mkdirp": "^1.0.3", + "move-file": "^2.0.0", + "p-map": "^4.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", + "rimraf": "^3.0.2", + "ssri": "^8.0.0", + "tar": "^6.0.2", "unique-filename": "^1.1.1" } }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -11553,6 +11273,12 @@ "semver": "^6.0.0" } }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -11571,6 +11297,15 @@ "p-limit": "^2.2.0" } }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -11592,6 +11327,15 @@ "find-up": "^4.0.0" } }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -11611,25 +11355,33 @@ "dev": true }, "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", - "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", + "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", "dev": true, "requires": { - "figgy-pudding": "^3.5.1", "minipass": "^3.1.1" } }, - "terser": { - "version": "4.6.12", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.12.tgz", - "integrity": "sha512-fnIwuaKjFPANG6MAixC/k1TDtnl1YlPLUlLVIxxGZUn1gfUx2+l3/zGNB72wya+lgsb50QBi2tUV75RiODwnww==", + "tar": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz", + "integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==", "dev": true, "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.0", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -11827,9 +11579,9 @@ } }, "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", + "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==", "dev": true }, "tty-browserify": { diff --git a/package.json b/package.json index 55082a9a..1516ee45 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "postinstall": "" }, "devDependencies": { - "@babel/core": "^7.9.0", - "@babel/preset-env": "^7.9.5", + "@babel/core": "^7.9.6", + "@babel/preset-env": "^7.9.6", "autoprefixer": "^9.7.6", "babel-loader": "^8.1.0", "browser-sync": "^2.26.7", @@ -55,15 +55,15 @@ "gulp-zip": "^5.0.1", "hard-source-webpack-plugin": "^0.13.1", "mini-css-extract-plugin": "^0.9.0", - "node-sass": "^4.14.0", + "node-sass": "^4.14.1", "npm-run-all": "^4.1.5", - "postcss": "^7.0.27", + "postcss": "^7.0.29", "postcss-cssnext": "^3.1.0", "postcss-loader": "^3.0.0", "sass-loader": "^8.0.2", "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^1.2.1", - "terser-webpack-plugin": "^2.3.6", + "terser-webpack-plugin": "^3.0.1", "url-loader": "^4.1.0", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", @@ -74,8 +74,9 @@ "classlist-polyfill": "^1.2.0", "current-script-polyfill": "^1.0.0", "custom-event-polyfill": "^1.0.7", - "dompurify": "^2.0.10", + "dompurify": "^2.0.11", "easing-js": "^1.1.2", + "es6-object-assign": "^1.1.0", "intersection-observer": "^0.10.0", "js-yaml": "^3.13.1", "jszip": "^3.4.0", @@ -83,7 +84,7 @@ "material-icons": "^0.3.1", "native-promise-only": "^0.8.1", "polyfill-array-includes": "^2.0.0", - "sml.js": "^1.0.27", + "sml.js": "^1.0.28", "string.padstart": "^0.1.1", "text-encoding-utf-8": "^1.0.2", "url-polyfill": "^1.1.8" From 058a9c9af4447d0ee343ca0f979efac3edc1f665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Satoru=20Matsushima=20=28=E2=84=A0=29?= Date: Sun, 10 May 2020 17:07:31 +0900 Subject: [PATCH 42/43] Improve compatibility, and refactor. --- __src/bibi-demo/embedding/index.html | 12 +-- __src/bibi/resources/scripts/bibi.heart.js | 112 +++++++++++---------- 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/__src/bibi-demo/embedding/index.html b/__src/bibi-demo/embedding/index.html index cd73540d..d58ceda4 100644 --- a/__src/bibi-demo/embedding/index.html +++ b/__src/bibi-demo/embedding/index.html @@ -31,7 +31,7 @@ const Jo = window['bibi:jo']; -document.addEventListener('DOMContentLoaded', () => { +document.addEventListener('DOMContentLoaded', function() { const OneMoreBibi = new Jo.Bibi({ // [Pre-Paginated:LtR] / Default View-Mode: Vertical Scrolling (Unchangeable) / Autostart @@ -49,7 +49,7 @@ }); -const DEMO__addEventListeners = (Bibi) => { +const DEMO__addEventListeners = function(Bibi) { // CustomEvents which can be received from the viewer in default: Bibi.Receiver.addEventListener('bibi:initialized', DEMO__test); // bibi:initialized ... Fires when the initializing of the settings is done. @@ -65,16 +65,16 @@ }; -const DEMO__test = (Eve) => DEMO__log(Eve) || DEMO__colour(Eve); +const DEMO__test = function(Eve) { DEMO__log(Eve) || DEMO__colour(Eve); }; -const DEMO__log = (Eve) => console.log('[Bibi #' + (Jo.Bibis.indexOf(Eve.srcElement.Bibi) + 1) + '] "' + Eve.type + '"', Eve.detail); // Log the events in console. +const DEMO__log = function(Eve) { console.log('[Bibi #' + (Jo.Bibis.indexOf(Eve.srcElement.Bibi) + 1) + '] "' + Eve.type + '"', Eve.detail); }; // Log the events in console. -const DEMO__colour = (Eve) => { // Feedback the event dispatching. Its only for this testing page and the CSS is in demo.css. +const DEMO__colour = function(Eve) { // Feedback the event dispatching. Its only for this testing page and the CSS is in demo.css. const Frame = Eve.srcElement.Bibi.Frame; clearTimeout(Frame.Timer); Frame.classList.remove('hot'); Frame.classList.add('hot'); - Frame.Timer = setTimeout(() => Frame.classList.remove('hot'), 222); + Frame.Timer = setTimeout(function() { Frame.classList.remove('hot'); }, 222); }; diff --git a/__src/bibi/resources/scripts/bibi.heart.js b/__src/bibi/resources/scripts/bibi.heart.js index 5384e8a0..dac5ee5e 100644 --- a/__src/bibi/resources/scripts/bibi.heart.js +++ b/__src/bibi/resources/scripts/bibi.heart.js @@ -162,7 +162,7 @@ Bibi.verifySettingValue = (SettingType, _P, _V, Fill) => Bibi.verifySettingValue if(Fill) return 0; }, 'array': (_P, _V, Fill) => { - if(_V instanceof Array) { + if(Array.isArray(_V)) { switch(_P) { case 'content-draggable' : _V.length = 2; for(let i = 0; i < 2; i++) _V[i] = _V[i] === false || _V[i] === 'false' || _V[i] === '0' || _V[i] === 0 ? false : true; return _V; case 'extensions' : return _V.filter(_I => typeof _I['src'] == 'string' && (_I['src'] = _I['src'].trim())); @@ -207,7 +207,10 @@ Bibi.applyFilteredSettingsTo = (To, From, ListOfSettingTypes, Fill) => { //---------------------------------------------------------------------------------------------------------------------------------------------- +Bibi.at1st = () => Bibi.at1st.List.forEach(fn => typeof fn == 'function' ? fn() : true), Bibi.at1st.List = []; + Bibi.hello = () => new Promise(resolve => { + Bibi.at1st(); O.log.initialize(); O.log(`Hello!`, ''); O.log(`[ja] ${ Bibi['href'] }`); @@ -255,7 +258,7 @@ Bibi.initialize = () => { if(Bibi.Dev) O.HTML.classList.add('dev'); if(Bibi.Debug) O.HTML.classList.add('debug'); O.HTML.classList.add('default-lang-' + (O.Language = (NLs => { // Language - if(navigator.languages instanceof Array) NLs = NLs.concat(navigator.languages); + if(Array.isArray(navigator.languages)) NLs = NLs.concat(navigator.languages); if(navigator.language && navigator.language != NLs[0]) NLs.unshift(navigator.language); for(let l = NLs.length, i = 0; i < l; i++) { const Lan = NLs[i].split ? NLs[i].split('-')[0] : ''; @@ -671,7 +674,7 @@ L.initializeBook = (Par) => new Promise((resolve, reject) => { if(!Par || !Par.BookData) return reject(`Book Data Is Undefined.`); let BookData = Par.BookData; const BookDataFormat = - typeof BookData == 'string' ? (/^https?:\/\//.test(BookData) ? 'URI' : 'Base64') : + typeof BookData == 'string' ? (/^data:/.test(BookData) ? 'Base64' : 'URI') : typeof BookData == 'object' ? (BookData instanceof File ? 'File' : BookData instanceof Blob ? 'BLOB' : '') : ''; if(!BookDataFormat) return reject(`Book Data Is Unknown.`); if(BookDataFormat == 'URI') { @@ -1221,14 +1224,14 @@ L.loadItem = (Item, Opt = {}) => { // !!!! Don't Call Directly. Use L.loadSpread } else reject(); }).catch(() => { Item.Skipped = true; - return {}; + return []; }).then(Source => new Promise(resolve => { const DefaultStyleID = 'bibi-default-style'; Item.setAttribute('sandbox', 'allow-same-origin allow-scripts'); if(!Item.BlobURL) { let HTML = typeof Source == 'string' ? Source : `\n${ B.FullTitle } - #${ Item.Index + 1 }/${ R.Items.length }${ Source[0] || '' }${ Source[1] || '' }`; HTML = HTML.replace(/^<\?.+?\?>/, '').replace(/(]+)?>)/i, `$1` + (!Item.Preprocessed ? `` : '')); - if(sML.UA.Trident || sML.UA.EdgeHTML) { // Legacy Microsoft Browsers do not accept DataURIs for src of