From 01adbf8309da2296f8910616cf33aebdc0218016 Mon Sep 17 00:00:00 2001 From: Drini Cami Date: Mon, 4 Oct 2021 19:13:38 -0400 Subject: [PATCH] 5.0.0-19 (#865) --- BookReader/BookReader.css | 6 +- BookReader/BookReader.js | 2 +- BookReader/BookReader.js.map | 2 +- BookReader/bookreader-component-bundle.js | 66 +++++++++---------- BookReader/bookreader-component-bundle.js.map | 2 +- BookReader/plugins/plugin.chapters.js | 2 +- BookReader/plugins/plugin.chapters.js.map | 2 +- BookReader/plugins/plugin.mobile_nav.js | 2 +- BookReader/plugins/plugin.mobile_nav.js.map | 2 +- BookReader/plugins/plugin.resume.js | 2 +- BookReader/plugins/plugin.resume.js.map | 2 +- BookReader/plugins/plugin.search.js | 2 +- BookReader/plugins/plugin.search.js.map | 2 +- BookReader/plugins/plugin.tts.js | 2 +- BookReader/plugins/plugin.tts.js.map | 2 +- .../plugins/plugin.vendor-fullscreen.js | 2 +- .../plugins/plugin.vendor-fullscreen.js.map | 2 +- BookReader/webcomponents-bundle.js | 3 + .../webcomponents-bundle.js.LICENSE.txt | 9 +++ BookReader/webcomponents-bundle.js.map | 1 + CHANGELOG.md | 8 +++ package-lock.json | 2 +- package.json | 2 +- 23 files changed, 74 insertions(+), 53 deletions(-) create mode 100644 BookReader/webcomponents-bundle.js create mode 100644 BookReader/webcomponents-bundle.js.LICENSE.txt create mode 100644 BookReader/webcomponents-bundle.js.map diff --git a/BookReader/BookReader.css b/BookReader/BookReader.css index a278213bd..2d1c51f7d 100644 --- a/BookReader/BookReader.css +++ b/BookReader/BookReader.css @@ -462,7 +462,7 @@ body.BRfullscreenActive .mm-menu { cursor: unset; } -.br-mode-1up { +.br-mode-1up__root { display: block; overflow: auto; position: relative; @@ -470,11 +470,11 @@ body.BRfullscreenActive .mm-menu { height: 100%; contain: strict; } -.br-mode-1up .br-mode-1up__world { +.br-mode-1up__root .br-mode-1up__world { position: absolute; transform-origin: 0 0; } -.br-mode-1up .br-mode-1up__visible-world { +.br-mode-1up__root .br-mode-1up__visible-world { position: absolute; transform-origin: 0 0; } diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index 2c7a50b2a..44d08d2dc 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -1,3 +1,3 @@ /*! For license information please see BookReader.js.LICENSE.txt */ -(function(){var __webpack_modules__={7570:function(e,t,n){"use strict";n(5666),n(1539),n(9714),n(5827),n(2222),n(1249),n(6833),n(7327),n(7941),n(4916),n(6992),n(8783),n(3948),n(285),n(4765),n(7042),n(9826),n(6699),n(2023),n(8674),n(3123),n(5306),n(9600),n(2526),n(1817),n(2165),n(1038),n(8309),n(3762),n(6891),n(6177),n(5557),function(e){var t=function(e,t){for(var n=e.split(" "),i=new Array,r=0;r:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},i||{});o.dragstart=t(o.dragstart,o.namespace),o.dragcontinue=t(o.dragcontinue,o.namespace);var a,s=function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)},u={dragStartHandler:function(t){return!!s()||!(t.which>1||!t.data.acceptPropagatedEvent&&t.target!=this)&&(t.data.firstCoord=n(t),t.data.lastCoord=t.data.firstCoord,r.bind(o.dragcontinue,t.data,u.dragContinueHandler),a=function(e){e.data=t.data,u.dragEndHandler(e)},e.each(o.dragend.split(" "),(function(e,t){r.get(0).addEventListener(t,a,!0)})),t.data.preventDefault?(t.preventDefault(),!1):void 0)},dragContinueHandler:function(t){if(s())return!0;var i=n(t),r=i.left-t.data.lastCoord.left,o=i.top-t.data.lastCoord.top,a=t.data.scrollable;return t.data.scrollWindow&&(a=e(window)),a.scrollLeft(a.scrollLeft()-r),a.scrollTop(a.scrollTop()-o),t.data.lastCoord=i,t.data.preventDefault?(t.preventDefault(),!1):void 0},dragEndHandler:function(t){if(s())return!0;r.unbind(o.dragcontinue).unbind(o.dragend),e.each(o.dragend.split(" "),(function(e,t){r.get(0).removeEventListener(t,a,!0)}));var n={left:Math.abs(t.data.lastCoord.left-t.data.firstCoord.left),top:Math.abs(t.data.lastCoord.top-t.data.firstCoord.top)},i=Math.max(n.left,n.top);return t.data.preventDefault&&i>o.dragMinDistance?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1):void 0}};return this.each((function(){var t={scrollable:e(this),acceptPropagatedEvent:o.acceptPropagatedEvent,preventDefault:o.preventDefault,scrollWindow:o.scrollWindow};e(this).find(o.dragSelector).bind(o.dragstart,t,u.dragStartHandler)}))},e.fn.removedragscrollable=function(t){return void 0===t&&(t=".ds"),this.each((function(){e(document).find("*").andSelf().unbind(t)}))}}(n(3609));var i=n(5685);function r(e,t,n,i,r,o){var a,s=(a=e.prototype[t],function(){return a.apply(o(this),arguments)});Object.defineProperty(i.prototype,r,{get:function(){return s},set:function(i){e.prototype[t]=function(){var t=this instanceof e?n(this):this;return i.apply(t,arguments)},s=i}})}n(4747),n(6227);var o={fragmentChange:"fragmentChange",PostInit:"PostInit",stop:"stop",resize:"resize",navToggled:"navToggled",fullscreenToggled:"fullscreenToggled",zoomOut:"zoomOut",zoomIn:"zoomIn","1PageViewSelected":"1PageViewSelected","2PageViewSelected":"2PageViewSelected","3PageViewSelected":"3PageViewSelected",mobileNavOpen:"mobileNavOpen"},a=n(3609);function s(e,t){for(var n=0;n".concat(t.template(this.br),""):'
  • \n \n
  • "):""}},{key:"_renderControls",value:function(){var e=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(t){return e.controlFor(t)})).join("")}},{key:"_bindViewModeButton",value:function(){var e=this,t=this.br,n=t.options.controls.viewmode,i=[{mode:t.constMode1up,className:"onepg",title:"One-page view"},{mode:t.constMode2up,className:"twopg",title:"Two-page view"},{mode:t.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(e){return!n.excludedModes.includes(e.mode)})),r=i.map((function(e){return e.mode}));n.excludedModes.includes(t.mode)&&t.switchMode(r[0]);for(var s=r.indexOf(t.mode),u=0;u<=s;u++)r.push(r.shift());i.length<2&&this.$nav.find(".".concat(n.className)).remove(),this.br.bind(o.PostInit,(function(){var o=e.$nav.find(".".concat(n.className)).off(".bindNavigationHandlers").on("click",(function(n){var o=r.shift(),s=i.find((function(e){return e.mode===o})),u=i.find((function(e){return e.mode===r[0]}));r.push(o),t.viewModeOrder=r,e.updateViewModeButton(a(n.currentTarget),u.className,u.title),t.switchMode(s.mode)})),s=i.find((function(e){return e.mode===r[0]}));e.updateViewModeButton(o,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(e,t,n){e.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(t)).end().find(".tooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.remove("hide")})),this.maximumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.remove("hide")})),this.minimumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.add("hide")}))}},{key:"init",value:function(){var e=this,t=this.br,n=t.options.navbarTitle,i="rl"===t.pageProgression,r=i?"book_flip_next":"book_flip_prev",o=i?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(r),this.br.options.controls.bookRight.className="book_right ".concat(o),t.refs.$BRfooter=this.$root=a('
    '),t.refs.$BRnav=this.$nav=a('
    \n '.concat(n?'
    '.concat(n,"
    "):"",'\n \n
    ")),this.$root.append(this.$nav),t.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:t.getNumLeafs()-1,value:t.currentIndex(),range:"min"});return s.on("slide",(function(t,n){return e.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,i){return e.updateNavPageNum(i.value),s.data("swallowchange")?s.data("swallowchange",!1):t.jumpToIndex(i.value),!0})),t.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(t.currentIndex()),this.$nav}},{key:"initEmbed",value:function(){var e=this.br,t=(window.location+"").replace("?ui=embed","").replace("/stream/","/details/").replace("#","/"),n=e.showLogo?''):"";e.refs.$BRfooter=this.$root=a('
    '),e.refs.$BRnav=this.$nav=a('
    \n '.concat(n,'\n \n ').concat(e.bookTitle,'\n \n \n \n \n \n \n
    ')),this.$root.append(this.$nav),e.refs.$br.append(this.$root)}},{key:"getNavPageNumString",value:function(e){var t=this.br,n=t.getPageNum(e),i=(t.getPageProp(e,"pageType"),t.getNumLeafs());if(!this.maxPageNum){for(var r,o=0,a=0;ao&&(o=r);this.maxPageNum=o}return c(e,i,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(e){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(e))}},{key:"updateNavIndex",value:function(e){e=void 0!==e?e:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",e)}}])&&s(t.prototype,n),e}();function c(e,t,n,i,r){if("n"==n[0])return"(".concat(e+1," of ").concat(t,")");var o=r?" of ".concat(r):"";return"".concat(n).concat(o)}var l={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,flipSpeed:"fast",showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,autoResize:!0,useSrcSet:!1},h=n(105),d=(n(6977),n(4581),n(3609));function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n\n \n '):"";e.refs.$BRtoolbar=d('\n
    \n
    \n
    \n '.concat(t,'\n \n
    \n
    \n \n \n \n \n
    \n
    \n
    '));var n=e.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return e.bookUrl&&e.options.enableBookTitleLink?n.append(d("").attr({href:e.bookUrl,title:e.bookUrlTitle}).addClass("BRreturn").html(e.bookUrlText||e.bookTitle)):e.bookTitle&&n.append(e.bookUrlText||e.bookTitle),e.refs.$BRtoolbar}},{key:"initToolbar",value:function(e,t){var n=this.br;n.refs.$br.append(this.buildToolbarElement()),n.$(".BRnavCntl").addClass("BRup"),n.$(".pause").hide(),this.updateToolbarZoom(n.reduce),n.refs.$BRtoolbar.append(),n.canSwitchToMode(n.constMode2up)||n.$(".two_page_mode, .play, .pause").hide(),n.canSwitchToMode(n.constModeThumb)||n.$(".thumbnail_mode").hide(),n.canSwitchToMode(n.constMode2up)||n.canSwitchToMode(n.constModeThumb)||n.$(".one_page_mode").hide(),d('
    ').append(m()).append(v()).appendTo(n.refs.$br),n.$(".BRinfo .BRfloatTitle a").attr({href:n.bookUrl}).text(n.bookTitle).addClass("title"),this.buildInfoDiv(n.$(".BRinfo")),this.buildShareDiv(n.$(".BRshare")),n.$(".share").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRshare"),onLoad:function(){n.trigger(o.stop),n.$(".BRpageviewValue").val(window.location.href)}}),n.$(".info").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRinfo"),onLoad:function(){n.trigger(o.stop)}})}},{key:"updateToolbarZoom",value:function(e){var t,n=this.br,i=n.mode==n.constMode2up?n.twoPage.autofit:n.onePage.autofit;t=i?i.slice(0,1).toUpperCase()+i.slice(1):(100/e).toFixed(2).replace(/0+$/,"").replace(/\.$/,"")+"%",n.$(".BRzoom").text(t)}},{key:"buildShareDiv",value:function(e){var t=this,n=this.br,i=document.location+"",r=(i+"").replace(/#.*/,""),o=n.getEmbedCode?'\n '):"",a=d('\n \n