/*! builder: oce-mpa-builder - version: 2.1.0  framework: ewizardjs - version: 5.9.0 */
(window.webpackJsonp=window.webpackJsonp||[]).push([[2,3],{197:function(m,u,a){"use strict";a.r(u);var d=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"viewer"},on:{slideswipe:e.onSwipe,chapterswipe:e.onSwipe,subslideswipe:e.onSwipe}},[e.$navigator.navigation.errorMessage?i("div",{staticClass:"error"},[i("h2",[e._v(e._s(e.$navigator.navigation.errorMessage))])]):i("router-view",{staticClass:"view"}),e._v(" "),e._t("default")],2)},c=[];d._withStripped=!0;var w=a(218),f=a.n(w),s=a(3),r=Object.defineProperty,p=Object.defineProperties,y=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,l=(e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,g=(e,t)=>{for(var i in t||(t={}))_.call(t,i)&&l(e,i,t[i]);if(n)for(var i of n(t))v.call(t,i)&&l(e,i,t[i]);return e},h=(e,t)=>p(e,y(t)),P=(e,t)=>{var i={};for(var o in e)_.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&n)for(var o of n(e))t.indexOf(o)<0&&v.call(e,o)&&(i[o]=e[o]);return i},S={name:"v-viewer",props:{},mounted(){document.addEventListener("keydown",this.onKeyDown,!0)},beforeDestroy(){document.removeEventListener("keydown",this.onKeyDown,!0)},computed:{swipe(){return this.$settings.getRaw().navigation.swipe}},methods:{onSwipe(e){return this.goTo(e)},onKeyDown(e){if(e.target.tagName!=="INPUT"){const t=this.getDirectionFromKey(e.keyCode);return this.goTo({direction:t})}},getDirectionFromKey(e){return{37:s.c.Right,38:s.c.Down,39:s.c.Left,40:s.c.Up}[e]},goTo(e){const t=e.gesture?e.gesture.direction:e.direction;this.isForward(t)?this.goToNext(e):this.isBackward(t)&&this.goToPrev(e)},getEventOption(e){return e.gesture?this.getSwipeDetails(e):h(g({},this.getDirection(e.direction)),{touchesCount:1})},goToPrev(e){const t=this.$navigator.structure.hasPreviousSlide(),i=this.$navigator.hasPrevSubslide(),o=this.getEventOption(e);this.canGoTo(o,this.swipe.subslide)&&i?this.$navigator.goToPrevSubslide():this.canGoTo(o,this.swipe.subslide)&&this.isSubslide()&&!i?this.$navigator.goTo(h(g({},this.$navigator.getCurrentSlide()),{direction:this.$navigator.navigation.getSubslideDirection(o)})):this.canGoTo(o,this.swipe.slide)&&t?this.$navigator.goToPrevSlide():this.canGoTo(o,this.swipe.chapter)&&this.$navigator.goToPrevChapter()},goToNext(e){const t=this.$navigator.structure.hasNextSlide(),i=this.$navigator.hasNextSubslide(),o=this.getEventOption(e);this.canGoTo(o,this.swipe.subslide)&&i?this.$navigator.goToNextSubslide():this.canGoTo(o,this.swipe.slide)&&t?this.$navigator.goToNextSlide():this.canGoTo(o,this.swipe.chapter)&&this.$navigator.goToNextChapter()},isForward(e){return e===s.c.Left||e===s.c.Up},isBackward(e){return e===s.c.Right||e===s.c.Down},canGoTo(e,t){var i=t,{enabled:o}=i,x=P(i,["enabled"]);return o&&f()(e,x)},getSwipeDetails({gesture:{direction:e,maxPointers:t}}){return h(g({},this.getDirection(e)),{touchesCount:t})},getDirection(e){return{direction:{[s.c.Up]:s.d.Vertical,[s.c.Left]:s.d.Horizontal,[s.c.Down]:s.d.Vertical,[s.c.Right]:s.d.Horizontal}[e]}},isSubslide(){return!!this.$route.params.subslide}}},j=S,b=a(219),O=a(0),T=Object(O.a)(j,d,c,!1,null,null,null);if(!1)var D;T.options.__file="node_modules/navigator/src/common/components/Viewer/index.vue";var R=u.default=T.exports},202:function(m,u,a){"use strict";a.r(u);var d=a(197),c={extends:d.default,beforeMount(){this.defineCustomSwipeRegion()},computed:{isCustomSwipe(){return this.$settings.getRawByPath("clms.oce-mpa.customSwipe",!1)}},methods:{defineCustomSwipeRegion(){if((this.$settings.getRawByPath("clms.oce-mpa.customSwipe",!1)||!1)&&window.CLMPlayer){const _=this.$settings.getRawByPath("clms.oce-mpa.swipeRegion",{}),l=Object.assign({},{top:30,right:0,bottom:30,left:0},_);window.CLMPlayer.defineNoSwipeRegion("disableClmSwipe",l.left,l.top,window.screen.height-l.left-l.right,window.screen.width-l.top-l.bottom)}},goTo(_){this.isCustomSwipe&&d.default.methods.goTo.call(this,_)}}},w=c,f=a(0),s,r,p=Object(f.a)(w,s,r,!1,null,null,null);if(!1)var y;p.options.__file="node_modules/navigator/src/clms/oce-mpa/components/Viewer/index.vue";var n=u.default=p.exports},206:function(m,u,a){},218:function(m,u,a){"use strict";var d=Array.isArray,c=Object.keys,w=Object.prototype.hasOwnProperty;m.exports=function f(s,r){if(s===r)return!0;if(s&&r&&typeof s=="object"&&typeof r=="object"){var p=d(s),y=d(r),n,_,v;if(p&&y){if(_=s.length,_!=r.length)return!1;for(n=_;n--!==0;)if(!f(s[n],r[n]))return!1;return!0}if(p!=y)return!1;var l=s instanceof Date,g=r instanceof Date;if(l!=g)return!1;if(l&&g)return s.getTime()==r.getTime();var h=s instanceof RegExp,P=r instanceof RegExp;if(h!=P)return!1;if(h&&P)return s.toString()==r.toString();var S=c(s);if(_=S.length,_!==c(r).length)return!1;for(n=_;n--!==0;)if(!w.call(r,S[n]))return!1;for(n=_;n--!==0;)if(v=S[n],!f(s[v],r[v]))return!1;return!0}return s!==s&&r!==r}},219:function(m,u,a){"use strict";var d=a(206),c=a.n(d)}}]);
