\/noscript *>/g,"");var t=document.createElement("div");t.innerHTML=e.trim();var i=t.firstChild;this.containerElem.appendChild(i),this.innerPageElem=i,this.turnOnLinks(),this.fixSVGFonts(),this.displayDirty=!0,this.displayOn?this.display():this.hide()},f.prototype.fixSVGFonts=function(){if(!this._svgFontsFixed&&this.innerPageElem){if(l){!function e(t){if(t.nodeType==document.TEXT_NODE){var i=t.textContent.search(/[ \n][^ \n ]/);i>=0&&e(t.splitText(i+1))}else for(var n=t.childNodes,o=0;o')},f.prototype.load=function(){var e=this;if(this.currentlyLoading=!0,this.loadHasStarted=!0,this.innerPageElem)throw"We already have loaded this page, but it looks like you called loadPage again";this.loadFonts();var t="page".concat(this.pageNum,"_callback");if(window[t])try{delete window[t]}catch(e){window[t]=void 0}if("rasterize"===this.docManager.displayType)return delete this.currentlyLoading,void this._setContainerContents(this.imagePageContent(this.contentUrl));var i=document.createElement("script");window[t]=function(n){document.body.removeChild(i);var o=n[0];delete e.currentlyLoading,e._setContainerContents(o);var s=document.getElementById(e.containerElem.id);if(s&&s.classList.contains("blurred_page")&&e.docManager.doDynamicBlurring(e.containerElem.id),e.docManager.fireEvent("pageLoaded",e.containerElem),s&&e.docManager.lazyImageObserver){for(var r=s.querySelectorAll(".absimg"),a=0;ae/t?t=Math.ceil(e/this.origWidth*this.origHeight):e=Math.ceil(t/this.origHeight*this.origWidth),this.containerElem.style.width=e+"px",this.containerElem.style.height=t+"px",this._targetWidth=e,this._fitContentsToWidth()},f.prototype.turnOnImages=function(){if(!this.innerPageElem)throw"Can't turn on images for a page that's not loaded";if(this._imagesTurnedOn)throw"Images have already been turned on for this document";this._imagesTurnedOn=!0;for(var e=this.innerPageElem.getElementsByTagName("img"),t=0;t-1&&!s.href){var r=s.getAttribute("orig");if(r){var a=n.decode(r).replace(/^j[\W]*a[\W]*v[\W]*a[\W]*s[\W]*c[\W]*r[\W]*i[\W]*p[\W]*t[\W]*:|^f[\W]*i[\W]*l[\W]*e[\W]*:/gi,"");a.search(/^page/)>-1?s.onclick=t(a):(a.search(/^(http|ftp)/)<0&&(a="http://"+a),s.target="_blank",h(s,a),s.rel="nofollow")}}}};function y(){}function _(){this._name="book",this.currentPageId=null;var e=this;this._fullscreenResizedCallback=function(t){e._fullscreenResized(t)}}function v(){this._name="slideshow",this.currentPageId=null;var e=this;this._fullscreenResizedCallback=function(t){e._fullscreenResized(t)}}function w(){this._name="scroll";var e=this;this._verticalPositionChangeCallback=function(){e.checkAndUpdateVisiblePages()},this._fullscreenResizedCallback=function(){e._fullscreenResized()},this.shouldRestorePosition=!0}function P(e,t,i){this.options=i||{},this.options.extrasWidth=this.options.extrasWidth||315,this.defaultViewMode=e||"scroll",this.mobile=t||!1,this.callbacks_ready=!1,this.callbacks=[],this.initEventHelper(),this.pages={},this._pageWidths=null,this._fontLoader=new c(this,this.options.hasWoffsCss),this.viewManagers={scroll:new w,slideshow:new v,book:new _},this.viewportManager=new m,this._currentFontAggregatorHostIdx=0,this.visiblePages=[],this.firstVisiblePage=null,this.lastVisiblePage=null,this.firstHiddenPageNum=null,this.truncateDocument=window.__truncate_document||!1,this.currentFontGroup=new g(0,this._fontLoader),this.isScrolling=!1,this._scrollingCount=0,"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&"isIntersecting"in window.IntersectionObserverEntry.prototype&&this.setupLazyImageObserver()}function b(e,t,i){return Math.min(i,Math.max(t,e))}return s(m,["vertical","horizontal","either","resize"]),m.prototype._makeViewRect=function(){var e=this.container,t=document.documentElement,i=e.scrollTop||e.scrollY||e.pageYOffset||t.scrollTop,n=e.scrollLeft||e.scrollX||e.pageXOffset||t.scrollLeft,o=e.clientWidth||e.innerWidth||t.clientWidth,s=e.clientHeight||e.innerHeight||t.clientHeight,r={top:i,left:n,right:n+o,bottom:i+s,width:o,height:s};if(this.container!==window){var a=this.container.getBoundingClientRect&&this.container.getBoundingClientRect();a&&(r.offsetX=a.left,r.offsetY=a.top)}return r},m.prototype._updateViewRect=function(){var e=this.viewRect;return this.viewRect=this._makeViewRect(),{xChanged:!e||e.left!=this.viewRect.left||e.width!=this.viewRect.width,yChanged:!e||e.top!=this.viewRect.top||e.height!=this.viewRect.height}},m.prototype._eventHandler=function(e){var t=this._updateViewRect();["resize","both"].includes(e)&&(t.xChanged||t.yChanged)&&this.fireEvent("resize",this.viewRect),(t.xChanged||t.yChanged)&&this.fireEvent("either",this.viewRect),t.xChanged&&this.fireEvent("horizontal",this.viewRect),t.yChanged&&this.fireEvent("vertical",this.viewRect)},m.prototype.enable=function(){if(this.enabled)throw"ViewportManager has already been enabled";this.enabled=!0,this.container=P.scrollParent||window,this._eventHandler("both"),this.container.addEventListener("resize",this._resizeCallback,!1),(P.scrollParent?this.container:window.document).addEventListener("scroll",this._scrollCallback,!1)},m.prototype.disable=function(){if(!this.enabled)throw"ViewportManager has already been disabled";this.enabled=!1,window.removeEventListener("resize",this._resizeCallback,!1),this.container.removeEventListener("scroll",this._scrollCallback,!1)},y.prototype.name=function(){return this._name},y.prototype.register=function(e,t){if(this.registered)throw"This ViewManager is already registered";this.registered=!0,this.documentManager=e,this.viewportManager=t,this._currentPageWidth=defaultViewWidth,this._currentZoomMultiplier=1,this._updatePageWidths();var i=this.documentManager.firstVisiblePage;this._register(e,t),i&&this.documentManager.gotoPage(i.pageNum,{}),e.executeCallbacks()},y.prototype._zoomedPageWidth=function(){return this._currentPageWidth*this._currentZoomMultiplier},y.prototype._updatePageWidths=function(){this.documentManager.setPageWidths(this._zoomedPageWidth())},y.prototype.isTopPageInView=function(){return!0},y.prototype._register=function(e,t){},y.prototype.unregister=function(){if(!this.registered)throw"This ViewManager is already unregistered";this.isFullscreen&&this.exitFullscreen(),this._setBodyWidth(),this._unregister(),this.registered=!1,delete this.documentManager,delete this.viewportManager},y.prototype._unregister=function(){},y.prototype._pagingStep=function(){return 1},y.prototype.gotoPage=function(e,t){if(!this.registered)throw"ViewManager must be registerd to call gotoPage";this._gotoPage(e,t)},y.prototype._gotoPage=function(e,t){},y.prototype._fireHideExtras=function(){this.documentManager._fireHideExtras(),this._extrasHidden=!0},y.prototype._fireShowExtras=function(){this.documentManager._fireShowExtras(),this._extrasHidden=!1},y.prototype.enterFullscreen=function(){if(this.isFullscreen)throw"Fullscreen is already set";this._setBodyWidth(),this.viewportManager.addEvent("resize",this._fullscreenResizedCallback),this._fireHideExtras(),this.resetZoom(),this._enterFullscreen(),this._fullscreenResized(this.viewportManager.viewRect),this._currentPageWidth=this.viewportManager.viewRect.width,this.isFullscreen=!0;var e=this.documentManager.firstVisiblePage;e&&this.documentManager.gotoPage(e.pageNum,{}),this.documentManager._fireEnteredFullscreen()},y.prototype.exitFullscreen=function(){if(!this.isFullscreen)throw"Fullscreen is not set";this.viewportManager.removeEvent("resize",this._fullscreenResizedCallback),this._fireShowExtras(),this.resetZoom(),this._exitFullscreen(),this.isFullscreen=!1;var e=this.documentManager.firstVisiblePage;e&&this.documentManager.gotoPage(e.pageNum,{}),this.documentManager._fireExitedFullscreen()},y.prototype._viewBarWidth=function(){return this._extrasHidden?0:this.documentManager.options.extrasWidth},y.prototype._enterFullscreen=function(){},y.prototype._exitFullscreen=function(){},y.prototype._fullscreenResized=function(e){},y.prototype._scrollWithZoom=function(e,t){window.scrollTo(0,e.top*t)},y.prototype.zoom=function(e){var t=this.viewportManager.viewRect;t&&(this._currentZoomMultiplier*=e,this._setBodyWidth(),this._updatePageWidths(),this.documentManager.setIsScrolling(!0),this._scrollWithZoom(t,e),this._zoomed(),this.documentManager.setIsScrolling(!1),this.documentManager._fireZoomed(e))},y.prototype._zoomed=function(){},y.prototype.resetZoom=function(){this._currentZoomMultiplier=1,this._setBodyWidth(),this._updatePageWidths(),this._zoomed()},y.prototype._setBodyWidth=function(e){if(!P.scrollParent&&0!=P.updateBodyWidth){var t=document.documentElement.clientWidth,i=this._zoomedPageWidth()+this._viewBarWidth()+10;globalHeader=document.getElementById("global_header"),i>t?(document.body.style.width="".concat(i,"px"),globalHeader&&(globalHeader.style.width="".concat(t,"px"))):(document.body.style.width="100%",globalHeader&&(globalHeader.style.width="100%"))}},_.prototype=new y,_.prototype._register=function(e,t){this._prepareDisplay()},_.prototype._unregister=function(){for(var e in this.documentManager.pages)if(this.documentManager.pages.hasOwnProperty(e)){var t=this.documentManager.pages[e];t.containerElem.classList.remove("book_view"),t.containerElem.style.display=""}},_.prototype._prepareDisplay=function(){for(var e in this.documentManager.pages)if(this.documentManager.pages.hasOwnProperty(e)){var t=this.documentManager.pages[e];t.containerElem.classList.add("book_view"),t.containerElem.style.display="none",t.hide()}this.documentManager.setPageMissingModulesVisible(!1),this.documentManager.gotoPage(this.documentManager.currentPageNum()||1)},_.prototype._zoomed=function(){this.documentManager.pages[this.currentPageId]},_.prototype._updatePageWidths=function(){this.documentManager.setPageWidths(this._zoomedPageWidth()/2)},_.prototype._pagingStep=function(){return 2},_.prototype._showPage=function(e){var t=this.documentManager.pages[e];t&&(t.isVisible=!0,t.display(!0),t.containerElem.style.display="")},_.prototype._hidePage=function(e){var t=this.documentManager.pages[e];t&&(t.isVisible=!1,t.containerElem.style.display="none",t.hide())},_.prototype._gotoPage=function(e,t){(e=parseInt(e,10))%2==1&&(e-=1);var i,n;"number"==typeof this.currentPageId&&(this._hidePage(this.currentPageId),this._hidePage(this.currentPageId+1)),i=this.documentManager.pages[e],n=this.documentManager.pages[e+1],(i||n)&&(this.currentPageId=e,this.isFullscreen&&this._setPageBounds(this.viewportManager.viewRect),this._showPage(e),this._showPage(e+1),this.documentManager.visiblePagesChanged())},_.prototype._setWidth=function(e){this._currentPageWidth=e,this.documentManager.setPageWidths(e)},_.prototype._fullscreenResized=function(e){this._setWidth(e.width-30)},_.prototype._enterFullscreen=function(){this._previousPageWidth=this._currentPageWidth||defaultViewWidth},_.prototype._exitFullscreen=function(){this._setWidth(defaultViewWidth),this._setBodyWidth()},v.prototype=new y,v.prototype._register=function(e,t){this._prepareDisplay();var i=document.getElementById("scroll_preventer");i&&(i.style.overflow="hidden",i.style.height="100%")},v.prototype._unregister=function(){var e=document.getElementById("scroll_preventer");e&&(e.style.overflow="visible",e.style.height="auto")},v.prototype._prepareDisplay=function(){for(var e in this.documentManager.pages)if(this.documentManager.pages.hasOwnProperty(e)){var t=this.documentManager.pages[e];t.containerElem.style.display="none",t.hide()}this.documentManager.setPageMissingModulesVisible(!1),this.documentManager.gotoPage(this.documentManager.currentPageNum()||1)},v.prototype._setPageBounds=function(e){var t=this.documentManager.pages[this.currentPageId];t&&t.setBounds(e.width,e.height)},v.prototype._gotoPage=function(e,t){var i;this.documentManager.pages.hasOwnProperty(e)&&(this.currentPageId&&(i=this.documentManager.pages[this.currentPageId])&&(i.isVisible=!1,i.containerElem.style.display="none",i.hide()),this.currentPageId=e,i=this.documentManager.pages[e],this.isFullscreen&&this._setPageBounds(this.viewportManager.viewRect),i.isVisible=!0,i.display(!0),i.containerElem.style.display="",i._updateBoundingRect(),this.documentManager.visiblePagesChanged())},v.prototype._setWidth=function(e){this._currentPageWidth=e,this.documentManager.setPageWidths(e)},v.prototype._fullscreenResized=function(e){this._setPageBounds(e)},v.prototype._enterFullscreen=function(){this._previousPageWidth=this._currentPageWidth||defaultViewWidth},v.prototype._exitFullscreen=function(){this._setWidth(defaultViewWidth),this._setBodyWidth()},w.prototype=new y,w.prototype._updateInViewport=function(e){var t=this.viewportManager.viewRect,i=e.boundingRect,n=e.isVisible;return e.isVisible=!(!t||!i)&&(i.leftt.left&&i.topt.top),this.adjacentVisiblePages=1,n!=e.isVisible},w.prototype.checkAndUpdateVisiblePages=function(){var e=!1;for(var t in this.pages)if(this.pages.hasOwnProperty(t)){var i=this.pages[t],n=this._updateInViewport(i);e=e||n}e?this.documentManager.visiblePagesChanged():this.documentManager.scheduleLogPageView(),this._updateDisplayOnPages()},w.prototype._updateDisplayOnPages=function(){if(this.documentManager.firstVisiblePage&&this.documentManager.lastVisiblePage){var e=this.documentManager.firstVisiblePage.pageNum-this.adjacentVisiblePages,t=this.documentManager.lastVisiblePage.pageNum+this.adjacentVisiblePages;for(var i in this.pages)if(this.pages.hasOwnProperty(i)){var n=this.pages[i];n&&(n.pageNum>=e&&n.pageNum<=t?n.display():(n.hide(),this.documentManager.fireEvent("pageHide",n)))}}},w.prototype._zoomed=function(){this.checkAndUpdateVisiblePages()},w.prototype._register=function(e,t){for(var i in this.pages=e.pages,this.viewportManager.addEvent("vertical",this._verticalPositionChangeCallback),this.pages){if(this.pages.hasOwnProperty(i))this.documentManager.pages[i].containerElem.style.display=""}this.documentManager.setPageMissingModulesVisible(!0),this.documentManager._updatePageBoundingRects(),this.checkAndUpdateVisiblePages()},w.prototype.isTopPageInView=function(){var e=this.documentManager.firstVisiblePage;return!e||(this.documentManager._expectedFirstPageNum>e.pageNum||e.boundingRect.top+5>=this.viewportManager.viewRect.top)},w.prototype._unregister=function(){this.viewportManager.removeEvent("vertical",this._verticalPositionChangeCallback),delete this.pages},w.prototype._gotoPage=function(e,t){if(t=t||{},this.pages.hasOwnProperty(e)){var i=this.documentManager.pages[e];this.documentManager.setIsScrolling(!0);var n=this.documentManager.viewportManager.container;return i._updateBoundingRect(),n==window?scrollTo(i.boundingRect.left,i.boundingRect.top-(t.offset||0)):n.scrollTop=i.boundingRect.top-(t.offset||0),this.documentManager.setIsScrolling(!1),this.documentManager.isScrolling||this.documentManager.visiblePagesChanged(),i.pageNum}},w.prototype._gotoNextPage=function(){this.documentManager.firstVisiblePage&&this.documentManager.gotoPage(this.documentManager.firstVisiblePage.pageNum+1,{direction:1})},w.prototype._gotoPreviousPage=function(){this.documentManager.firstVisiblePage&&this.documentManager.gotoPage(this.documentManager.firstVisiblePage.pageNum-1,{direction:-1})},w.prototype._setWidth=function(e){var t=this.pagePosition();this._currentPageWidth=e,this._updatePageWidths(),this._setBodyWidth(),this.restorePosition(t)},w.prototype._fullscreenResized=function(){this._setWidth((window.innerWidth||document.documentElement.clientWidth)-30)},w.prototype._enterFullscreen=function(){this._previousPageWidth=this._currentWidth||defaultViewWidth},w.prototype._exitFullscreen=function(){this._setWidth(this._previousPageWidth)},w.prototype.pagePosition=function(){var e=this.viewportManager.container,t=this.documentManager.pages[this.documentManager.currentPageNum()||1],i=e.scrollTop,n=e.scrollLeft,o=(i-t.boundingRect.top)/t.boundingRect.height,s=(n-t.boundingRect.left)/t.boundingRect.width;return[t.pageNum,o,s]},w.prototype.restorePosition=function(e){if(!this._disableRestorePosition){var t=this.pages[e[0]].containerElem;if(this._gotoPage(e[0],{offset:-Math.floor(e[1]*t.clientHeight)}),null!==e[2]){var i=this.viewportManager.container,n=e[2];n=Math.floor(n*t.clientWidth);var o=t.clientWidth-i.clientWidth;i.scrollLeft=Math.min(o,n)}}},w.prototype.zoom=function(e){if(this.viewportManager.viewRect){var t=this.pagePosition();this._currentZoomMultiplier*=e,this._setBodyWidth(),this._updatePageWidths(),this.shouldRestorePosition&&this.restorePosition(t),this._zoomed(),this.documentManager._fireZoomed(e)}},s(P,["expectedFirstPageChanged","viewmodeChanged","enteredFullscreen","exitedFullscreen","hideExtras","showExtras","zoomed","pageHide","pageLoaded","allPagesAdded","pageView","visiblePagesChanged","viewmodeInitialized"]),P.prototype.setupLazyImageObserver=function(){var e=this;this.lazyImageObserver=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&e.lazyLoad(t.target)}))}))},P.prototype.lazyLoad=function(e){e.className.toLowerCase().search("absimg")>-1&&!e.src&&(e.src=this.subImageSrc(e.getAttribute("orig")),e.removeAttribute("orig"),e.style.display="block",this.lazyImageObserver&&this.lazyImageObserver.unobserve(e))},P.prototype.observeImages=function(e){if(this.lazyImageObserver&&this.lazyImageObserver.observe)for(var t=e.getElementsByTagName("img"),i=0;i-1&&this.lazyImageObserver.observe(t[i])},P.prototype.registerCallback=function(e){this.callbacks_ready?e.call(this):this.callbacks.push(e)},P.prototype.executeCallbacks=function(){var e=this;this.callbacks_ready=!0,this.callbacks.forEach((function(t){t.call(e)}))},P.prototype.disableRestorePosition=function(){this.viewManagers.scroll._disableRestorePosition=!0},P.prototype._fireZoomed=function(e){this.fireEvent("zoomed",e)},P.prototype.nextFontAggregatorHost=function(){return this._currentFontAggregatorHostIdx=(this._currentFontAggregatorHostIdx+1)%this.fontAggregatorHosts.length,this.fontAggregatorHosts[this._currentFontAggregatorHostIdx]},P.prototype._fireHideExtras=function(){this.fireEvent("hideExtras")},P.prototype._fireShowExtras=function(){this.fireEvent("showExtras")},P.prototype.currentPageNum=function(){return this._expectedFirstPageNum},P.prototype.setupTestElements=function(){this._fontLoader.setupTestElements()},P.prototype.pageCount=function(){if(this.hasOwnProperty("_pageCount"))return this._pageCount;var e=0;for(var t in this.pages)this.pages.hasOwnProperty(t)&&e++;return this._pageCount=e,this._pageCount},P.prototype.truncatedPagesString=function(){return"".concat(this.firstHiddenPageNum,"-").concat(this.originalPageCount)},P.prototype.setupPaidDocument=function(e,t){this.allowedPages=e,this.originalPageCount=t,this._allowedPagesHash=[],this._maximumAllowedPage=Math.max.apply(null,this.allowedPages),this._minimumAllowedPage=Math.min.apply(null,this.allowedPages),this._isPaidDocument=!0,this._pageMissingElements=[];for(var i=0;i0&&e[i]>e[i-1]+1||0===i&&1!=e[i])&&this._pageMissingElements.push("page_missing_explanation_"+e[i].toString());this._maximumAllowedPage!=this.originalPageCount&&this._pageMissingElements.push("page_missing_explanation_"+(this.originalPageCount+1).toString())},P.prototype.minimumPageNumber=function(){return"book"===this.viewMode()?0:1},P.prototype.maximumPageNumber=function(){return this.allowedPages?this.originalPageCount:this.pageCount()},P.prototype.getClosestPageNumber=function(e,t){if(!this.allowedPages)return e;if(this._allowedPagesHash[e])return e;if(e>=this._maximumAllowedPage)return this._maximumAllowedPage;if(e<=this._minimumAllowedPage)return this._minimumAllowedPage;for(var i=1;i<=this.originalPageCount;i++){if(t<=0&&!0===this._allowedPagesHash[e-i])return e-i;if(t>=0&&e+i0?e[0]:null,this.lastVisiblePage=e.length>0?e[e.length-1]:null,this.isScrolling||(this._loadAdjacentFonts(),this._loadAdjacentPages()),(this.firstVisiblePage===n||this.firstVisiblePage&&n)&&this.firstVisiblePage.pageNum==n.pageNum||!this.isScrolling&&this.firstVisiblePage&&this._updateExpectedFirstPage(this.firstVisiblePage.pageNum),this.scheduleLogPageView()}},P.prototype.boundingRatioForPage=function(e){var t=this.viewportManager.viewRect,i=e.boundingRect,n=i.bottom-i.top,o=i.right-i.left;return{left:(t.left-i.left)/o,right:(t.right-i.right)/o+1,top:b((t.top-i.top)/n+e.pageNum,e.pageNum,e.pageNum+1),bottom:b((t.bottom-i.bottom)/n+e.pageNum+1,e.pageNum,e.pageNum+1)}},P.prototype.scheduleLogPageView=function(){var e=this;this.logPageViewTimout&&window.clearTimeout(this.logPageViewTimout),this.logPageViewTimout=window.setTimeout((function(){e.logPageView(),e.logPageViewTimout=null}),1e3)},P.prototype.getVisibleBBox=function(){var e={};if(this.firstVisiblePage){var t=this.boundingRatioForPage(this.firstVisiblePage);e.left=t.left,e.right=t.right,e.top=t.top}if(this.lastVisiblePage){var i=this.boundingRatioForPage(this.lastVisiblePage);e.bottom=i.bottom}return e},P.prototype.logPageView=function(){var e,t=this.getVisibleBBox();for(var i in t)t.hasOwnProperty(i)&&(t[i]=(e=t[i],Math.floor(100*e)/100));var n=window.$rat;n&&n("fourgen.viewchange","2"==window.RAT_API_VERSION?[[t.left,t.top],[t.right,t.bottom]]:"(".concat(t.left," ").concat(t.top,") (").concat(t.right," ").concat(t.bottom,")"));return this.fireEvent("pageView"),t},P.prototype._updateExpectedFirstPage=function(e){this._expectedFirstPageNum=e,this.fireEvent("expectedFirstPageChanged",this._expectedFirstPageNum)},P.prototype._loadAdjacentFonts=function(){if(this.firstVisiblePage&&this.lastVisiblePage)for(var e=this.firstVisiblePage.pageNum-i,t=this.lastVisiblePage.pageNum+i,n=e;n<=t;n++){var o=this.pages[n];o&&o.loadFonts()}},P.prototype._loadAdjacentPages=function(){if(this.firstVisiblePage&&this.lastVisiblePage){for(var e=this.firstVisiblePage.pageNum-t,i=this.lastVisiblePage.pageNum+t,n=e;n<=i;n++){var o=this.pages[n];o&&!o.loadHasStarted&&(o.load(),this.mobile&&o.setWidth(this._pageWidths))}this.mobile&&this._removeUnusedPages()}},P.prototype._removeUnusedPages=function(){for(var e=this.firstVisiblePage.pageNum-t,i=this.lastVisiblePage.pageNum+t,n=this.pages,o=t+1;n[o];)(oi)&&n[o].remove(),o++},P.prototype._updatePageBoundingRects=function(){for(var e in this.pages)this.pages.hasOwnProperty(e)&&this.pages[e]._updateBoundingRect()},P.prototype.removeInsteadOfBlurring=function(e){return!!(this.truncateDocument&&this.firstHiddenPageNum&&e.pageNum>=this.firstHiddenPageNum)||(!!P.disablePageBlur||"undefined"==typeof Scribd)},P.prototype.addPage=function(e){if(!this.firstHiddenPageNum&&e.blur&&(this.firstHiddenPageNum=e.pageNum),!this.removeInsteadOfBlurring(e)){if(void 0===e.pageNum)throw"must have pageNum param";if(e.docManager=this,e.innerPageElem)for(var t=e.innerPageElem.querySelectorAll(".absimg"),i=0;ithis.maximumPageNumber())){t||(t={}),i&&null==t.frac&&(t.frac=n);var o=t.direction||0,s=this.pages[e];void 0===s&&this._isPaidDocument&&(e=this.getClosestPageNumber(e,o),s=this.pages[e]),this.mobile&&this.pages[e]&&this.pages[e].setWidth(this._pageWidths),this._updateExpectedFirstPage(e),this._currentViewManager.gotoPage(this._expectedFirstPageNum,t)}},P.prototype.gotoPreviousPage=function(){var e=this._currentViewManager._pagingStep();this._currentViewManager.isTopPageInView()?this.gotoPage(this._expectedFirstPageNum-e,{direction:-1}):this.gotoPage(this._expectedFirstPageNum,{direction:-1})},P.prototype.gotoNextPage=function(){var e=this._currentViewManager._pagingStep();this.gotoPage(this._expectedFirstPageNum+e,{direction:1})},P.prototype.enterFullscreen=function(){this._currentViewManager.enterFullscreen()},P.prototype.exitFullscreen=function(){this._currentViewManager.exitFullscreen()},P.prototype.isFullscreen=function(){return this._currentViewManager.isFullscreen},P.prototype._fireEnteredFullscreen=function(){this.fireEvent("enteredFullscreen")},P.prototype._fireExitedFullscreen=function(){this.fireEvent("exitedFullscreen")},P.prototype.viewMode=function(){return this._currentViewManager?this._currentViewManager.name():null},P.prototype.zoom=function(e){this._currentViewManager.zoom(e)},P.prototype.resetZoom=function(){this._currentViewManager.resetZoom()},P.prototype.setImageDomainSubstitution=function(e,t){this._imageDomainSubstitutionFrom=e,this._imageDomainSubstitutionList=t},P.prototype.disableViewManagerResizeWidth=function(){y.prototype._setBodyWidth=function(){}},P.prototype.disable=function(){this.disabled||(this.disabled=!0,this.viewportManager.disable())},P.prototype.disableCopyPasteOnPage=function(e){["dragstart, selectstart, contextmenu"].forEach((function(t){e.addEventListener(t,(function(e){e.preventDefault()}))})),e.setAttribute("unselectable","on"),e.querySelectorAll("*").forEach((function(e){e.setAttribute("unselectable","on")}))},P.prototype.doDynamicBlurring=function(e){var t;if(!this.removeInsteadOfBlurring()){t=document.getElementById(e),this.disableCopyPasteOnPage(t);var i=function(){var e=document.createElement("div");t.appendChild(e);var i=0===t.querySelectorAll(".text_layer, .image_layer").length;window.render_blur_promo(e,i)};window.__app_loaded?i():window.__pages_to_blur.push(i),t.querySelectorAll(".text_layer").forEach((function(e){e.style["text-shadow"]="0px 0px 70px black",e.style.color="transparent"})),t.querySelectorAll(".text_layer [style]").forEach((function(e){e.style.color="transparent"})),t.querySelectorAll(".image_layer img").forEach((function(e){e.style.opacity=.04}))}},P.setJQuery=function(e){console.info("DocumentManager.setJQuery is deprecated. jQuery is no longer a dependency.")},P.ScrollViewManager=w,P.SlideViewManager=v,P.BookViewManager=_,P}();window.DocumentManager=n}(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var i=0;iScribd