!function(){function e(t,i,n){function a(r,o){if(!i[r]){if(!t[r]){var h="function"==typeof require&&require;if(!o&&h)return h(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};t[r][0].call(c.exports,function(e){return a(t[r][1][e]||e)},c,c.exports,e,t,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r=e.video.duration}function c(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&l(t)&&(t.driver.currentTime=0)),h(t.video,t.driver.currentTime)):t.video.networkState!==t.video.NETWORK_IDLE||t.video.buffered.length||t.video.load(),t.video.ended&&(delete t.video[y],t.video.pause(!0))}function d(){var e=this,t=e[M];if(e.webkitDisplayingFullscreen)return void e[T]();"data:"!==t.driver.src&&t.driver.src!==e.src&&(h(e,0,!0),t.driver.src=e.src),e.paused&&(t.paused=!1,e.buffered.length||e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(r(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&r(e,"playing")))}function u(e){var t=this,i=t[M];i.driver.pause(),i.updater.stop(),t.webkitDisplayingFullscreen&&t[x](),i.paused&&!e||(i.paused=!0,i.hasAudio||r(t,"pause"),t.ended&&(t[y]=!0,r(t,"ended")))}function f(e,t){var i=e[M]={};i.paused=!0,i.hasAudio=t,i.video=e,i.updater=b.frameIntervalometer(c.bind(i)),t?i.driver=o(e):(e.addEventListener("canplay",function(){e.paused||r(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,l(i)&&h(e,0)},get ended(){return l(i)}}),e.addEventListener("emptied",function(){var t=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(h(e,0,!0),i.driver.src=e.src,t?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?t&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[T]())}),t&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){R.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function v(e){var t=e[M];e[T]=e.play,e[x]=e.pause,e.play=d,e.pause=u,a(e,"paused",t.driver),a(e,"muted",t.driver,!0),a(e,"playbackRate",t.driver,!0),a(e,"ended",t.driver),a(e,"loop",t.driver,!0),n(e,"seeking"),n(e,"seeked"),n(e,"timeupdate",y,!1),n(e,"ended",y,!1)}function p(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),i&&!w||e[M]||(f(e,t),v(e),e.classList.add("IIV"),!t&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var m,g=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(e("poor-mans-symbol")),b=e("intervalometer"),w="object-fit"in document.head.style&&/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,M=g(),y=g(),T=g("nativeplay"),x=g("nativepause"),R=[],L=0;p.isWhitelisted=w,t.exports=p},{intervalometer:1,"poor-mans-symbol":3}],3:[function(e,t,i){"use strict";var n="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol;t.exports=n},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("../lib/Detector"),s=n(a),r=e("../lib/MobileBuffering"),o=n(r),h=e("../lib/Util"),l=n(h),c=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{constructor:function(n,a){this.settings=a,this.width=n.el().offsetWidth,this.height=n.el().offsetHeight,this.lon=a.initLon,this.lat=a.initLat,this.phi=0,this.theta=0,this.videoType=a.videoType,this.clickToToggle=a.clickToToggle,this.mouseDown=!1,this.isUserInteracting=!1,this.renderer=new t.WebGLRenderer,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.autoClear=!1,this.renderer.setClearColor(0,1);var r=i.getTech(n);if(this.supportVideoTexture=s.default.supportVideoTexture(),this.liveStreamOnSafari=s.default.isLiveStreamOnSafari(r),this.liveStreamOnSafari&&(this.supportVideoTexture=!1),this.supportVideoTexture)this.texture=new t.Texture(r);else{this.helperCanvas=n.addChild("HelperCanvas",{video:r,width:a.helperCanvas.width?a.helperCanvas.width:this.width,height:a.helperCanvas.height?a.helperCanvas.height:this.height});var o=this.helperCanvas.el();this.texture=new t.Texture(o)}r.style.visibility="hidden",this.texture.generateMipmaps=!1,this.texture.minFilter=t.LinearFilter,this.texture.maxFilter=t.LinearFilter,this.texture.format=t.RGBFormat,this.el_=this.renderer.domElement,this.el_.classList.add("vjs-video-canvas"),a.el=this.el_,e.call(this,n,a),this.attachControlEvents(),this.player().on("play",function(){this.time=(new Date).getTime(),this.startAnimation()}.bind(this))},attachControlEvents:function(){this.on("mousemove",this.handleMouseMove.bind(this)),this.on("touchmove",this.handleTouchMove.bind(this)),this.on("mousedown",this.handleMouseDown.bind(this)),this.on("touchstart",this.handleTouchStart.bind(this)),this.on("mouseup",this.handleMouseUp.bind(this)),this.on("touchend",this.handleTouchEnd.bind(this)),this.settings.scrollable&&(this.on("mousewheel",this.handleMouseWheel.bind(this)),this.on("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.on("mouseenter",this.handleMouseEnter.bind(this)),this.on("mouseleave",this.handleMouseLease.bind(this)),this.on("dispose",this.handleDispose.bind(this))},handleDispose:function(e){this.off("mousemove",this.handleMouseMove.bind(this)),this.off("touchmove",this.handleTouchMove.bind(this)),this.off("mousedown",this.handleMouseDown.bind(this)),this.off("touchstart",this.handleTouchStart.bind(this)),this.off("mouseup",this.handleMouseUp.bind(this)),this.off("touchend",this.handleTouchEnd.bind(this)),this.settings.scrollable&&(this.off("mousewheel",this.handleMouseWheel.bind(this)),this.off("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.off("mouseenter",this.handleMouseEnter.bind(this)),this.off("mouseleave",this.handleMouseLease.bind(this)),this.off("dispose",this.handleDispose.bind(this)),this.stopAnimation()},startAnimation:function(){this.render_animation=!0,this.animate()},stopAnimation:function(){this.render_animation=!1,this.requestAnimationId&&cancelAnimationFrame(this.requestAnimationId)},handleResize:function(){this.width=this.player().el().offsetWidth,this.height=this.player().el().offsetHeight,this.renderer.setSize(this.width,this.height)},handleMouseUp:function(e){if(this.mouseDown=!1,this.clickToToggle){var t=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,i=e.clientY||e.changedTouches&&e.changedTouches[0].clientY;if(void 0===t||"undefined"===i)return;var n=Math.abs(t-this.onPointerDownPointerX),a=Math.abs(i-this.onPointerDownPointerY);n<.1&&a<.1&&(this.player().paused()?this.player().play():this.player().pause())}},handleMouseDown:function(e){e.preventDefault();var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;void 0!==t&&"undefined"!==i&&(this.mouseDown=!0,this.onPointerDownPointerX=t,this.onPointerDownPointerY=i,this.onPointerDownLon=this.lon,this.onPointerDownLat=this.lat)},handleTouchStart:function(e){e.touches.length>1&&(this.isUserPinch=!0,this.multiTouchDistance=l.default.getTouchesDistance(e.touches)),this.handleMouseDown(e)},handleTouchEnd:function(e){this.isUserPinch=!1,this.handleMouseUp(e)},handleMouseMove:function(e){var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;if(void 0!==t&&"undefined"!==i)if(this.settings.clickAndDrag)this.mouseDown&&(this.lon=.2*(this.onPointerDownPointerX-t)+this.onPointerDownLon,this.lat=.2*(i-this.onPointerDownPointerY)+this.onPointerDownLat);else{var n=t-this.el_.offsetLeft,a=i-this.el_.offsetTop;this.lon=n/this.width*430-225,this.lat=a/this.height*-180+90}},handleTouchMove:function(e){(!this.isUserPinch||e.touches.length<=1)&&this.handleMouseMove(e)},handleMobileOrientation:function(e,t,i){var n=void 0!==e.portrait?e.portrait:window.matchMedia("(orientation: portrait)").matches,a=void 0!==e.landscape?e.landscape:window.matchMedia("(orientation: landscape)").matches,s=e.orientation||window.orientation;if(n)this.lon=this.lon-i*this.settings.mobileVibrationValue,this.lat=this.lat+t*this.settings.mobileVibrationValue;else if(a){var r=-90;void 0!==s&&(r=s),this.lon=-90==r?this.lon+t*this.settings.mobileVibrationValue:this.lon-t*this.settings.mobileVibrationValue,this.lat=-90==r?this.lat+i*this.settings.mobileVibrationValue:this.lat-i*this.settings.mobileVibrationValue}},handleMobileOrientationDegrees:function(e){if(void 0!==e.rotationRate){var t=e.rotationRate.alpha*Math.PI/180,i=e.rotationRate.beta*Math.PI/180;this.handleMobileOrientation(e,t,i)}},handleMobileOrientationRadians:function(e){if(void 0!==e.rotationRate){var t=e.rotationRate.alpha,i=e.rotationRate.beta;this.handleMobileOrientation(e,t,i)}},handleMouseWheel:function(e){e.stopPropagation(),e.preventDefault()},handleMouseEnter:function(e){this.isUserInteracting=!0},handleMouseLease:function(e){this.isUserInteracting=!1,this.mouseDown&&(this.mouseDown=!1)},animate:function(){if(this.render_animation){if(this.requestAnimationId=requestAnimationFrame(this.animate.bind(this)),!this.player().paused()&&void 0!==this.texture&&(!this.isPlayOnMobile&&this.player().readyState()>=2||this.isPlayOnMobile&&this.player().hasClass("vjs-playing"))){var e=(new Date).getTime();if(e-this.time>=30&&(this.texture.needsUpdate=!0,this.time=e),this.isPlayOnMobile){var t=this.player().currentTime();o.default.isBuffering(t)?this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")||this.player().addClass("vjs-panorama-mobile-inline-video-buffering"):this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")&&this.player().removeClass("vjs-panorama-mobile-inline-video-buffering")}}this.render()}},render:function(){if(!this.isUserInteracting){var e=this.lat>this.settings.initLat?-1:1,i=this.lon>this.settings.initLon?-1:1;this.settings.backToVerticalCenter&&(this.lat=this.lat>this.settings.initLat-Math.abs(this.settings.returnStepLat)&&this.latthis.settings.initLon-Math.abs(this.settings.returnStepLon)&&this.lon=66?window.addEventListener("devicemotion",this.handleMobileOrientationDegrees.bind(this)):window.addEventListener("devicemotion",this.handleMobileOrientationRadians.bind(this)))},el:function(){return this.el_}}};i.default=c},{"../lib/Detector":6,"../lib/MobileBuffering":8,"../lib/Util":11}],5:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),s=n(a),r=e("./Util"),o=n(r),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,s.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene,this.camera=new t.PerspectiveCamera(i.initFov,this.width/this.height,1,2e3),this.camera.target=new t.Vector3(0,0,0);var a="equirectangular"===this.videoType?new t.SphereGeometry(500,60,40):new t.SphereBufferGeometry(500,60,40).toNonIndexed();if("fisheye"===this.videoType){for(var s=a.attributes.normal.array,r=a.attributes.uv.array,o=0,h=s.length/3;o=13},isLiveStreamOnSafari:function(e){var t=[].slice.call(e.querySelectorAll("source")),i=!1;e.src&&e.src.indexOf(".m3u8")>-1&&t.push({src:e.src,type:"application/x-mpegURL"});for(var n=0;nWebGL.
','Find out how to get it here.'].join("\n"):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,n;e=e||{},t=void 0!==e.parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",n=a.getWebGLErrorMessage(),n.id=i,t.appendChild(n)}};i.default=a},{}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){var t=document.createElement("canvas");return t.className="vjs-video-helper-canvas",{constructor:function(i,n){this.videoElement=n.video,this.width=n.width,this.height=n.height,t.width=this.width,t.height=this.height,t.style.display="none",n.el=t,this.context=t.getContext("2d"),this.context.drawImage(this.videoElement,0,0,this.width,this.height),e.call(this,i,n)},getContext:function(){return this.context},update:function(){this.context.drawImage(this.videoElement,0,0,this.width,this.height)},el:function(){return t}}};i.default=n},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={prev_currentTime:0,counter:0,isBuffering:function(e){return e==this.prev_currentTime?this.counter++:this.counter=0,this.prev_currentTime=e,this.counter>10&&(this.counter=10,!0)}};i.default=n},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){var t=document.createElement("div");return t.className="vjs-video-notice-label",{constructor:function(i,a){"object"==n(a.NoticeMessage)?(t=a.NoticeMessage,a.el=a.NoticeMessage):"string"==typeof a.NoticeMessage&&(t.innerHTML=a.NoticeMessage,a.el=t),e.call(this,i,a)},el:function(){return t}}};i.default=a},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),s=n(a),r=e("./Util"),o=n(r),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,s.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene;var a=this.width/this.height;this.cameraL=new t.PerspectiveCamera(i.initFov,a,1,2e3),this.cameraL.target=new t.Vector3(0,0,0),this.cameraR=new t.PerspectiveCamera(i.initFov,a/2,1,2e3),this.cameraR.position.set(1e3,0,0),this.cameraR.target=new t.Vector3(1e3,0,0);for(var s=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),r=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),o=s.attributes.uv.array,h=s.attributes.normal.array,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(e){var t={};for(var i in e)t[i]=e[i];return t}function u(e){return Math.sqrt((e[0].clientX-e[1].clientX)*(e[0].clientX-e[1].clientX)+(e[0].clientY-e[1].clientY)*(e[0].clientY-e[1].clientY))}function f(){var e=navigator.userAgent.match(/.*Chrome\/([0-9]+)/);return e?parseInt(e[1],10):null}Object.defineProperty(i,"__esModule",{value:!0}),i.default={whichTransitionEvent:n,mobileAndTabletcheck:a,isIos:s,isRealIphone:r,fovToProjection:l,extend:c,deepCopy:d,getTouchesDistance:u,getChromeVersion:f}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){return{constructor:function(t,i){e.call(this,t,i)},buildCSSClass:function(){return"vjs-VR-control "+e.prototype.buildCSSClass.call(this)},handleClick:function(){var e=this.player().getChild("Canvas");e.VRMode?e.disableVR():e.enableVR(),e.VRMode?this.addClass("enable"):this.removeClass("enable"),e.VRMode?this.player().trigger("VRModeOn"):this.player().trigger("VRModeOff")},controlText_:"VR"}};i.default=n},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getChild("Canvas");return function(){e.el().style.width=window.innerWidth+"px",e.el().style.height=window.innerHeight+"px",t.handleResize()}}function s(e,t){var i=a(e);e.controlBar.fullscreenToggle.off("tap",t),e.controlBar.fullscreenToggle.on("tap",function(){var t=e.getChild("Canvas");e.isFullscreen()?(e.isFullscreen(!1),e.exitFullWindow(),e.el().style.width="",e.el().style.height="",t.handleResize(),window.removeEventListener("devicemotion",i)):(e.isFullscreen(!0),e.enterFullWindow(),i(),window.addEventListener("devicemotion",i))})}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./lib/Util"),o=n(r),h=e("./lib/Detector"),l=n(h),c="undefined"!=typeof window&&o.default.mobileAndTabletcheck(),d={clickAndDrag:c,showNotice:!0,NoticeMessage:"Please use your mouse drag and drop the video.",autoHideNotice:3e3,scrollable:!0,initFov:75,maxFov:105,minFov:51,initLat:0,initLon:-180,returnStepLat:.5,returnStepLon:2,backToVerticalCenter:!c,backToHorizonCenter:!c,clickToToggle:!1,minLat:-85,maxLat:85,minLon:-1/0,maxLon:1/0,videoType:"equirectangular",rotateX:0,rotateY:0,rotateZ:0,autoMobileOrientation:!1,mobileVibrationValue:c&&o.default.isIos()?.022:1,VREnable:!0,VRGapDegree:2.5,closePanorama:!1,helperCanvas:{},dualFish:{width:1920,height:1080,circle1:{x:.240625,y:.553704,rx:.23333,ry:.43148,coverX:.913,coverY:.9},circle2:{x:.757292,y:.553704,rx:.232292,ry:.4296296,coverX:.913,coverY:.9308}}},u=function(t,i,n){if(t.addClass("vjs-panorama"),!l.default.webgl)return f(t,{NoticeMessage:l.default.getWebGLErrorMessage(),autoHideNotice:i.autoHideNotice}),void(i.callback&&i.callback());t.addChild("Canvas",o.default.deepCopy(i));var a=t.getChild("Canvas");if(c){var r=n.getTech(t);if(o.default.isRealIphone()){var h=e("iphone-inline-video");r.setAttribute("playsinline",""),h(r,!0)}o.default.isIos()&&s(t,n.getFullscreenToggleClickFn(t)),t.addClass("vjs-panorama-mobile-inline-video"),t.removeClass("vjs-using-native-controls"),a.playOnMobile()}i.showNotice&&t.on("playing",function(){f(t,o.default.deepCopy(i))}),i.VREnable&&t.controlBar.addChild("VRButton",{},t.controlBar.children().length-1),a.hide(),t.on("play",function(){a.show()}),t.on("fullscreenchange",function(){a.handleResize()}),i.callback&&i.callback()},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{NoticeMessage:""},i=e.addChild("Notice",t);t.autoHideNotice>0&&setTimeout(function(){if(i.el_){i.addClass("vjs-video-notice-fadeOut");var e=o.default.whichTransitionEvent(),t=function t(){i.hide(),i.removeClass("vjs-video-notice-fadeOut"),i.off(e,t)};i.on(e,t)}},t.autoHideNotice)},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["equirectangular","fisheye","3dVideo","dual_fisheye"],i=function(i){var n=this;if(e.mergeOption&&(i=e.mergeOption(d,i)),void 0===e._init||"function"!=typeof e._init)return void console.error("plugin must implement init function().");-1==t.indexOf(i.videoType)&&(i.videoType=d.videoType),e._init(i),this.ready(function(){u(n,i,e)})};return i.VERSION="0.1.7",i};i.default=v},{"./lib/Detector":6,"./lib/Util":11,"iphone-inline-video":2}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return e.tech({IWillNotUseThisInPlugins:!0}).el()}function s(e){return e.controlBar.fullscreenToggle.handleClick} var r=e("./lib/Canvas"),o=n(r),h=e("./lib/ThreeCanvas"),l=n(h),c=e("./lib/Notice"),d=n(c),u=e("./lib/HelperCanvas"),f=n(u),v=e("./lib/VRButton"),p=n(v),m=e("./plugin"),g=n(m),b=videojs.getComponent("Component"),w=(0,d.default)(b);videojs.registerComponent("Notice",videojs.extend(b,w));var M=(0,f.default)(b);videojs.registerComponent("HelperCanvas",videojs.extend(b,M));var y=videojs.getComponent("Button"),T=(0,p.default)(y);videojs.registerComponent("VRButton",videojs.extend(y,T)),videojs.plugin("panorama",(0,g.default)({_init:function(e){var t="3dVideo"!==e.videoType?(0,o.default)(b,window.THREE,{getTech:a}):(0,l.default)(b,window.THREE,{getTech:a});videojs.registerComponent("Canvas",videojs.extend(b,t))},mergeOption:function(e,t){return videojs.mergeOptions(e,t)},getTech:a,getFullscreenToggleClickFn:s}))},{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]);