!function(){function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){return e(b[g][1][a]||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0||navigator.msMaxTouchPoints>0)&&"win"===this.platform.name&&(this.platform.name="wphone"),this.platform[this.platform.name]=!0,this.platform.version=0,this.platform.mac){var i=this.ua.match(/os\sx\s(\d+[\._]*\d*[\._]*\d*)/);this.platform.version="[object Array]"===Object.prototype.toString.call(i)&&i.length>1?i[1].split(/[\._]/):0}else if(this.platform.ios){var i=this.ua.match(/os\s(\d+_*\d*_*\d*)/);this.platform.version="[object Array]"===Object.prototype.toString.call(i)&&i.length>1?i[1].split("_"):0}else if(this.platform.android){var i=this.ua.match(/android\s(\d+\.*\d*\.*\d*)/);this.platform.version="[object Array]"===Object.prototype.toString.call(i)&&i.length>1?i[1].split("."):0}switch(this.platform.verCheck=function(a){return 1*this.platform.version==1*a?0:1*a>1*this.platform.version?-1:1},this.device.name=this.ua.match(/ipad/)?"ipad":this.ua.match(/ipad/)?"ipad":this.ua.match(/iphone/)?"iphone":this.ua.match(/android/)?"android":d.match(/mac|win|linux/)?"pc":"other","wphone"===this.platform.name&&(this.device.name="wphone"),this.device[this.device.name]=!0,this.device.version=this.platform.version[0],this.device.type=this.ua.match(/(mobile\ssafari)|iphone|ipod/)?"mobile":"tablet",this.queryString=function(){var b={},c=a.location.search.substring(1);if(""===c)return b;for(var d=c.split("&"),e=0;e4||4===parseInt(this.platform.version[0],10)&&parseInt(this.platform.version[1],10)>=1),l=j&&this.browser.safari&&-1===b(),m=k&&this.browser.chrome&&-1===b();if(this.isBasic||this.isMobile||this.isFlash||((j||k)&&"undefined"==typeof COMPATIBLE?this.isMobile=!0:l||m?this.isMobile=!0:this.flash&&this.device.pc&&(c[0]>10||10===c[0]&&c[1]>=3)?this.isFlash=!0:this.isBasic=!0),this._loadVersion(),this.device.android&&!this.browser.chrome){for(var n=document.getElementsByTagName("meta"),o=0;ob._getWindowHeight.call(b)||b.currentWindowWidth>b.currentWindowHeight&&b._getWindowWidth.call(b)d||(c.currentZoom=c.currentZoom+.2,c._setSizes.call(c),c._fontCorrection.call(c))}),this._addEvent(document.getElementById("zoomOut"),"click",function(){1!==c.currentZoom&&(c.currentZoom=c.currentZoom-.2,c._setSizes.call(c),c._fontCorrection.call(c),b("zoom",c.currentZoom,e))})}},b.prototype._getFitScreenSizes=function(a,b,c){c=c||this._getWindowWidth()*(2*this.offset.top),c=Math.round(c);var d=this._getWindowWidth(),e=this._getWindowHeight(),f=d/e,g=0==b?0:a/b,h=Math.round(f>g?0==b?0:a*(e-c)/b:d-c),i=Math.round(f>g?e-c:0==a?0:b*(d-c)/a);return{width:Math.round(h),height:Math.round(i)}},b.prototype._getFitWidthSizes=function(a,b,c){c=c||this._getBoundingClientRect(document.body).width*(2*this.offset.top),c=Math.round(c);var d=this._getBoundingClientRect(document.body).width,e=Math.round(d-c),f=Math.round(b*(d-c)/a);return{width:Math.round(e),height:Math.round(f)}},b.prototype._setSizes=function(){var b=0,c=0;"undefined"!=typeof a.TOC_BOOK_HEIGHT?(this.newRect=a.detector.device.pc?this._getFitScreenSizes(this.pageRect.width,a.TOC_BOOK_HEIGHT):this._getFitWidthSizes(this.pageRect.width,a.TOC_BOOK_HEIGHT),this.pageContainer.style.width=this.newRect.width*this.currentZoom+"px",b=this._getWindowHeight()>this.pageRect.height*this.currentZoom?(this._getWindowHeight()-this.pageRect.height*this.currentZoom)/2:this._getWindowHeight()*this.offset.top,c=this._getWindowWidth()-100>this.newRect.width*this.currentZoom?(this._getWindowWidth()-this.newRect.width*this.currentZoom)/2+"px":this._getWindowWidth()*this.offset.left+"px"):(this.newRect=a.detector.device.pc?this._getFitScreenSizes(this.pageRect.width,this.pageRect.height):this._getFitWidthSizes(this.pageRect.width,this.pageRect.height),this.pageContainer.style.width=this.newRect.width*this.currentZoom+"px",this.pageContainer.style.height=this.newRect.height*this.currentZoom+"px",b=this._getWindowHeight()>this.newRect.height*this.currentZoom?(this._getWindowHeight()-this.newRect.height*this.currentZoom)/2:this._getWindowHeight()*this.offset.top,c=this._getWindowWidth()-100>this.newRect.width*this.currentZoom?(this._getWindowWidth()-this.newRect.width*this.currentZoom)/2+"px":this._getWindowWidth()*this.offset.left+"px"),this.pageContainer.style.left="0",b=b-45>10?b-45:10,"pc"!==a.detector.device.type&&(b=20),this.pageContainer.style.margin=b+"px 0 0 "+c;var d=0==this.pageRect.width?0:this.newRect.width*this.currentZoom*20/this.pageRect.width;this.lastFontSize=d.toFixed(6),document.body.style.fontSize=this.lastFontSize+"px"},b.prototype._fontCorrection=function(){for(var a=this._getElementsByClass("testString"),b=0,c=0,d=a.length;c0?(g.width-h.width)/h.width:0;k*=j,b=b>=k?b:k}document.body.style.fontSize=this.lastFontSize*(1-b)+"px"},b.prototype._parseVideos=function(){for(var b=this._getElementsByClass("videoItem"),c=this,d=0,e=b.length;d50?.35*b.height:.8*b.height;c.style.width=d+"px",c.style.height=d+"px",c.style.margin=-d/2+"px 0 0 "+-d/2+"px"}},b.prototype._showVideo=function(b,c){this.videoFrame=document.createElement("iframe");var d=document.createElement("div"),e=this;this._getFitScreenSizes(1600,900,this._getWindowHeight()/10);d.className="blackoutVideo",document.body.appendChild(d),this._addEvent(d,"click",function(a){a.stopPropagation?a.stopPropagation():a.returnValue=!1,e._hideVideo.call(e)}),"youtube"===c?(this.videoFrame.className=this.videoFrame.className+" youtube-player",this.videoFrame.src="//www.youtube.com/embed/"+b+"?autoplay=1&html5=1"):this.videoFrame.src="//player.vimeo.com/video/"+b+"?title=0&byline=0&portrait=0&color=da4541",a.detector.publisher.isOn&&(this.videoFrame.src+="&publisher=1"),document.body.appendChild(this.videoFrame),this._resizeVideo(),this._addEvent(a.document,"keyup",function(a){a.stopPropagation?a.stopPropagation():a.returnValue=!1,27===(a.keyCode?a.keyCode:a.which)&&e._hideVideo.call(e)}),this._addEvent(a,"resize",function(a){e._resizeVideo()})},b.prototype._resizeVideo=function(){if(this.videoFrame){var a=this._getFitScreenSizes(1600,900,this._getWindowHeight()/10);this.videoFrame.className="videoFrame",this.videoFrame.setAttribute("type","text/html"),this.videoFrame.setAttribute("width",a.width+"px"),this.videoFrame.setAttribute("height",a.height+"px"),this.videoFrame.setAttribute("frameBorder","0"),this.videoFrame.style.top="50%",this.videoFrame.style.left="50%",this.videoFrame.style.margin=-a.height/2+"px 0 0 "+-a.width/2+"px"}},b.prototype._hideVideo=function(){var a=this._getElementsByClass("blackoutVideo");this.videoFrame&&this.videoFrame.parentNode.removeChild(this.videoFrame);for(var b=0,c=a.length;bd-12||this.imageContainerHeight>e-12){var f=this._getFitScreenSizes(this.imageContainerWidth,this.imageContainerHeight,c);this.imageContainer.setAttribute("width",f.width+"px"),this.imageContainer.setAttribute("height",f.height+"px"),this.imageContainer.style.margin=-(f.height/2+6)+"px 0 0 "+(-f.width/2-6)+"px",this.imageContainerCloseButton.style.margin=-(f.height/2+6+15)+"px 0 0 "+(f.width/2+6-15)+"px"}else this.imageContainer.setAttribute("width",a+"px"),this.imageContainer.setAttribute("height",b+"px"),this.imageContainer.style.margin=-(b/2+6)+"px 0 0 "+(-a/2-6)+"px",this.imageContainerCloseButton.style.margin=-(b/2+6+15)+"px 0 0 "+(a/2+6-15)+"px";this.imageContainer.style.borderWidth="6px",this.imageContainer.style.top="50%",this.imageContainer.style.left="50%"}},b.prototype._hideGallery=function(){var a=this._getElementsByClass("blackoutGallery"),b=this._getElementsByClass("galleryPreloader");this.imageContainer&&this.imageContainer.parentNode.removeChild(this.imageContainer),this.imageContainerCloseButton&&this.imageContainerCloseButton.parentNode.removeChild(this.imageContainerCloseButton);for(var c=0,d=a.length;cb[0]||c[0]===b[0]&&c[1]>=b[1])&&a.push("flash"),this.userAgentInfo.browser.ie){(this.userAgentInfo.browser.version||"7.0").split(".")[0]>10&&a.push("html")}else a.push("html")}else{var d=this.userAgentInfo.os.ios,e=this.userAgentInfo.os.android&&(parseInt(this.userAgentInfo.os.version.split(".")[0],10)>4||4===parseInt(this.userAgentInfo.os.version.split(".")[0],10)&&parseInt(this.userAgentInfo.os.version.split(".")[1],10)>=1);(d||e)&&a.push("mobile")}return a},c.prototype.mainVersion=function(){var a=this.getSupportedVersions();if(this.priorities){for(var b=0;b0)return a[0];return null},c.prototype.isRenderable=function(){return null!==this.mainVersion()},b.PublicationDetector=c},this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(a,b,c){(function(a){!function(b,d){"use strict";void 0!==c?b(a,c):b(d,d)}(function(a,b){"use strict";function c(a){this._navigator=a,this.browser=this._getBrowser(),this.flash=this._getFlash(),this.os=this._getOS(),this.device=this._getDevice()}c.prototype.constructor=c,c.prototype._getBrowser=function(){var a,b="undefined"!=typeof this._navigator?this._navigator.userAgent.toLowerCase():"",c=function(a){var c=b.match(a);return c&&c.length>1&&c[1]||""},d=/CrOS/.test(b),e=c(/edge\/(\d+(\.\d+)?)/i),f=c(/version\/(\d+(\.\d+)?)/i),g=!1;return/opera|opr/i.test(b)?a={name:"Opera",opera:!0,version:f||c(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(b)?a={name:"Yandex Browser",yandexbrowser:!0,version:f||c(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(b)?(g=!0,a={name:"Windows Phone IE",ie:!0},e?(a.msedge=!0,a.version=e):(a.msie=!0,a.version=c(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(b)?(a={name:"Internet Explorer",msie:!0,ie:!0,version:c(/(?:msie |rv:)(\d+(\.\d+)?)/i)},/trident/i.test(b)&&("7.0"===a.version&&"4.0"===c(/(?:trident\/)(\d+(\.\d+)?)/i)&&(a.version="8.0"),"7.0"===a.version&&"5.0"===c(/(?:trident\/)(\d+(\.\d+)?)/i)&&(a.version="9.0"))):a=/silk/i.test(b)?{name:"Amazon Silk",silk:!0,version:c(/silk\/(\d+(\.\d+)?)/i)}:d?{name:"Chrome",chrome:!0,version:c(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(b)?{name:"Microsoft Edge",ie:!0,msedge:!0,version:e}:/chrome|crios|crmo/i.test(b)?{name:"Chrome",chrome:!0,version:c(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(b)?{name:"SeaMonkey",seamonkey:!0,version:c(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(b)?{name:"Firefox",firefox:!0,version:c(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)}:/phantom/i.test(b)?{name:"PhantomJS",phantom:!0,version:c(/phantomjs\/(\d+(\.\d+)?)/i)}:/safari/i.test(b)?{name:"Safari",safari:!0,version:f}:{other:!0},g||a.msie||a.msedge||!/(apple)?webkit/i.test(b)?!a.opera&&/gecko\//i.test(b)&&(a.name=a.name||"Gecko",a.gecko=!0,a.version=a.version||c(/gecko\/(\d+(\.\d+)?)/i)):(a.name=a.name||"Webkit",a.webkit=!0,!a.version&&f&&(a.version=f)),a.name||(a.name="Other"),a},c.prototype._getFlash=function(){var b=null;if("undefined"!=typeof this._navigator.plugins&&"object"==typeof this._navigator.plugins["Shockwave Flash"]){var c=this._navigator.plugins["Shockwave Flash"].description;if(c&&("undefined"==typeof this._navigator.mimeTypes||!this._navigator.mimeTypes["application/x-shockwave-flash"]||this._navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)){c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),b=[parseInt(c.replace(/^(.*)\..*$/,"$1"),10),parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0]}}else if("undefined"!=typeof a.ActiveXObject)try{var d=new a.ActiveXObject("ShockwaveFlash.ShockwaveFlash");d&&(c=d.GetVariable("$version"))&&(!0,c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)])}catch(e){}return b},c.prototype._getOS=function(){var a="undefined"!=typeof this._navigator?this._navigator.userAgent.toLowerCase():"",b=function(b){var c=a.match(b);return c&&c.length>1&&c[1]||""},c={name:"Other",other:!0},d=b(/(ipod|iphone|ipad)/i).toLowerCase(),e=/like android/i.test(a),f=!e&&/android/i.test(a),g=b(/version\/(\d+(\.\d+)?)/i);return d?c={name:"iOS",version:b(/os\s(\d+_*\d*_*\d*)/).split("_").join("."),ios:!0}:f?c={name:"Android",version:b(/android\s(\d+\.*\d*\.*\d*)/),android:!0}:/mac os/.test(a)?c={name:"Mac OS",mac:!0}:/windows/i.test(a)?c={name:"Windows",windows:!0}:/playbook|blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?c={name:"Blackberry",blackberry:!0,version:g||b(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(a)?(c={name:"WebOS",webos:!0,version:g||b(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(c.touchpad=!0)):/bada/i.test(a)?c={name:"Bada",bada:!0,version:b(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(a)?c={name:"Tizen",tizen:!0,version:b(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||g}:/sailfish/i.test(a)?c={name:"Sailfish",sailfish:!0,version:b(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(a)&&/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(c={name:"Firefox OS",firefoxos:!0}),c},c.prototype._getDevice=function(){var a="undefined"!=typeof this._navigator?this._navigator.userAgent.toLowerCase():"",b={},c=/like android/i.test(a),d=!c&&/android/i.test(a),e=/cros/.test(a);return b.name=a.match(/ipad/)?"ipad":a.match(/ipod/)?"ipod":a.match(/iphone/)?"iphone":d?"android":a.match(/windows phone/)?"wphone":a.match(/mobile/)?"mobile":a.match(/mac|win|linux/)||e?"desktop":"other",b[b.name]=!0,b},b.UserAgentDetector=c},this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);